LaTeX math overline / overrightarrow vertical alignment?

When I use the following:

\begin{equation}
\overline{d} \overline{q}
\end{equation}

the overlans are offset, the line is q smaller than the line d. The same thing happens with \ overrightarrow . Is there any way to fix this?

+3
source share
2 answers

\ vphantom can fix this:

\begin{equation}
\overline{d} \overline{q\vphantom{d}}
\end{equation}

\ vphantom inserts vertical space according to the height of its argument and has zero width.

+6
source

You can also use

\begin{equation}
\overline{\strut d} \overline{q \strut}
\end{equation}
0
source

Source: https://habr.com/ru/post/1757238/


All Articles