Template:Spaced en dash space/doc: Difference between revisions
| [checked revision] | [checked revision] |
Caleb Cooper (talk | contribs) No edit summary |
Caleb Cooper (talk | contribs) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 8: | Line 8: | ||
This is the '''spaced en dash space''' template; it renders text in the same format as the HTML markup sequence <code>'''&nbsp;&ndash;&nbsp;'''</code>. The resulting text is three characters in a line in the following order: |
This is the '''spaced en dash space''' template; it renders text in the same format as the HTML markup sequence <code>'''&nbsp;&ndash;&nbsp;'''</code>. The resulting text is three characters in a line in the following order: |
||
# a [[non-breaking space]] (which cannot become a [[Line break (computing)|line break]] and will not collapse together with any normal spaces that come before the template), |
# a [[Wikipedia:non-breaking space]] (which cannot become a [[Wikipedia:Line break (computing)|line break]] and will not collapse together with any normal spaces that come before the template), |
||
# a short type of dash called an [[Dash#En dash|en dash]]), and |
# a short type of dash called an [[Wikipedia:Dash#En dash|en dash]]), and |
||
# one more of the same kind of non-breaking space (which will behave just like the first). |
# one more of the same kind of non-breaking space (which will behave just like the first). |
||
The recommended usage is to use ''no'' space before the template and ''no'' space after the template, like this: |
The recommended usage is to use ''no'' space before the template and ''no'' space after the template, like this: |
||
::<nowiki>[[Salt]]{{snds}}[[Black pepper|Pepper]]{{snds}}[[Curry]]{{snds}}[[Saffron]]</nowiki> |
::<nowiki>[[Wikipedia:Salt]]{{snds}}[[Wikipedia:Black pepper|Pepper]]{{snds}}[[Wikipedia:Curry]]{{snds}}[[Wikipedia:Saffron]]</nowiki> |
||
:This will render one space on each side of the dash, and a line break will not come ''before'' one of the dashes nor will a line break come ''after'' one of the dashes as rendered here: |
:This will render one space on each side of the dash, and a line break will not come ''before'' one of the dashes nor will a line break come ''after'' one of the dashes as rendered here: |
||
::[[Salt]] – [[Black pepper|Pepper]] – [[Curry]] – [[Saffron]] |
::[[Wikipedia:Salt]] – [[Wikipedia:Black pepper|Pepper]] – [[Wikipedia:Curry]] – [[Wikipedia:Saffron]] |
||
The template is used to connect words with an en dash but with a non-breaking space before and after the en dash. Others uses of the template "spaced en dash space" are 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}}''', '''<nowiki>{{</nowiki>spaced en dash}}''', or '''<nowiki>{{</nowiki>spaced en dash space}}''' and not have to insert the {{bull}}, {{dot}}, {{middot}}, {{spaced en dash}}, or {{spaced en dash space}} symbols; they can use any of these templates as a simple macro. See above and right for shortcuts editors can use to easily implement this template in articles. |
The template is used to connect words with an en dash but with a non-breaking space before and after the en dash. Others uses of the template "spaced en dash space" are 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}}''', '''<nowiki>{{</nowiki>spaced en dash}}''', or '''<nowiki>{{</nowiki>spaced en dash space}}''' and not have to insert the {{bull}}, {{dot}}, {{middot}}, {{spaced en dash}}, or {{spaced en dash space}} symbols; they can use any of these templates as a simple macro. See above and right for shortcuts editors can use to easily implement this template in articles. |
||
| Line 24: | Line 24: | ||
== See also == |
== See also == |
||
* {{tn|·}}, which produces a spaced bold [[interpunct]] aka middot: "{{·}}" |
* {{tn|·}}, which produces a spaced bold [[Wikipedia:interpunct]] aka middot: "{{·}}" |
||
* {{tn|•}}, which produces a spaced bullet point: "{{•}}" |
* {{tn|•}}, which produces a spaced bullet point: "{{•}}" |
||
* {{tn|\}}, which produces a spaced forward slash: "{{\}}" |
* {{tn|\}}, which produces a spaced forward slash: "{{\}}" |
||
* {{tl|en dash}}, which produces an ''unspaced'' [[Dash#En dash|en dash]] |
* {{tl|en dash}}, which produces an ''unspaced'' [[Wikipedia:Dash#En dash|en dash]] |
||
* {{tl|spaced en dash}}, which produces a non-breaking space, followed by an [[Dash#En dash|en dash]], and then a breaking space |
* {{tl|spaced en dash}}, which produces a non-breaking space, followed by an [[Wikipedia:Dash#En dash|en dash]], and then a breaking space |
||
* {{tl|em dash}}, which produces an ''unspaced'' [[Dash#Em dash|em dash]] |
* {{tl|em dash}}, which produces an ''unspaced'' [[Wikipedia:Dash#Em dash|em dash]] |
||
* [[Non-breaking space]] |
* [[Wikipedia:Non-breaking space]] |
||
<includeonly>{{Sandbox other|| |
<includeonly>{{Sandbox other|| |
||
Latest revision as of 16:08, 21 October 2020
| This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see COinS. |
| This page was automatically imported from Commons any changes will be overwritten, the source page is here () |
This is the spaced en dash space template; it renders text in the same format as the HTML markup sequence – . The resulting text is three characters in a line in the following order:
- a Wikipedia:non-breaking space (which cannot become a line break and will not collapse together with any normal spaces that come before the template),
- a short type of dash called an en dash), and
- one more of the same kind of non-breaking space (which will behave just like the first).
The recommended usage is to use no space before the template and no space after the template, like this:
- [[Wikipedia:Salt]]{{snds}}[[Wikipedia:Black pepper|Pepper]]{{snds}}[[Wikipedia:Curry]]{{snds}}[[Wikipedia:Saffron]]
- This will render one space on each side of the dash, and a line break will not come before one of the dashes nor will a line break come after one of the dashes as rendered here:
The template is used to connect words with an en dash but with a non-breaking space before and after the en dash. Others uses of the template "spaced en dash space" are 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 {{bull}}, {{dot}}, {{middot}}, {{spaced en dash}}, or {{spaced en dash space}} and not have to insert the • , · , · , – , or – symbols; they can use any of these templates as a simple macro. See above and right for shortcuts editors can use to easily implement this template in articles.
Dot sizes
| · | middot |
| · | bold {{middot}} |
| • | small bullet |
| • | {{bullet}} |
| • | bold bullet |
| – | {{en dash}} |
| — | {{em dash}} |
See also
- {{·}}, which produces a spaced bold Wikipedia:interpunct aka middot: " · "
- {{•}}, which produces a spaced bullet point: " • "
- {{\}}, which produces a spaced forward slash: " / "
- {{en dash}}, which produces an unspaced en dash
- {{spaced en dash}}, which produces a non-breaking space, followed by an en dash, and then a breaking space
- {{em dash}}, which produces an unspaced em dash
- Wikipedia:Non-breaking space