5.1.4 Breaking

Once an output line is full, the next word (or remainder of a hyphenated one) is placed on a different output line; this is called a break. In this manual and in roff discussions generally, a “break” if not further qualified always refers to the termination of an output line. When the formatter is filling text, it introduces breaks automatically to keep output lines from exceeding the configured line length. After an automatic break, GNU troff adjusts the line if applicable (see below), and then resumes collecting and filling text on the next output line.

Sometimes, a line cannot be broken automatically. This usually does not happen with natural language text unless the output line length has been manipulated to be extremely short, but it can with specialized text like program source code. We can use perl at the shell prompt to contrive an example of failure to break the line. We also employ the -z option to suppress normal output.

$ perl -e 'print "#" x 80, "\n";' | nroff -z
    error→ warning: cannot break line

The remedy for these cases is to tell GNU troff where the line may be broken without hyphens. This is done with the non-printing break point escape sequence ‘\:’; see Manipulating Hyphenation.

What if the document author wants to stop filling lines temporarily, for instance to start a new paragraph? There are several solutions. A blank input line not only causes a break, but by default it also outputs a one-line vertical space (effectively a blank output line). This behavior can be modified; see Blank Line Traps. Macro packages may discourage or disable the blank line method of paragraphing in favor of their own macros.

A line that begins with one or more spaces causes a break. The spaces are output at the beginning of the next line without being adjusted (see below); however, this behavior can be modified (see Leading Space Traps). Again, macro packages may provide other methods of producing indented paragraphs. Trailing spaces on text lines are discarded.23

What if the file ends before enough words have been collected to fill an output line? Or the output line is exactly full but not yet broken, and there is no more input? GNU troff interprets the end of input as a break. Certain requests also cause breaks, implicitly or explicitly. This is discussed in Manipulating Filling and Adjustment.