Automatic line break

from Wikipedia, the free encyclopedia

Automatic word wrap is a software -side function, the line breaks to showcase digital texts according to the presentation and to maintain a nearly uniform line length. A hard line break is against a fixed predetermined line end marker and is in desktop publishing as a sales interpreted (paragraph mark, English. Pilcrow , symbol: ), the soft line break (symbol: ↵) while forcing new line that interrupts paragraph formatting does not, however, . In contrast to these two, there is no control character for automatic line break - but there is also the expression soft carriage return .

Function of upheaval

The break must automatically adapt to the circumstances:

  • If the text is changed (inserted or deleted) in the preceding text of the paragraph ,
  • when changing the available line width,
  • when the font properties change, i.e. when characters become narrower or wider in relation to the line width.

The line break is only a temporary representation on the respective output medium under the current conditions; the actual (source) text is not changed. There may be deviations if a non-existent hyphenation option in the word on the right edge of the paragraph forces the premature break . Experts speak of flutter paragraph , in contrast to justified formatting. The text formatting is described in more detail ; control characters can also be used to set the alignment on the right or left edge of the line.

The automatic break is also referred to as the "flow of text" and forms one of the central framework conditions in web design : Because the programmer does not know the characters per line on his reader's screen, fixed text flow formatting is not possible there.

Text capture

If the publication aims at a fully-wrapped document (for example, printout on paper or creating a PDF file), the line break should be displayed as you enter it (layout corresponds to output, English What you see is what you get (WYSIWYG) ) manually prevent unwanted separations using the HTML tag <nobr> or agree on additional separating options .

Under the conditions of web typography , all variants of the line width must be taken into account and unwanted tearing apart of connected parts as well as new creations of compound words in German must be specially processed from the outset for the automatic break.

Line separation

After exhausting the available line width, the respective software tries to find a separation option as close as possible to the edge (within an edge area, for example one centimeter).

This can be:

  1. a space (including a space )
  2. an existing hyphen
  3. a manually specified separation option ( conditional separator , also called "soft separator")
  4. an automatic word breaker

In cases 3 and 4, a dividing line is inserted into the representation on the output medium ( screen , printout , etc.). There are algorithms such as the Unicode line break algorithm for the precise determination of the possible break points .

For the automatic word separation at the end of the line, it is necessary that the language of the text passage is declared and that orthographic rules for word separation, but also digital dictionaries for recognizing compound words at the time of presentation, are available for this language .

If justified , the line is then excluded .

Unwanted line separation

Occasionally, related groups of characters should not be torn apart even though they contain spaces or hyphens .

The following are available for this:

Coherent areas can be achieved, for example, in HTML or CSS using an <pre>element or attribute white-space: nowrap. In wiki syntax unwanted automatic to avoid line breaks, the Template: nowrap be used.


  • 5 m ( protect spaces between numerical value and unit symbol )
  • Bank code 100 100 10 (protect spaces between the groups of numbers)
  • pq formula (no separation by the hyphen between "p" and "p")
  • 3 + 6 = 5 + 4 (contiguous area)


The high school of line breaks in typography is to achieve a similar space between words in the successive lines, so that a uniform gray value is created for the text passage. This is overwhelming for most programs for the PC area, but is provided by the free TeX program and professional typesetting systems.

See also