Underline in LaTeX (\underline{xyz})

xyz‾\underline{xyz}
LaTeX command
\underline{xyz}
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Draws a rule beneath an expression, used for emphasis, lower bounds or lower integrals.

In mathematics \underline is used for lower Darboux integrals, the lower limit \underline{\lim}, lower bounds, and to mark distinguished elements; some fields underline vectors instead of using bold. It works in both text and math mode, but in text it disables hyphenation and line breaking, so it is a poor choice for emphasizing words, where \emph is preferred. The rule depth depends on descenders, so \underline{a} and \underline{y} sit at different heights; adding a \vphantom{y} to each aligns them. Its upper twin is \overline.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

lim⁡‾n→∞an≤lim⁡‾n→∞an\underline{\lim}_{n \to \infty} a_n \le \overline{\lim}_{n \to \infty} a_n
\documentclass{article}
\begin{document}
Underline: $\underline{xyz}$

\[ \underline{\lim}_{n \to \infty} a_n \le \overline{\lim}_{n \to \infty} a_n \]
\end{document}

Related symbols

All Accents at Modifiers →

Frequently asked questions

How do I write Underline in LaTeX?
Type \underline{xyz} in math mode, for example $\underline{\lim}_{n \to \infty} a_n \le \overline{\lim}_{n \to \infty} a_n$. It works in plain LaTeX without loading any package.
Which package do I need for \underline{xyz}?
None. \underline{xyz} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use \underline{xyz} in text mode, or only in math mode?
Both. \underline{xyz} compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers