Template:Spaced en dash/doc: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
m (→‎top: Punctuation: period at the end of a sentence)
No edit summary
Line 1: Line 1:
COinS safenHighuse
{{Documentation subpage}} __NOTOC__
Template shortcut sndspndsndashspndash
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE -->
This is the spaced en dash template it renders like this without the quote marks&ndash
{{COinS safe|n}}
It works similarly to the HTML markup sequence code &ampnbsp&ampndash&nbspcode ie a nonbreaking space which will not line break and will not collapse together with normal spaces that come before the template a short dash known as an Dash En dash|en dash and a normal space (which willlinebreak and will collapse together with normal spaces that come after the template.
{{High-use| 30632 }}
Among other uses this template may be used in lists to provide something stronger than a Templatebold middot&middot or a Templatebullet&bullbut shorter than an Dash Em dash em dash &mdash For horizontal lists use tlflatlist or code class hlist code instead see HLIST. Here the recommended usage is to use no space before the template and one space after the template like this:
{{Template shortcut |snd|spnd|sndash|spndash}}
This is the '''spaced en dash''' template; it renders like this (without the quote marks): " &ndash; "
nowiki Salt spaced en dash Pepper nowiki This will render one space on each side the dash, like this
Salt &ndash Black pepperPepperA line break will come after one the dashes not before when the spacing is used as suggested like this:
It works similarly to the HTML markup sequence <code>'''&amp;nbsp;&amp;ndash;'''&nbsp;</code> i.e. a [[non-breaking space]] (which will not line-break and will not collapse together with normal spaces that come before the template), a short dash (known as an [[Dash#En dash|en dash]]), and a normal space (which ''will'' line-break and ''will'' collapse together with normal spaces that come after the template).
Salt &ndash Black pepperPepper &ndash;
Among other uses, this template may be used in lists to provide something stronger than a [[Template:·|bold middot]] "'''&middot;'''" or a [[Template:•|bullet]] "&bull;", but shorter than an [[Dash#Em dash|em dash]] "&mdash;". For horizontal lists, use {{tl|flatlist}} or <code>class="hlist"</code> instead (see [[WP:HLIST]]). Here, the recommended usage is to use ''no'' space before the template and one space after the template, like this:
Curry & ndashSaffron
::<nowiki>[[Salt]]{{spaced en dash}} [[Pepper]]</nowiki>
tlcsnd is a handy synonym class wikitable style border none background: none
:This will render one space on each side of the dash, like this:
Colspan style text align: center Here's an example use for lists
::[[Salt]] &ndash; [[Black pepper|Pepper]]
One use template spaced en dash is within other templates tables lists, and similar things to provide a separator between items. It is also to be consistent so that the article editor can use their choice nowiki nowiki bull nowiki nowiki dot nowiki nowiki middot or nowiki nowiki spaced en dash and not have to insert the dot middot or spaced en dash symbol they can use any these as a simple macro. The idea being that if you have a table with a list items, you can insert a spaced short dash (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 dash hangs onto the prior item instead of rolling over to the next line. Notice on the end this box the 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 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 is Item1 nowiki nowiki spaced en dash Item2<nowiki nowikispaced en dash Item3nowiki nowiki spaced en dash Item4<nowikinowikispaced en dash Item5nowikinowikispaced en dash etc with some smaller items squeezed in to show that the list does not have to be the same number items per line) but in the box they all fold perfectly once it runs out space on the line to fit the next item and the dash following.
:A line break will come ''after'' one of the dashes, not before, when the spacing is used as suggested, like this:
Normally, in a real box these items would be links, but this is an example Item1spaced en dash}} A{{spaced en dash}} Bspaced en dash Item2spaced en dash Item3spaced en dash}} Item4spaced en dash Item5spaced en dash}} extra itemspaced en dash Espaced en dash 1spaced en dash 2spaced en dash 3spaced en dash 4spaced en dash 5spaced en dash 6spaced en dash7spaced en dashnowrapitem that won't attach to prior line unless it fits in the remaining space{{spaced en dash Q spaced en dash A slightly longer itemspaced en dash}} KK{{spaced en dash An obviously really even longer item that the dash will hang at its endspaced en dash Item6spaced en dash Cspaced en dash Item7{{spaced en dash Item8spaced en dash Item9spaced en dash Item10spaced en dash Item11spaced en dash Item12spaced en dash Dspaced en dash Item13{{spaced en dash}} Item14spaced en dash Item15{{spaced en dashItem16{{spaced en dash Item17{{spaced en dash Item18 The space on the end makes sure the dash doesn't touch the edge of the box, either</p>
::[[Salt]] &ndash; [[Black pepper|Pepper]] &ndash;
Dot sizes Dot size}} See also tn which produces a spaced boldinterpunct middottn which produces a spaced bulletpoint tn , which produces a spaced forward slash tl en dash which produces an unspaced en dashtl em dash,
::[[Curry]] &ndash; [[Saffron]]
which produces an (unspaced) em dashincludeonlyCategory:Inline spacing templates

