[Tex/LaTex] How to typeset a primed vector

typographyvector

I write a vector with an arrow above the letter using \vec{p} and sometimes the vector needs to be primed using ' (or ^{\prime}, equivalently).

However, neither

\vec{p}'

enter image description here

nor

\vec{p'}

enter image description here

looks satisfactory (first option: prime dash overlaps with vector arrow, second option: arrow looks misplaced).

How would one write a primed vector?

Best Answer

Priming a vector denoted with the arrow is, as you discovered, not a really good thing to do. You want to prime the letter, not the whole construction.

\documentclass{article}
\newcommand{\pvec}[1]{\vec{#1}\mkern2mu\vphantom{#1}}

\begin{document}
$\vec{p}+\pvec{p}'=\pvec{p}''$
\end{document}

enter image description here

Related Question