Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Hyphen
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Use in computing<span class="anchor" id="In computing"></span> == {{Refimprove section|date=November 2020}} === Hyphen-minuses === {{Main|Hyphen-minus}} In the [[ASCII]] character encoding, the hyphen (or minus) is character 45<sub>10</sub>.<ref>{{cite book |last=Haralambous |first=Yannis |title=Fonts & Encodings |publisher=O'Reilly Media |date=2007 |isbn=978-0596102425 |page=29 |chapter=ASCII}}</ref> As [[Unicode]] is identical to ASCII (the 1967 version) for all encodings up to 127<sub>10</sub>, the number 45<sub>10</sub> (2D<sub>16</sub>) is also assigned to this character in Unicode, where it is denoted as {{nowrap|{{unichar|002D|HYPHEN-MINUS}}}}.<ref>{{cite book |title=Unicode Version 1.0 · Character Blocks |page=30 |chapter-url= https://www.unicode.org/versions/Unicode1.0.0/ch03_1.pdf |chapter=3.1 General scripts |quote='''Loose vs. Precise Semantics.''' Some ASCII characters have multiple uses, either through ambiguity in the original standards or through accumulated reinterpretations of a limited codeset. For example, 27 hex is defined in ANSI X3.4 as apostrophe (closing single quotation mark; acute accent), and 2D hex as hyphen minus.}}</ref> Unicode has, in addition, other encodings for minus and hyphen characters: {{nowrap|{{unichar|2212|minus sign}}}} and {{nowrap|{{unichar|2010|hyphen}}}}, respectively. The unambiguous {{slink||"Unicode hyphen"}} at U+2010 is generally inconvenient to enter on most keyboards and the glyphs for this hyphen and the hyphen-minus are identical in most fonts ([[Lucida Sans Unicode]] is one of the few exceptions). Consequently, use of the hyphen-minus as the hyphen character is very common. Even the [[Unicode Standard]] regularly uses the hyphen-minus rather than the U+2010 hyphen. The hyphen-minus has limited use in indicating subtraction; for example, compare {{char|1=4+3−2=5}} (minus) and {{char|1=4+3-2=5}} (hyphen-minus) — in most typefaces, the [[glyph]] for hyphen-minus will not have the optimal width, thickness, or vertical position, whereas the minus character is typically designed so that it does. Nevertheless, in many spreadsheet and programming applications the hyphen-minus must be typed to indicate subtraction, as use of the Unicode minus sign will not be recognised. The hyphen-minus is often used instead of dashes or minus signs in situations where the latter characters are unavailable (such as [[type writer|type-written]] or ASCII-only text), where they take effort to enter (via [[dialog box]]es or multi-key [[keyboard shortcut]]s), or when the writer is unaware of the distinction. Consequently, some writers use two or three hyphen-minuses ({{code|--}} or {{code|---}}) to represent an em dash.<ref>{{cite book |title = The elements of typographic style |edition = third |first = Robert |last = Bringhurst |publisher = Hartley & Marks, Publishers |year = 2004 |isbn = 978-0-88179-206-5 |page = 80 |access-date = 10 November 2020 |url=https://archive.org/details/isbn_9780881791327/page/80/mode/2up |quote=In typescript, a double hyphen (--) is often used for a long dash. Double hyphens in a typeset document are a sure sign that the type was set by a typist, not a typographer. A typographer will use an em dash, three-quarter em, or en dash, depending on context or personal style. The em dash is the nineteenth-century standard, still prescribed in many editorial style books, but the em dash is too long for use with the best text faces. Like the oversized space between sentences, it belongs to the padded and corseted aesthetic of Victorian typography.}}</ref> In the TeX typesetting languages, a single hyphen-minus (<code>-</code>) renders a hyphen, a single hyphen-minus in math mode (<code>$-$</code>) renders a minus sign, two hyphen-minuses (<code>--</code>) renders an en dash, and three hyphen-minuses (<code>---</code>) renders an em dash. The hyphen-minus character is also often used when specifying [[command-line option]]s. The character is usually followed by one or more letters that indicate specific actions. Typically it is called a dash or switch in this context. Various implementations of the [[getopt]] function to parse command-line options additionally allow the use of two hyphen-minus characters, {{code|--}}, to specify long option names that are more descriptive than their single-letter equivalents. Another use of hyphens is that employed by programs written with [[Pipeline (Unix)|pipelining]] in mind: a single hyphen may be recognized [[wikt:in lieu|in lieu]] of a filename, with the hyphen then serving as an indicator that a [[standard streams|standard stream]], instead of a file, is to be worked with. === Soft and hard hyphens === {{Further|Soft hyphen}} Although software ([[hyphenation algorithm]]s) can often automatically make decisions on when to hyphenate a word at a line break, it is also sometimes useful for the user to be able to insert cues for those decisions (which are dynamic in the online medium, given that text can be [[Reflowable document|reflowed]]). For this purpose, the concept of a [[soft hyphen]] (discretionary hyphen, optional hyphen) was introduced, allowing such manual specification of a place where a hyphenated break is ''allowed'' but not ''forced''. That is, it does not force a line break in an inconvenient place when the text is later reflowed. Soft hyphens are inserted into the text at the positions where hyphenation ''may'' occur. It can be a tedious task to insert the soft hyphens by hand, and tools using hyphenation algorithms are available that do this automatically. Current modules{{which|date=February 2021}} of the [[Cascading Style Sheets]] (CSS) standard provide language-specific hyphenation dictionaries. In contrast, a hyphen that is always displayed and printed is called a {{Anchor|hard hyphen}}"hard hyphen". This can be a Unicode hyphen, a hyphen-minus, or a nonbreaking hyphen (see [[#Nonbreaking hyphens|below]]). Confusingly, the term is sometimes limited to nonbreaking hyphens.{{cn|date=October 2022}} === Nonbreaking hyphens <span class="anchor" id="non-breaking hyphen"></span> <span class="anchor" id="nonbreaking hyphen"></span> <span class="anchor" id="no-break hyphen"></span>=== <!-- Section header used as link target in redirects --> The [[word segmentation]] rules of most text systems consider a hyphen to be a [[word boundary (linguistics)|word boundary]] and a valid point at which to break a line when flowing text. This is not always desirable, it could lead to ambiguity (e.g. ''retreat'' and ''re‑treat'' would be indistinguishable with a line break after ''re''), it can split off an ending as in "''n''{{nbh}}th" (though ''n''<sup>th</sup> or "''n''th" could be used), and it is inappropriate in some languages other than English (e.g., a line break at the hyphen in [[Irish language|Irish]] {{lang|ga|an t‑athair}} or [[Romanian language|Romanian]] {{lang|ro|s‑a}} would be undesirable). The '''non-breaking hyphen''', '''nonbreaking hyphen''', or '''no-break hyphen''' looks identical to the regular hyphen, but word processors do not break words at it. The [[nonbreaking space]] exists for similar reasons. ==="Unicode hyphen" <span class="anchor" id="Unicode hyphen"></span> === Because the conventional ''hyphen-minus'' mark on keyboards is ambiguous (it can be interpreted{{snd}} sometimes unexpectedly{{snd}} as a hyphen or a minus, depending on context), in addition the [[Unicode consortium]] allocated [[codepoint]]s for an unambiguous minus and an unambiguous hyphen. The Unicode hyphen ({{unichar|2010|hyphen}}) is seldom used. Even the [[Unicode Standard]] uses U+002D instead of U+2010 in its text.<ref>{{cite web|last=Korpela|first=Jukka K.|title=Dashes and hyphens|date=December 2020|url=https://jkorpela.fi/dashes.html#usage|website=IT and Communication}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Hyphen
(section)
Add topic