# Prime symbol spacing above subscript

Desired spacing:

How can I achieve this?

What I've tried:

\documentclass[11pt]{article}
\usepackage{amsfonts,amsmath,amssymb,enumerate}

\begin{document}
$\vec{v}_f'$

$\vec{v}'_f$
\end{document}


Both result in:

Thanks.

• Welcome to TeX.SE. – Mico Nov 3 '20 at 19:32

I'd go with \vec{v}^{\,\prime}_f or even \vec{v}^{\,\prime}_{\!f}. (\, inserts positive thinspace, and \! inserts negative thinspace.)

The first screenshot shown in your posting would appear to have been generated by something close to \vec{v}^{\,\,\prime}_f. To my taste, that leaves too much space between \vec{v} and its subscript/superscript terms.

\documentclass[11pt]{article}
\begin{document}
$\displaystyle \vec{v}_f' \quad \vec{v}^{\,\prime}_f \quad \vec{v}^{\,\prime}_{\!f} \quad \vec{v}^{\,\,\prime}_f$
\end{document}

• Is there a standard for spacing in this case, i.e. which spacing is considered correct? – Bryan K. Nov 3 '20 at 20:54
• @Bryan - Not sure if there's even an agreement, let alone a standard, on what's "correct" spacing... Clearly, \vec{v}_f' not good; to my eye, \vec{v}^{\,\,\prime}_f is too loose. Depending on your preferences, either \vec{v}^{\,\prime}_f or \vec{v}^{\,\prime}_{\!f} could be "about right". Speaking entirely for myself and not claiming any kind of official support, I'd say that \vec{v}^{\,\prime}_{\!f} looks best. – Mico Nov 3 '20 at 23:25

Kerning the subscript is a question of personal judgment. On the other hand, the clash between the arrow and the prime must be dealt with.

My preferred way to remove the clash is not using the arrow altogether and replacing it with boldface for vector symbols.

If you use primed vectors a lot (that is, more than a handful of times), a macro is surely necessary. Here's a gallery. Kerning the “f” subscript might be considered, but it depends on the shapes of the base letter: with “v” it may be good, less so with “x”. Kerning should be avoided with an “a” subscript.

\documentclass[11pt]{article}
\usepackage{amsmath}

\newcommand{\vecp}[1]{\vec{#1}^{\,\prime}}
\newcommand{\vecpp}[1]{\vec{#1}^{\,\prime\prime}}

\begin{document}

\begin{gather*}

Most important is to use \vecp; when you'll decide that the arrow notation is too old-fashioned, you will simply modify your choice with a couple of lines:
\renewcommand{\vec}[1]{\bm{#1}}