Difference between revisions of "Template:Spaced en dash/doc"

From Timelines
Jump to: navigation, search
m ("e.g." → "i.e.")
(expanded)
Line 2: Line 2:
 
<noinclude>{{template doc page viewed directly}}</noinclude>
 
<noinclude>{{template doc page viewed directly}}</noinclude>
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
This template substitutes for the html markup sequence '''&amp;nbsp;&amp;ndash;''', i.e. a short dash ("&ndash;") preceded by a [[non-breaking space]]. This template is used when you want something a little stronger than the bold middot used by the {{tn|·}} template. For something even stronger than a middot, try {{tn|Mdash}}, which uses the slightly longer mdash ("&mdash;").
+
This template substitutes for the html markup sequence '''&amp;nbsp;&amp;ndash;''', i.e. a short dash ("&ndash;") preceded by a [[non-breaking space]].
 +
 
 +
== Use ==
 +
<code><nowiki>...blah{{ndash}} blah...</nowiki></code><br/><small>produces</small><br/>...blah{{ndash}} blah...
 +
 
 +
== Examples ==
 +
Two possible uses for this template are (1) to avoid linewrap before a dash within a sentence, i.e.
 +
<pre>...blah blah blah&nbsp;&ndash;
 +
blah blah...</pre>
 +
rather than
 +
<pre>...blah blah blah
 +
&ndash; blah blah...</pre>
 +
...and (2) as a stronger list separator than the bold middot used by the {{tn|·}} template. For something even stronger than <nowiki>{{ndash}}</nowiki>, try {{tn|mdash}}, which uses the slightly longer mdash character ("&mdash;").
  
  

Revision as of 07:42, 23 May 2007

Template:Template doc page viewed directly This template substitutes for the html markup sequence &nbsp;&ndash;, i.e. a short dash ("–") preceded by a non-breaking space.

Use

...blah{{ndash}} blah...
produces
...blahTemplate:Ndash blah...

Examples

Two possible uses for this template are (1) to avoid linewrap before a dash within a sentence, i.e.

...blah blah blah –
blah blah...

rather than

...blah blah blah
– blah blah...

...and (2) as a stronger list separator than the bold middot used by the {{·}} template. For something even stronger than {{ndash}}, try {{mdash}}, which uses the slightly longer mdash character ("—").