latex

How to Underline a Text in LaTeX

Underlining a text is not limited to only showing a website hyperlink. We underline a text to make the reader notice some specific words in a document. Underlined text attracts the reader’s attention to it. If you write any technical paper, underlining a text can highlight it for the readers.

That’s why LaTeX provides a simple way to highlight the text. However, many users don’t know the ways to underline a text. If you want to learn the approach to underlining a text, read this tutorial thoroughly.

How to Underline a Text in LaTeX

You can use the \underline{} source code to underline a text in LaTeX. Let’s start with the basic example to underline the “Official Website” in a sentence:

\documentclass{article}

\begin{document}

Please Do Check Out Our \underline{Official Website}

\end{document}

Output:

 

Let’s take another example to underline and highlight the different words in a single sentence:

\documentclass{article}

\begin{document}

\underline{LaTeX} is one of the best platforms to create \underline{technical documents} and it doesn't matter if you are new.

\end{document}

Output:

Conclusion

This is how you can easily underline a text or word while creating a technical document in LaTeX. Underlining a text is essential as it is crucial in highlighting a specific information on the document. You can easily underline a text because it only requires the \underline source code with the particular text. This information may help you include the highlighted text of the document. Check out our official website if you’d like to learn more about LaTeX.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.