Home / Tools / LaTeX / Highlight text in LaTeX

Highlight text in LaTeX

Print Friendly, PDF & Email

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

How to highlight text in LaTeX

How to highlight text in LaTeX

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 readers’ attention. How do you do this in LaTeX?.

Indeed, there exists several ways be able to you to do your need. But in this case I show you the simplest steps. It’s still pretty easy, but you’ll need to download a package named soul.

In the following paragraphs, I shall show you the steps to activate and use the functionality. Add the following to your preamble:

To highlight text in the body of your document, use:
If you want to change the highlight color, use the following command:
Otherwise, you can search and think of the interesting and cool way on Stack Exchange.

I hope this post helps you a lot. Please sharing it!


About Admin

programming all time and taking a bread for the lunch hahaha... When you are engaging your work, nobody can attract you doing another thing. Otherwise, should should move to other jobs or are not interested in your job enough.