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.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityYou 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}
You will have to modify the \def
command for the 'tallest' variable used.
.aux
-file monkeying that will record every argument to which an \alignedvec
is applied, calculate the tallest among them, and then use that on the next pass as the height of a strut (to replace the guessing / fiddling required for the \vphantom
).
b, d, f, h, k, l, or t
would be the tallest if not the same height. (So t
is a great general choice. If you are using uppercase as vector then I
would be a good choice for the tallest.
Jun 17, 2015 at 19:55
l
which is bit higher than t
(I used only lowercase vector)
Make a new macro for making vectors, say
\newcommand\myvec[1]{\vec{\vphantom{t}#1}}
\vec{\vphantom t\smash{#1}}
should work.