How do you underline text?
Also how do you underline math?
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:
\underline
which is pretty inflexibleulem
(best to load with normalem
option) and its macro \uline
(supports linebreak)soul
and its \ul
\underline{}
works for both\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!latex-project
? BTW: underlining is in my opinion not a good typography. Better use italic.