Jump to content

Template:En/doc: Difference between revisions

From Wiki - Scioly.org
m Fixed table errors.
m Updated contents.
 
Line 1: Line 1:
: See the related template for em dashes, [[Template:Em]].
: See the related template for em dashes, [[Template:Em]].


Adds an '''en dash''' ({{en}}) inline without additional whitespace. No arguments are required. Using this template may be preferable because different lengths of dashes appear the same in monospace markup: <code></code> (em dash) vs. <code>–</code> (en dash) vs. <code>-</code> (hyphen).
Adds an '''en dash''' ({{en}}) inline without additional whitespace. No arguments are required. Using this template may be preferable because different lengths of dashes appear the same in monospace markup: <code>-</code> (hyphen, -) vs. <code>–</code> (en dash, {{en}}) vs. <code></code> (em dash, {{em}}). See the table below for correct usage of each.


__TOC__
__TOC__
=== Usage ===
=== Usage ===
{| class="wikitable"
{| class="wikitable"
! Hyphen (-)
! Hyphen
| -
| Connecting compounded words (e.g. good-looking, twentieth-century, twenty-two) or breaking long words across multiple lines
| Connecting compounded words (e.g. good-looking, twentieth-century, twenty-two) or breaking long words across multiple lines
|-
|-
! En Dash ({{en}})
! En Dash
| {{en}}
| Specifying ranges of values (e.g. 1998{{en}}present, 1{{en}}10) or distance between locations (e.g. Japan{{en}}USA)
| Specifying ranges of values (e.g. 1998{{en}}present, 1{{en}}10) or distance between locations (e.g. Japan{{en}}USA)
|-
|-
! Em Dash ({{em}})
! Em Dash
| {{em}}
| For creating separation or emphasis in clauses of sentences (e.g. Science Olympiad{{em}}the greatest activity ever{{em}}defines my life.)
| For creating separation or emphasis in clauses of sentences (e.g. Science Olympiad{{em}}the greatest activity ever{{em}}defines my life.)
|}
|}

Latest revision as of 19:02, 7 August 2020

See the related template for em dashes, Template:Em.

Adds an en dash (–) inline without additional whitespace. No arguments are required. Using this template may be preferable because different lengths of dashes appear the same in monospace markup: - (hyphen, -) vs. (en dash, –) vs. (em dash, —). See the table below for correct usage of each.

Usage

Hyphen - Connecting compounded words (e.g. good-looking, twentieth-century, twenty-two) or breaking long words across multiple lines
En Dash Specifying ranges of values (e.g. 1998–present, 1–10) or distance between locations (e.g. Japan–USA)
Em Dash For creating separation or emphasis in clauses of sentences (e.g. Science Olympiad—the greatest activity ever—defines my life.)

Execution

{{en}} - adds a single en dash (–)

Examples

Code Result
Scioly.org has been active from 1998{{en}}present.

Scioly.org has been active from 1998–present.