Wikipedia:Hyphens and dashes
|While this essay is not a Wikipedia policy or guideline itself, it is intended to supplement the Wikipedia:Manual of Style, to which editors should defer in case of inconsistency between that page and this one.|
|This page was the subject of a discussion.|
There are at least eight different horizontal dash-like characters of varying lengths defined in Unicode. Wikipedia uses four: the hyphen (sometimes called the hyphen-minus), the minus sign, the en dash, and the em dash.
Hyphen ('-', MOS:HYPHEN) (actually the hyphen-minus character in ASCII or Unicode character sets) are used in many ways on Wikipedia. They are the only short, horizontal dash-like character available as a separate key on most keyboards. They are used in names, such as 'Julia Louis-Dreyfus' or 'Sainte-Ode', and in compound modifiers, as in "hard-boiled egg". Hyphens are also used for prefixes and suffixes, such as 'mid-Atlantic' and 'shell-like'.
In some styles, minus signs are represented using an en dash instead of a minus sign or a hyphen. This is not done in Wikipedia. In math formulas a hyphen-minus codes for a minus sign, but in text '−' produces the minus sign (see below).
En dash ('–', MOS:ENDASH) are slightly longer than hyphens and are used in date ranges, such as 1849–63, and to join two names in a phrase, such as the Michelson–Morley experiment. They are also used in multi-part prefixes, such as 'post–World War II', although for those, either a hyphen or an en dash can be used; British publications use hyphens, and American publications use en dashes.
Em dash ('—', MOS:EMDASH) are even longer and are used to set aside a phrase—like this—in a sentence.
Minus sign ('−', Wikipedia:Manual of Style/Mathematics#Minus sign) are available for negative numbers such as −4 but can cause difficulties in sorts and searches.
Hyphens can be used for initial entry of any of the above, and replacement with a more precise form may be done by other subsequent editors. Disrupting Wikipedia to constantly complain about the consensus for the more precise forms can be annoying.
Computer keys for dashes
Many computer devices have special key chords (combinations of keys) which can be pressed together to enter various dash characters.
- On computers with Windows XP or Windows 7 (or similar), digits on the numeric keypad can be pressed with the Alt key held then released:
- Numeric keypad: Alt+0150 for en dash "–" or Alt+0151 for em dash "—".
- Option key: ⌥ Opt+- for en dash "–" or ⇧ Shift+⌥ Opt- for em dash "—".
- On iOS Devices, tap and hold (long press) the - on-screen key to display choices for the en dash "–" and em dash "—".
The four hyphen/dash like characters used in WP are:
- - is a hyphen-minus (ASCII keyboard or Unicode 002D) -
- − is a minus (Unicode 2212). This can also be entered from the Special characters: Symbols bar; it's between the ± and ×
- – is an en dash (Unicode 2013). This can also be entered from the Special characters: Symbols bar; it's between the m³ and —
- — is an em dash (Unicode 2014). This can also be entered from the Special characters: Symbols bar; it's between the – and …
- "Typing Special Characters – Microsoft Standard English", forlang.wsu.edu, 2011, webpage: WSU-keys.