LaTeX soul - How to highlight text in a LaTeX document

Summary: Use the LaTeX soul package to highlight text in a LaTeX document.

Suppose you want to provide a highlight color or background color for text in a LaTeX document. A good example is when you want to highlight the background yellow, so it looks like it was highlighted with a marker, to catch a reader's attention. "How do you do this in LaTeX?" you ask.

Normally I like to answer "simple", but in this case there is a multi-step answer. It's still pretty easy, but you'll need to download a package named "soul".

Here are the basic steps to follow to enable text highlighting:

  • Download the LaTeX package named "soul". You can find it by searching at
  • Install that package
  • Include a statement like this in the preamble of your document so you can use the package:
  • Mark your text with a \hl command wherever you want it highlighted, like this:
    this is some \hl{highlighted text} blah blah

That's it. Use the soul package, and mark your text with the \hl command. (Note that the letters in this command are the lowercase versions of the letters 'H' and 'L', respectively.)

I've read where this command has problems occassionally, but I have not experienced those. Read the PDF that comes with the soul package for more information and other uses.

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.


soul came with my TeXShop distribution but it makes the highlighted words underlined instead. \usepackage{color,soul} fixed the problem.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.