0

How do you underline text?

Also how do you underline math?

Torbjørn T.
  • 206,688
  • 4
    \underline{} works for both – Null Apr 02 '15 at 16:33
  • 5
    In addition to Null's answer, you can use \usepackage[normalem]{ulem} with \uline{YourText} which allows line breaks as well. Or you can avoid underlining altogether as it is not very elegant solution for emphasizing! – Pouya Apr 02 '15 at 16:37
  • 2
    Your question is a little bit unspecific. And why tag latex-project? BTW: underlining is in my opinion not a good typography. Better use italic. – Mensch Apr 02 '15 at 16:56
  • 3
    We don't underline text (it's not a joke). – percusse Apr 02 '15 at 17:40
  • 1
    Some journals I have submitted to require underlining instead of italics ... The question is legit (although (s)he could easily have found the answer by googling). – Sverre Apr 02 '15 at 17:47
  • Underlining mathematics is worse than underlining text, because there is a chance that it might confuse the reader. Underlining text makes the text stick out too much, and simultaneously makes the page messier; stick with \emph{xxx} to emphasize text, please. – Benjamin McKay Apr 02 '15 at 17:47
  • @BenjaminMcKay I guess some use underlining to denote vectors. (Not saying it is good notation, but emphasis is not the only reason for using it.) user1531503: Could your question be considered a duplicate of How can I underline a single word with LaTeX? – Torbjørn T. Apr 02 '15 at 18:18
  • @Sverre Journals are responsible for much evil! – cfr Apr 03 '15 at 03:47
  • I recommend the package ulem, as it allows your underlines to break over line ends. – Thomas Weise Jul 15 '15 at 10:52

1 Answers1

3

Preface: You should really consider to use macros like \emph for emphasizing text. Underlining is from the typewriter-era and is not necessary anymore.

You have some options:

  • the macro \underline which is pretty inflexible
  • the package ulem (best to load with normalem option) and its macro \uline (supports linebreak)
  • the package soul and its \ul
TeXnician
  • 33,589