zaro

How to Underline Text Using `\underline`

Published in LaTeX Text Formatting 1 min read

In LaTeX, you can underline text using the \underline command.

The most common and straightforward method to underline text in LaTeX is by using the built-in \underline{} command. This command takes the text you wish to underline as its argument.

Syntax

The basic syntax is very simple:

\underline{Your text goes here}

Whatever text you place inside the curly braces {} will be underlined in the output document.

Example

As referenced, you can see the \underline command in action like this:

Some of the greatest discoveries in \underline{science} were made by accident.

In this specific example, the word "science" will be rendered with an underline beneath it in the final document.

You can easily open this LaTeX fragment in an online editor like Overleaf to see how it compiles.

Using \underline is a quick way to emphasize short phrases or words in your document.