Protected hyphen

from Wikipedia, the free encyclopedia

The protected hyphen or not umbrechende hyphen ( English non-breaking hyphen ) is used, a word wrap for a hyphen to prevent, for example, in " i-point " or " joint-s ".

For more information about web usage, see the Web Typography article .

use

The line break is to be avoided above all if the separated component would be very short (as with single letters, abbreviations or numbers): k-factor, X-Ray , Z-Plan , ε-environment or 99-day Kaiser . In the last example, the first hyphen would have to be protected, while the second hyphen could be separated from words . Even with certain formulas, such as in chemistry, it makes sense to ensure that the components are connected.

Protected hyphens are also useful in connection with non-breaking spaces if automatic line breaks are to be reliably prevented. The behavior of a non-breaking hyphen directly before or after an unprotected space (for example in "font and size") is not clear, as this creates a conflict between the separation rules. The Internet Explorer , for example, then also protects the space, other web browser only the hyphen. The standard behavior of the Unicode line break algorithm allows a break at this point.

Coding

In the international Unicode character coding system , the "-" character is in the following position:

  • U + 2011 “Non-breaking Hyphen” (hyphen, no line break).

Generation in text software

  • To be generated in OpenOffice , LibreOffice and StarOffice using Strg+ Umschalt+ ; appears in the text with a gray background.
  • In Microsoft Word for Windows also with Strg+ Umschalt+ . Alternatively (only in Microsoft Word) the Unicode number "2011" can be entered and converted into the character with the key combination Alt+ C. This conversion works in both directions and is therefore also suitable for checking whether a character is a normal (U + 002D), conditional hyphen (U + 00AD) or protected hyphen (U + 2011).
  • In LaTeX using the babel package with the language option [ngerman], a protected hyphen is also "~created. Example: 99"~Tage-Kaiser. An alternative to this is \hbox{-}.
  • In HTML it can be generated with the character string ‑(decimal) or ‑( hexadecimal ). A named character entity like the non -breaking space (  ) does not exist for the non-breaking hyphen.

In other programs, entering a protected hyphen is often only possible via the clipboard .

Generation on Windows operating systems

  • Under Windows , the protected hyphen is generated using Alt+ 8209(the digits must be entered on the numeric keypad). Not all programs can process this Unicode character.

Generation on Apple operating systems

  • In macOS , the protected hyphen is generated using cmd+ Umschalt+ .

Generation on Linux systems

Under most modern Linux systems with UTF-8 character encoding, the "-" character can be generated using Strg+ Umschalt+ U+ "2011".

Availability

If you only use the symbol internally, this is not a problem. If, on the other hand, you have no influence on which fonts are installed in the reader (such as in connection with HTML documents on web servers), use is not advisable: the viewer often sees a substitute character (such as ) instead of the dash, because the Character is not included in the available fonts. If you create PDF documents with less common characters, the fonts should be included in the file.

See also