•

Documentation icon คู่มือการใช้งานแม่แบบ[ดู] [แก้] [ประวัติ] [ล้างแคช]

แม่แบบนี้เป็นแม่แบบแสดงจุดนำ (bullet) หรือสัญลักษณ์แสดงหัวข้อ ซึ่งมีหน้าตาเป็นแบบนี้ [ • ]

แม่แบบนี้ทำงานเหมือนลำดับมาร์กอัปเอชทีเอ็มแอลนี้ [ • ] ซึ่งก็คือช่องว่างแบบไม่ตัดคำ (non-breaking space), จุดนำ (bullet) และช่องว่างแบบปกติ (normal space)

แม่แบบนี้ใช้เมื่อคุณต้องการสัญลักษณ์แสดงหัวข้อที่ใหญ่กว่าจุดกึ่งกลางที่เป็นตัวหนา [·] แต่มีขนาดเล็กกว่ายัติภาคชนิด en dash [–]

การใช้แม่แบบนี้ในการสร้างรายการที่มีจุดกึ่งกลางคั่นนั้นเลิกใช้งานแล้ว ให้ใช้ {{Flatlist}} หรือ {{Hlist}} ทดแทน สำหรับรายละเอียดเพิ่มเติม ดูที่ WP:HLIST

การใช้งานปกติ

การใช้งานที่แนะนำคือ ใส่ {{}} กับข้อความที่ต้องการ โดยไม่มีเว้นช่องว่างก่อนหน้าแม่แบบ แต่ให้เว้นช่องว่างหนึ่งช่องหลังแม่แบบ เช่น

[[เกลือ]]{{•}} [[พริกไทย]]

เนื่องจากตัวแม่แบบมีช่องว่างแบบไม่ตัดคำทางด้านซ้ายของสัญลักษณ์ด้วย การใช้งานตามที่แนะนำนี้จะทำให้ข้อความแสดงช่องว่างหนึ่งช่องทั้งด้านซ้ายและด้านขวาของสัญลักษณ์ ดังที่แสดง

เกลือพริกไทย

โดยจุดประสงค์ของการที่แม่แบบนี้มีช่องว่างด้านซ้ายของสัญลักษณ์คือ เพื่อให้แน่ใจว่าหากข้อความถูกตัดแบ่งเป็นบรรทัดใหม่ ข้อความจะถูกตัดที่ตำแหน่งด้านขวาของสัญลักษณ์ ดังที่แสดง

เกลือ
พริกไทย
ด้านล่างนี้คือตัวอย่างวิธีการใช้
Template Bull is not really intended to be used in article text; it's intended for use in other templates, tables, lists and other equivalent things, in order to include a separator between items such as in infoboxes. It's also to be consistent so that the article editor can use their choice of {{bull}}, {{dot}}, {{middot}}, or {{ndash}} and not have to insert the  • ,  · ,  · , or – symbol, they can use any of these as a simple macro. The idea being that if you have a table with a list of items, you can insert a bullet (or the other symbols) between items that will appear correct, in that the items always have just one separator between them, and when a list crawls to the next line, the bullet hangs onto the prior item instead of rolling over to the next line. Notice on the end of this box, the bullet symbol "•" hangs on the end of the last item that will fit on the line indicating that additional items follow on the next line as part of this list, but the item only stays on the line if the item and the dash will fit. See the column on the right. In code it's Item1{{bull}} Item2{{bull}} Item3{{bull}} Item4{{bull}} Item5{{bull}} etc. (with some smaller items squeezed in to show that the list doesn't have to be the same number of items per line) but in the box they all fold perfectly once it runs out of space on the line to fit the next item and the symbol following.

Normally, in a real box these items would be links, but this is an example.

Item1 • A • B • Item2 • Item3 • Item4 • Item5 • extra item • E • 1 • 2 • 3 • 4 • 5 • 6 • 7 • item that won't attach to prior line unless it fits in the remaining space • Q • A slightly longer item • KK • An obviously really even longer item that the bullet will hang at its end • Item6 • C • Item7 • Item8 • Item9 • Item10 • Item11 • Item12 • D • Item13 • Item14 • Item15 • Item16 • Item17 • Item18

The space on the end makes sure the bullet doesn't touch the edge of the box, either

การใช้งานที่ไม่ถูกต้อง

หากใช้แม่แบบนี้ผิดเล็กน้อย แม่แบบนี้จะยังคงทำงานได้ดีในบางกรณี ตัวอย่างเช่น หากไม่มีช่องว่างหรือมีช่องว่างหลายช่องหลังตัวแม่แบบ ดังตัวอย่างเหล่านี้

[[เกลือ]]{{•}}[[พริกไทย]]
[[เกลือ]]{{•}}   [[พริกไทย]]

ทั้งสองจะแสดงผลเหมือนเดิมทุกประการ โดยมีช่องว่างเพียงหนึ่งช่องในแต่ละด้านของสัญลักษณ์ ดังที่แสดง

เกลือพริกไทย

และหากข้อความถูกตัด ก็จะถูกตัดที่ตำแหน่งหลังสัญลักษณ์เหมือนเดิม ดังที่แสดง

เกลือ
พริกไทย

แต่การเว้นวรรคอย่างน้อยหนึ่งช่องก่อนหน้าตัวแม่แบบจะทำให้เกิดปัญหา ดังตัวอย่างเหล่านี้

[[เกลือ]] {{•}}[[พริกไทย]]
[[เกลือ]]   {{•}}[[พริกไทย]]
[[เกลือ]] {{•}} [[พริกไทย]]
[[เกลือ]]   {{•}}   [[พริกไทย]]

แม่แบบนี้จะแสดงผลด้วยช่องว่างสองช่องก่อนหน้าสัญลักษณ์และอีกหนึ่งช่องที่ด้านหลัง ดังที่แสดง

เกลือ  • พริกไทย

และหากข้อความถูกตัด ก็อาจจะถูกตัดที่ตำแหน่งก่อนหน้าสัญลักษณ์ ดังที่แสดง

เกลือ
 • พริกไทย

ข้อมูลแม่แบบ

ด้านล่างนี้คือข้อมูลแม่แบบ เอกสารกำกับสำหรับแม่แบบนี้ซึ่งถูกใช้งานโดยเครื่องมือแก้ไขแบบเห็นภาพและเครื่องมืออื่น ๆ

ข้อมูลแม่แบบสำหรับ •

แม่แบบสร้างสัญลักษณ์แสดงหัวข้อย่อย ไม่มีการใช้พารามิเตอร์ ชื่ออื่นของแม่แบบนี้ ได้แก่ 'bull' และ 'bullet' สามารถใช้แทนชื่อหลักของแม่แบบได้

พารามิเตอร์แม่แบบ[แก้ไขข้อมูลแม่แบบ]

พารามิเตอร์คำอธิบายชนิดสถานะ
ไม่ได้ระบุพารามิเตอร์ใด

รายละเอียดทางเทคนิค

The space before the bullet is a non-breaking space. That means it will not line break and will not collapse together with normal spaces that come before the template.

The space after the bullet is a normal space. That means it wraps (allows line breaks) and it will collapse together with normal spaces that come after the template to form one single space.

Under some circumstances, dotted link lists misbehave. They might get unexpected line wraps or they might expand outside the box they are enclosed in. The how-to guide: Wikipedia:Line-break handling, explains when that happens and how to fix it.

  • The bullet used is U+2022 bullet (HTML • · • · hex: •).
  • Not to be confused with U+00B7 · middot (HTML · · · · hex: ·), used in {{·}}.

หน้าเปลี่ยนทาง

ขนาดจุด

แม่แบบ:Dot size

ดูเพิ่ม

There are several other templates with similar stream formatting purposes and such (or related) functionality:

  • {{·}} – bold middot or (·)
  • {{spaced ndash}} – en dash or "–", a short dash
  • {{\}} – for the occasional slash or "/" in lists (note that the template is a backslash because template names may not contain a slash)
  • {{Colorbull}} – a colored bullet, with an optional wikilink
  • {{Asterisk}} – to display an asterisk character (*) at the start of a line of text
  • {{sdot}} or "แม่แบบ:Sdot"

Wrap control templates

  • You might need to handle proper word wrapping (line breaking):
    • {{nowraplinks}} – Prevents wraps inside links and only allows wraps between the links and in normal text, very useful for link lists and easy to use.
    • {{nowrap begin}} – Prevents wraps in both text and links. For the really tricky wrapping cases when you need full control, for instance in very complex link lists.
  • For further information, see: Wikipedia:Line-break handling – The how-to guide detailing how to handle line wrapping on Wikipedia.