Go to the first, previous, next, last question, table of contents.

Underlined text won't break

Knuth made no provision for underlining text: he took the view that underlining is not a typesetting operation, but rather one that provides emphasis on typewriters, which typically offer but one typeface. The corresponding technique in typeset text is to switch from upright to italic text (or vice-versa): the LaTeX command \emph does just that to its argument.

Nevertheless, typographically illiterate people (such as those that specify double-spaced thesis styles) continue to require underlining of us, so LaTeX as distributed defines an \underline command that applies the mathematical `underbar' operation to text. This technique is not entirely satisfactory, however: the text gets stuck into a box, and won't break at line end.

The solution is the package macros/latex/contrib/other/misc/ulem.sty, which redefines the \emph command to underline its argument; the underlined text thus produced behaves as ordinary emphasised text, and will break over the end of a line. (The package is capable of other peculiar effects, too: read its documentation, contained within the file itself.)


Go to the first, previous, next, last question, table of contents.