# Awkward spacing with primes and commas in subscripts

Putting primes and commas together in subscript results in awkward spacing --- the space between a primed item and the following comma is exceedingly large compared to the space after.

The same happens with any superscripts in subscripts, but with primes this is especially jarring.

This does not occur outside of subscripts. Is there any simple remedy?

MWE:

\documentclass[12pt]{article}
\begin{document}
{
\Huge
$f_{a,b',c}\quad a, b', c$
}
\end{document}


• f_{a,b'\!,c} would be an easy fix. Actually this does happen in textstyle also; it's just not as noticible. You can use a, b'\!, c there as well. Mar 19 at 22:00
• Just a simple curiosity. Why do you use \Huge{...} out the math-formula? Mar 19 at 22:03
• @SandyG: sure, sure, but I meant something less ad hoc. Doing this sort of thing once is okay, but maintaining a longer document where you have lots of primed subscripts this way would be a nightmare. Mar 19 at 22:03
• @Sebastiano: So it's easier to see the result without zooming. Mar 19 at 22:03
• the braces after \Huge though are misleading as the font size applies to the whole document not just the brace group, although not clear here as there is nothing after } Mar 19 at 23:06

You can use from amsmath, the command \negthickspace.

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
$f_{a,b'\negthickspace,c}\quad a, b', c$

\end{document}


• Thanks, this looks much better (and also a bit nicer than the vanilla \! solution), but I was wondering if there is a solution that would not require typing an extra command for every single prime comma combination (like a package that would just magically do this). Mar 20 at 0:11
• @tomasz It is possibile but or we use a \newcommand or we must use very complicated strategies that I don't know about. Mar 20 at 20:26
• You can see, for example, here in this link with any package that I not know the mechanicism: tex.stackexchange.com/questions/444038/… or Mar 20 at 20:33