[Tex/LaTex] Vertically align vector arrows

arrowsvertical alignment

I'd like to write an expression with several vectors:

$\vec{t} + \vec{a}$

I'd like the arrow to appear at the same level, but the t arrow appears higher than the a arrow. I tried with \overrightarrow but it's the same problem.

Best Answer

You can also do the following to avoid having to change any of the existing mathematical code.

\documentclass[border=5mm]{standalone}
\let\nvec\vec
\def\vec#1{\nvec{\vphantom t\smash{#1}}}
\begin{document}
$\vec{t} + \vec{a}$
\end{document}

enter image description here

You will have to modify the \def command for the 'tallest' variable used.