Category:Typingaid templates En dash spaced
{{tlc|snd}} is a handy synonym.
Category:Charactersubstitution templates
{| class="wikitable" style="border: none; background: none;"
includeonly
|Colspan=2 style="text-align: center;" |Here's an example of use for lists
|-
|| One use of template "spaced en dash" is within other templates, tables, lists, and similar things to provide a separator between items. It is also to be consistent so that the article editor can use their choice of '''<nowiki>{{</nowiki>bull}}''', '''<nowiki>{{</nowiki>dot}}''', '''<nowiki>{{</nowiki>middot}}''', or '''<nowiki>{{</nowiki>spaced en dash}}''' and not have to insert the {{•}}, {{dot}}, {{middot}}, or {{spaced en dash}} 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 spaced short dash (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 dash hangs onto the prior item instead of rolling over to the next line. Notice on the end of this box, the 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 is ''' Item1<nowiki>{{</nowiki>spaced en dash}} Item2<nowiki>{{</nowiki>spaced en dash}} Item3<nowiki>{{</nowiki>spaced en dash}} Item4<nowiki>{{</nowiki>spaced en dash}} Item5<nowiki>{{</nowiki>spaced en dash}}''' etc. (with some smaller items squeezed in to show that the list does not 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 dash following.
| <p>Normally, in a real box these items would be links, but this is an example.</p> Item1{{spaced en dash}} A{{spaced en dash}} B{{spaced en dash}} Item2{{spaced en dash}} Item3{{spaced en dash}} Item4{{spaced en dash}} Item5{{spaced en dash}} extra item{{spaced en dash}} E{{spaced en dash}} 1{{spaced en dash}} 2{{spaced en dash}} 3{{spaced en dash}} 4{{spaced en dash}} 5{{spaced en dash}} 6{{spaced en dash}} 7{{spaced en dash}} {{nowrap|item that won't attach to prior line unless it fits in the remaining space{{spaced en dash}}}} Q{{spaced en dash}} A slightly longer item{{spaced en dash}} KK{{spaced en dash}} An obviously really even longer item that the dash will hang at its end{{spaced en dash}} Item6{{spaced en dash}} C{{spaced en dash}} Item7{{spaced en dash}} Item8{{spaced en dash}} Item9{{spaced en dash}} Item10{{spaced en dash}} Item11{{spaced en dash}} Item12{{spaced en dash}} D{{spaced en dash}} Item13{{spaced en dash}} Item14{{spaced en dash}} Item15{{spaced en dash}} Item16{{spaced en dash}} Item17{{spaced en dash}} Item18 <p>The space on the end makes sure the dash doesn't touch the edge of the box, either</p>
|}

== Dot sizes ==
{{Dot size}}
== See also ==
* {{tn|·}}, which produces a spaced bold [[interpunct]] ("middot"): "{{·}}"
* {{tn|•}}, which produces a spaced bullet-point: "{{•}}"
* {{tn|\}}, which produces a spaced (forward-)slash: "{{\}}"
* {{tl|en dash}}, which produces an (unspaced) [[en dash]].
* {{tl|em dash}}, which produces an (unspaced) [[em dash]].
<includeonly>
[[Category:Inline spacing templates]]
[[Category:Typing-aid templates|En dash, spaced]]
[[Category:Character-substitution templates]]
</includeonly>

Revision as of 18:51, April 2, 2020

COinS safenHighuse 

Template shortcut sndspndsndashspndash This is the spaced en dash template it renders like this without the quote marks&ndash It works similarly to the HTML markup sequence code &ampnbsp&ampndash&nbspcode ie a nonbreaking space which will not line break and will not collapse together with normal spaces that come before the template a short dash known as an Dash En dash|en dash and a normal space (which willlinebreak and will collapse together with normal spaces that come after the template. Among other uses this template may be used in lists to provide something stronger than a Templatebold middot&middot or a Templatebullet&bullbut shorter than an Dash Em dash em dash &mdash For horizontal lists use tlflatlist or code class hlist code instead see HLIST. Here the recommended usage is to use no space before the template and one space after the template like this: nowiki Salt spaced en dash Pepper nowiki This will render one space on each side the dash, like this Salt &ndash Black pepperPepperA line break will come after one the dashes not before when the spacing is used as suggested like this: Salt &ndash Black pepperPepper – Curry & ndashSaffron tlcsnd is a handy synonym class wikitable style border none background: none Colspan style text align: center Here's an example use for lists One use template spaced en dash is within other templates tables lists, and similar things to provide a separator between items. It is also to be consistent so that the article editor can use their choice nowiki nowiki bull nowiki nowiki dot nowiki nowiki middot or nowiki nowiki spaced en dash and not have to insert the dot middot or spaced en dash symbol they can use any these as a simple macro. The idea being that if you have a table with a list items, you can insert a spaced short dash (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 dash hangs onto the prior item instead of rolling over to the next line. Notice on the end this box the 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 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 is Item1 nowiki nowiki spaced en dash Item2<nowiki nowikispaced en dash Item3nowiki nowiki spaced en dash Item4<nowikinowikispaced en dash Item5nowikinowikispaced en dash etc with some smaller items squeezed in to show that the list does not have to be the same number items per line) but in the box they all fold perfectly once it runs out space on the line to fit the next item and the dash following.

Normally, in a real box these items would be links, but this is an example Item1spaced en dash}} A{{spaced en dash}} Bspaced en dash Item2spaced en dash Item3spaced en dash}} Item4spaced en dash Item5spaced en dash}} extra itemspaced en dash Espaced en dash 1spaced en dash 2spaced en dash 3spaced en dash 4spaced en dash 5spaced en dash 6spaced en dash7spaced en dashnowrapitem that won't attach to prior line unless it fits in the remaining space{{spaced en dash Q spaced en dash A slightly longer itemspaced en dash}} KK{{spaced en dash An obviously really even longer item that the dash will hang at its endspaced en dash Item6spaced en dash Cspaced en dash Item7{{spaced en dash Item8spaced en dash Item9spaced en dash Item10spaced en dash Item11spaced en dash Item12spaced en dash Dspaced en dash Item13{{spaced en dash}} Item14spaced en dash Item15{{spaced en dashItem16{{spaced en dash Item17{{spaced en dash Item18 The space on the end makes sure the dash doesn't touch the edge of the box, either

Dot sizes Dot size}} See also tn which produces a spaced boldinterpunct middottn which produces a spaced bulletpoint tn , which produces a spaced forward slash tl en dash which produces an unspaced en dashtl em dash,
which produces an (unspaced) em dashincludeonlyCategory:Inline spacing templates

Category:Typingaid templates En dash spaced Category:Charactersubstitution templates includeonly