# How to *lower* an overline

My question is similar to these two, but all the solutions have been about raising the overline. In contrast, I would like to lower the overline so that it is the same height for all lowercase letters. For example, I'd like this

to look more like this

How could I do this?

\documentclass[12pt]{minimal}
\begin{document}
$\overline{a} + \overline{b}$
\end{document}

• Please, don't use the minimal class for examples, it's not meant for such applications. Oct 14 at 12:41
• What's it meant for then? I thought this was exactly its purpose. Oct 14 at 14:32

Smash, but keep the height of the lowercase letter and of the symbol you're typesetting.

\newcommand{\lowoverline}[1]{%
\overline{\smash{#1}\vphantom{x}}\vphantom{#1}%
}


Full example.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\lowoverline}[1]{%
\overline{\smash{#1}\vphantom{x}}\vphantom{#1}%
}

\begin{document}

\begin{equation*}
\lowoverline{a}+\lowoverline{b}
\end{equation*}

\end{document}


You can similarly define \lowbar, which I deem preferable.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\lowoverline}[1]{%
\overline{\smash{#1}\vphantom{x}}\vphantom{#1}%
}
\newcommand{\lowbar}[1]{%
\bar{\smash{#1}\vphantom{x}}\vphantom{#1}%
}

\begin{document}

\begin{equation*}
\lowoverline{a}+\lowoverline{b}
\lowbar{a}+\lowbar{b}
\end{equation*}

\end{document}


By smashing things. In the following example, the argument b is vertically smashed (its height doesn't count). The \lowoverline gets its height from the optional argument, which defaults to a. This argument is horizontally smashed and made invisible by \phantom.

\documentclass{article}
\usepackage{mathtools}
\newcommand\lowoverline[2][a]{\ensuremath\overline{{\smash{#2}\vphantom{#1}}}}
\begin{document}
$$\overline{a}\quad \lowoverline{b}$$
\end{document}


Edited: my original code used \mathclap{\phantom{#1}}, but Jordan Mitchell Barrett and egreg pointed out the simpler alternative \vphantom{#1}.

• Beat me to it! :) Oct 14 at 12:04
• Why \mathclap{\phantom{#1}} when \vphantom{#1} suffices? Oct 14 at 12:37
• @egreg --- Indeed; see my comment to the OP's answer. Oct 14 at 13:09

You can use \smash{b} to set the height of b to zero, and then \vphantom{a} to make something with zero width and the height of an a.

\documentclass[12pt]{minimal}
\newcommand{\ol}[1]{\overline{\smash{#1}\vphantom{a}}}

\begin{document}
$\overline{a} + \overline{b}$

$\ol{a} + \ol{b}$
\end{document}

• I always forget about \vphantom. Oct 14 at 12:02
• Shouldn't it be \vphantom{#1}? Oct 14 at 12:39
• @egreg: no, because you want the overline to be the same height as the "a", rather than whatever's provided. Oct 14 at 14:33
• OK, I explained wha I meant in my answer. Oct 14 at 15:57