|
|
Line 1: |
Line 1: |
| <includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | | <code>{{xpd/w{{#if:{{{l1|}}}|l}}|{{{1}}}}}{{xpd/w{{#if:{{{l2|}}}|l}}|{{{2}}}}}{{xpd/w{{#if:{{{l3|}}}|l}}|{{{3}}}}}{{xpd/w{{#if:{{{l4|}}}|l}}|{{{4}}}}}{{xpd/w{{#if:{{{l5|}}}|l}}|{{{5}}}}}{{xpd/w{{#if:{{{l6|}}}|l}}|{{{6}}}}}{{xpd/w{{#if:{{{l7|}}}|l}}|{{{7}}}}}{{xpd/w{{#if:{{{l8|}}}|l}}|{{{8|}}}}}{{xpd/w{{#if:{{{l9|}}}|l}}|{{{9|}}}}}{{xpd/w{{#if:{{{l10|}}}|l}}|{{{10|}}}}}{{xpd/w{{#if:{{{l11|}}}|l}}|{{{11|}}}}}{{xpd/w{{#if:{{{l12|}}}|l}}|{{{12|}}}}}{{xpd/w{{#if:{{{l13|}}}|l}}|{{{13|}}}}}{{xpd/w{{#if:{{{l14|}}}|l}}|{{{14|}}}}}{{xpd/w{{#if:{{{l15|}}}|l}}|{{{15|}}}}}{{xpd/w{{#if:{{{l16|}}}|l}}|{{{16|}}}}}{{xpd/w{{#if:{{{l17|}}}|l}}|{{{17|}}}}}{{xpd/w{{#if:{{{l18|}}}|l}}|{{{18|}}}}}{{xpd/w{{#if:{{{l19|}}}|l}}|{{{19|}}}}}{{xpd/w{{#if:{{{l20|}}}|l}}|{{{20|}}}}}{{xpd/w{{#if:{{{l21|}}}|l}}|{{{21|}}}}}{{xpd/w{{#if:{{{l22|}}}|l}}|{{{22|}}}}}{{xpd/w{{#if:{{{l23|}}}|l}}|{{{23|}}}}}{{xpd/w{{#if:{{{l24|}}}|l}}|{{{24|}}}}}</code> {{{gives}}} {{{result|{{#switch:{{{p}}}|10OpC={{{1}}}{{xpd/c|{{{2}}}}}{{xpd/c|{{{3}}}}}{{xpd/c|{{{4}}}}}{{xpd/c|{{{5}}}}}{{xpd/c|{{{6}}}}}{{xpd/c|{{{7}}}}}{{xpd/c|{{{8}}}}}{{xpd/c|{{{9}}}}}{{xpd/c|{{{10}}}}}{{xpd/c|{{{11}}}}}{{{{{{15}}}|{{{17}}}}}}{{xpd/c|{{{21}}}}}{{xpd/c|{{{22}}}}}}}}}} [{{fullurl:special:ExpandTemplates|input={{xpd/url|{{{1}}}}}{{xpd/url|{{{2}}}}}{{xpd/url|{{{3}}}}}{{xpd/url|{{{4}}}}}{{xpd/url|{{{5}}}}}{{xpd/url|{{{6}}}}}{{xpd/url|{{{7}}}}}{{xpd/url|{{{8|}}}}}{{xpd/url|{{{9|}}}}}{{xpd/url|{{{10|}}}}}{{xpd/url|{{{11|}}}}}{{xpd/url|{{{12|}}}}}{{xpd/url|{{{13|}}}}}{{xpd/url|{{{14|}}}}}{{xpd/url|{{{15|}}}}}{{xpd/url|{{{16|}}}}}{{xpd/url|{{{17|}}}}}{{xpd/url|{{{18|}}}}}{{xpd/url|{{{19|}}}}}{{xpd/url|{{{20|}}}}}{{xpd/url|{{{21|}}}}}{{xpd/url|{{{22|}}}}}{{xpd/url|{{{23|}}}}}{{xpd/url|{{{24|}}}}}}}]<noinclude>{{documentation}}</noinclude> |
| <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
| |
| __NOTOC__
| |
| This is the '''bullet''' template; it looks like this: " • ".
| |
| | |
| It works similarly to the html markup sequence "<code>'''&nbsp;&bull;''' </code>". That is, a [[non-breaking space]], a bullet and a normal space.
| |
| | |
| {{tl|bull}} and {{tl|bullet}} redirect here and can be used as alternative names for this template. | |
| | |
| This template is used when you want a bigger bullet than a [[Template:·|bold middot]] "'''·'''", but something smaller than a [[Template:Ndash|ndash]] "–" or [[Template:Mdash|mdash]] "—". For instance for dotted lists that have a font-size 80% or less of normal font-size, since then bold middot "'''·'''" becomes too small.
| |
| | |
| === Normal usage ===
| |
| | |
| The recommended usage is to use ''no'' space before the template and one space after the template, like this:
| |
| <nowiki>[[Salt]]{{•}} [[Pepper]]</nowiki>
| |
| | |
| It will render one space on each side of the bullet, like this:
| |
| :[[Salt]] • [[Pepper]] | |
| | |
| If it line breaks then the line break will come ''after'' the bullet, not before, like this:
| |
| :[[Salt]] • | |
| :[[Pepper]] | |
| | |
| For long dotted lists each list item can be put on its own line, with no spaces between each item and the template. Like this:
| |
| <pre><nowiki>
| |
| [[Salt]]{{•}}
| |
| [[Pepper]]{{•}}
| |
| [[Curry]]{{•}}
| |
| [[Saffron]]</nowiki></pre>
| |
| | |
| (It doesn't matter if there are no or some spaces at the end of the lines, after the templates.)
| |
| | |
| As before it will render one space on each side of the bullets, like this:
| |
| :[[Salt]] • [[Pepper]] • [[Curry]] • [[Saffron]] | |
| | |
| And if it line breaks then the line break will come ''after'' one of the bullets, not before, like this:
| |
| :[[Salt]] • [[Pepper]] • | |
| :[[Curry]] • [[Saffron]]
| |
| | |
| === Incorrect usage ===
| |
| | |
| If the template is used slightly wrong it will in some cases still behave well. For instance if there are no or several spaces after the template. Like these examples:
| |
| | |
| <nowiki>[[Salt]]{{•}}[[Pepper]]</nowiki>
| |
| <nowiki>[[Salt]]{{•}} [[Pepper]]</nowiki>
| |
| | |
| Both of them will render exactly as before, with just one space on each side of the bullet, like this:
| |
| :[[Salt]] • [[Pepper]]
| |
| | |
| And it will still only line break ''after'' the bullet, like this:
| |
| :[[Salt]] •
| |
| :[[Pepper]]
| |
| | |
| But putting one or more spaces before the template will cause problems, like these examples:
| |
| <nowiki>[[Salt]] {{•}}[[Pepper]]</nowiki>
| |
| <nowiki>[[Salt]] {{•}}[[Pepper]]</nowiki>
| |
| <nowiki>[[Salt]] {{•}} [[Pepper]]</nowiki>
| |
| <nowiki>[[Salt]] {{•}} [[Pepper]]</nowiki>
| |
| | |
| Then it will render with ''two'' spaces before the bullet, and one after, like this:
| |
| :[[Salt]] • [[Pepper]]
| |
| | |
| And if it line breaks it might break ''before'' the bullet, like this:
| |
| :[[Salt]]
| |
| : • [[Pepper]]
| |
| | |
| === Technical details ===
| |
| | |
| 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.
| |
| | |
| === Dot size reference list ===
| |
| | |
| {| style="text-align:center; background:transparent;" | |
| | style="width:1.7em;" | <small>·</small> | |
| | align="left" | <small> middot | |
| |- | |
| | · | |
| | align="left" | middot | |
| |- | |
| | <small>'''·'''</small> | |
| | align="left" | <small> bold middot | |
| |- | |
| | '''·''' | |
| | align="left" | bold middot | |
| |- | |
| | <small>•</small> | |
| | align="left" | <small> bullet | |
| |- | |
| | • | |
| | align="left" | bullet | |
| |- | |
| | '''•''' | |
| | align="left" | bold bullet | |
| |- | |
| | – | |
| | align="left" | ndash | |
| |- | |
| | — | |
| | align="left" | mdash | |
| |} | |
| | |
| === See also ===
| |
| | |
| There are several other templates with similar functionality:
| |
| | |
| * {{tn|·}} – Bold middot "'''·'''" is mostly used for dotted lists.
| |
| * {{tl|ndash}} – Ndash "–" is a short dash.
| |
| * {{tl|mdash}} – Mdash "—" is a long dash.
| |
| * {{tn|\}} – For the occasional slash "/" in lists.
| |
| * {{tl|-•}} - Creates a line break, bullet and non-breaking space. Equivalent to the HTML markup: <code><nowiki><br/>&bull;&nbsp;</nowiki></code>.
| |
| | |
| * {{tl|••}} – The same kind of bullet but it "sticks" before a list item, instead of after a list item.
| |
| | |
| When making dotted lists you might need to handle proper word wrapping (line breaking):
| |
| | |
| * {{tl|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.
| |
| * {{tl|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.
| |
| * [[Wikipedia:Line break handling]] – The how-to guide detailing how to handle line wrapping on Wikipedia.
| |
| | |
| <includeonly> | |
| <!-- ADD CATEGORIES BELOW THIS LINE -->
| |
| [[Category:Wikipedia formatting and function templates|•]]
| |
| | |
| <!-- ADD INTERWIKIS BELOW THIS LINE -->
| |
| [[bg:Шаблон:Bullet]]
| |
| [[fr:Modèle:•]]
| |
| [[ja:Template:•]]
| |
| [[lt:Šavlonas:•]]
| |
| [[pt:Predefinição:•]]
| |
| </includeonly> | |