For a paper I am writing, I frequently need to use a superscript * before certain symbols (in math mode). I am currently using the command {}^* to do this. The spacing between the * and the symbol is often not right: for lowercase or slanted symbols (e.g. A), the spacing is far too much, whereas for other symbols it is pretty close (e.g. T). I could remove the spacing with a \!, but sometimes this will be too much, or not enough. Plus, I'd rather not have to manually set the spacing on a case by case basis.
Is there a way to automatically adjust the spacing between them based on the shape of the symbol? I tried wrapping the superscript in braces, and using the \prescript command from mathtools, but neither seemed to make a difference. See the image below.
Here's a MWE:
\documentclass[12pt]{article}
\usepackage{amssymb}
\usepackage{mathtools}
\newcommand{\N}{\mathbb{N}}
\newcommand{\h}{{}^}
\newcommand{\hhh}[1]{\prescript{}{}{#1}}
\begin{document}
$\begin{array}{cccc}
\h A & \h B & \h T & \h \N \
{\h} A & {\h} B & {\h} T & {\h} \N \
\hhh{A} & \hhh{B} & \hhh{T} & \hhh{\N} \
\h! A & \h! B & \h! T & \h! \N \
\end{array}$
\end{document}
Notice how in the first 3 rows, the * is generally too far from the following symbol. I would like it about as close as it is to the T. Using \! to remove space, it is a good distance from the B, but still too far from the A, and now too close for T and N.






\prescriptcommand frommathtoolsgive any help? – murray Jul 20 '20 at 18:45