Skip to content
Surf Wiki
Save to docs
general/punctuation

From Surf Wiki (app.surf) — the open knowledge base

Hyphen-minus

Typographical symbol


Typographical symbol

FieldValue
mark-
unicode
different from
{{unichar2011Non-breaking hyphennlinkHyphen#Non-breaking hyphens}}
{{unichar2212Minus signnlinkPlus and minus signs#Minus sign}}
{{unichar2013En dashnlinkDash#En dash}}
{{unichar2014Em dashnlinkDash#Em dash}}
variant1
variant1 caption
variant2
variant2 caption

The symbol ****, known in Unicode as hyphen-minus, is the form of hyphen most commonly used in digital documents. On most keyboards, it is the only character that resembles a minus sign or a dash, so it is also used for these. The name hyphen-minus derives from the original ASCII standard, where it was called hyphen (minus). The character is referred to as a hyphen, a minus sign, or a dash according to the context where it is being used.

Description

in proportional and monospaced fonts In early typewriters and character encodings, a single key/code was almost always used for hyphen, minus, various dashes, and strikethrough, since they all have a similar appearance. The current Unicode Standard specifies distinct characters for several different dashes, an unambiguous minus sign (sometimes called the Unicode minus) at code point U+2212, an unambiguous hyphen (sometimes called the Unicode hyphen) at U+2010, the hyphen-minus at U+002D and a variety of other hyphen symbols for various uses. When a hyphen is called for, the hyphen-minus is a common choice as it is well known, easy to enter on keyboards, and still the only form recognized by many data formats and computer languages. Though the Unicode Standard states that the U+2010 hyphen is "preferred" over the hyphen-minus, the standard itself uses the hyphen-minus as its hyphen character.

In most modern computer fonts, the hyphen-minus is either identical or very similar to the Unicode hyphen.

In mathematical texts that include the plus sign, the Unicode minus is preferred to the hyphen-minus, because its metrics match the plus sign in level and length.

Uses

Typing

This character is typed when a hyphen or a minus sign is wanted. Based on old typewriter conventions, it is common to use a pair to represent an em dash , and to put spaces around it to represent a spaced en dash ; this practice is deprecated in professional typography. Some word processors automatically convert these to the correct dash. The character can also be typed multiple times to simulate a horizontal line (though in most cases, repeated entry of the underscore will produce a solid line). Alternating the hyphen-minus with spaces produces a "dashed" line, often to indicate where paper is to be cut. On a typewriter, over-striking a section of text with this is used for strikethrough.

Programming languages

Some programming languages use the hyphen-minus for denoting subtraction and additive inverse, often called negation in this context. It is rarely used to indicate a range, due to ambiguity with subtraction. Generally, other characters, such as the Unicode are not recognized as an operator.

In some programming languages (for example MySQL) (two hyphen-minus) mark the beginning of a comment. It can be used to start the signature block in Usenet news system. YAML uses (three hyphen-minuses) to end a section.

Command line

The hyphen-minus character is often used when specifying command-line options, a convention popularized by Unix. Examples of the "short" form are -R or . A user can specify both by using -Rq. Some implementations allow two hyphen-minuses to specify "long" option names as or . These are easier to understand when reading commands (some software does not care about the number of hyphen-minuses, and either does not allow combinations of single-letter options, or requires the user to rearrange them, so they do not match a long option). A double hyphen-minus by itself (followed by a space) indicates that there are no more options, which is useful when one needs to specify a filename that starts with a hyphen-minus. An option of just a hyphen-minus (followed by a space) may be recognized in lieu of a filename and indicates that stdin is to be read.

{{code|diff}} output

is used to denote deleted lines in diff output in the or the .

Encoding

The glyph has a code point in Unicode as . It is also in ASCII with the same value.

Explanatory notes

References

References

  1. Korpela, Jukka K.. (August 2022). ["Unicode explained"](https://books.google.com/books?id=PcWU2yxc8WkC&pg=PA382}}{{dead link). O'Reilly.
  2. "Unicode Version 1.0 · Character Blocks".
  3. "American National Standard X3.4-1977: American Standard Code for Information Interchange". National Institute of Standards and Technology.
  4. (2020). "The Unicode Standard, Version 13.0, Chapter 6.2".
  5. Korpela, Jukka. "Dashes and Hyphens § Typographic Usage".
  6. Marian, Jakub. "Hyphen, minus, en-dash, and em-dash: difference and usage in English".
  7. (2006). "InDesign Type: Professional Typography with Adobe InDesign CS2". Adobe Press.
  8. Bringhurst, Robert. (2004). "The elements of typographic style". Hartley & Marks, Publishers.
  9. (2016). "A Dictionary of Computer Science".
  10. Ritchie, Dennis. (c. 1975). "C Reference Manual".
  11. (September 2019). "Haskell 2010 Language Report".
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Hyphen-minus — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report