TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a simple paragraph, how do I underline a word in that paragraph?

(Note: I post this here because it wasn't really obvious using google or this site and my TexNicCenter is somehow missing this highlighting option.)

share|improve this question
One reason why it might be missing is that AFAIK underlining is traditionally not used in professional typesetting. Instead italic or bold fonts are used for highlighting. Another alternative would be colored text. In my early LaTeX days I got told to break with this "MS Word habit". Feel free to use it, I just thought it is worth mentioning. – Martin Scharrer Mar 14 '11 at 14:07
@M.Scharrer : I want to use it to highlight a part of a textTT formatted source string. Bold/emphasis typeface for textTT doesn't work very well (esp. on-screen). – Martin Mar 14 '11 at 14:37
The @ syntax uses the first three characters after it, so @M.Scharrer doesn't work. Because out both usernames start the same you need to use at least @MartinS (the space can be dropped). – Martin Scharrer Mar 14 '11 at 14:57
up vote 50 down vote accepted

Use \usepackage[normalem]{ulem} and then \uline{...}. It allows line breaks in the underlined text. Other forms of underlining (double, waves) or emphasis (crossed out, ...) are also supported. See the image in Url with fragments in bold for examples.

share|improve this answer
Excellent Info. Thanks! (Note that for simplicity's sake, I'm gonna mark the answer mentioning only \underline – Martin Mar 14 '11 at 14:38
@Martin: I would call \underline rather "partially inoperate" than just "simple" and urge you to accept either Martin Scharrer's or Ulrike's answer. (Besides, you won't get +2 rep for accepting your own answer. ;-)) – lockstep Mar 14 '11 at 14:54
When you use \uline the line will be pretty far away from the text but when you use \underline{..} everything will just look fine (this is my personal feeling about it). Comparison between both (Image 7KB) – Jonas Dralle May 14 '15 at 9:27
@JonasDralle: I guess that \uline draws the line at the maximum distance independent of the content while \underline directly uses the bounding box of the content. Test it again with content which has a depth, like the word gym. Note that \underline is AFAIK designed for math and will not break around lines. So it might be fine for single words but not for longer texts. – Martin Scharrer May 18 '15 at 21:04

Easy enough: \underline{...}

Note that this is the simplest form. See the answer by Martin Scharrer for some advanced info.

share|improve this answer
The problem with \underline is that it doesn't supports line breaks i.e. hyphenation in its content, e.g. like \mbox or better \fbox. For smaller words this might be ok, but not for longer ones or multiple words. – Martin Scharrer Mar 14 '11 at 14:00

Beside \underline you can also use the packages soul and ulem.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.