emphdoes 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
underlinecommand 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. Two packages are available that solve this problem. The ulem package redefines the
emphcommand 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.) The soul package defines an
ulcommand (after which the package is, in part, named) that underlines running text. Beware of ulem’s default behaviour, which is to convert the
emphcommand into an underlining command; this can be avoided by loading the package with:
Go to previous question, or next question
Go to FAQ home.
URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=underline
Comments, suggestions, or error reports? - see “how to improve the FAQ”.
This is FAQ version 3.26, released on 2013-02-25.