Depending on the letter in the base there is space to the preceded superscript. Letters like T, W, Y use ink in the top left corner, so there is no space, but when using I, D, E, ... (these letters don't have a component in their top left corner) there is space in front of them.

Is there a way to fix this?


$T^b$ %no space

${}^b T$ ${}^b W$ ${}^b Y$ %no space

$I^b$ %no space

${}^b I$ ${}^b D$ ${}^b E$ %spacing between b and I, D or E

$\tensor[^b]I{}$ %doesn't help

Here is a solution which is based on (the second half of) this amazing answer by Hendrik Vogt. It works by hacking into amsmath's accent placement mechanism. I do not fully understand it.

I've defined \presup{<superscript>}{<letter>}, which does what you ask, and applied it to all of the letters you mention. I've additionally applied it to the letters "A" and "J" (which I think are the worst offenders) and to \mathcal{A}. Apart from the "T" (which now looks worse), I think these are all improvements.


\makeatletter %% <- make @ usable in command names
  \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar
  \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}%
\makeatother  %% <- revert @


    Bad: & ${}^xA^x$ & ${}^xJ^x$ & ${}^xT^x$ & ${}^xW^x$ & ${}^xY^x$ & ${}^xI^x$ & ${}^xD^x$ & ${}^xE^x$ & ${}^x\mathcal{A}^x$
    Good: & $\presup{x}{A}^x$ & $\presup{x}{J}^x$ & $\presup{x}{T}^x$ & $\presup{x}{W}^x$ & $\presup{x}{Y}^x$ & $\presup{x}{I}^x$ & $\presup{x}{D}^x$ & $\presup{x}{E}^x$ & $\presup{x}{\mathcal{A}}^x$



Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.