I have the following expression


which is awkward in the sense that as the second (sans-serif) J has a superscript that the subscripted indices are lower than usual. Using the subdepth package has the effect of aligning the indices by lowering them even in the absence of a superscript. However, I would prefer to raise the subscripts which have been lowered by the presence of a superscript.

Although How to raise a subscript? describes how one can accomplish this it requires knowing the specific amount to raise the relevant subscripts by. Ideally, I am looking for an automatic way of accomplishing this (albeit one that only needs to work for the specific case outlined above as opposed to arbitrary sub/superscripts).

2 Answers 2


Here's an emulation of what you'd get by raising the superscript. In the first line the result of


showing left the bad output and on the right the recommended one; in the second line the emulation of raising the superscript (obtained by pretending that the subscript has zero width and adding a superscript to \mathstrut:


enter image description here

Next the two examples embedded in text, in the same order; I've no doubt in choosing the first one (lowering the subscript).

enter image description here

  • I tested this (in beamer, if it matters), and mathrlap is not defined, even when importing the subdepth package. You need \usepackage{mathtools}, it seems. But even then, the final approach breaks horizontal spacing if the subscript is longer than the superscript. This can be fixed by repeating the subscript with hphantom. I ended up using {{J}_{\mathrlap{SUBSCRIPT}}{\mathstrut}^{\v{SUPERSCRIPT}}_{\hphantom{SUBSCRIPT}}}
    – MRule
    Jun 1 at 11:01

Instead of raising the subscript term in the second expression, which will make for an extremely cramped look unless you also raise the superscript term (and risk making the whole expression look top-heavy...), you may want to consider lowering the subscript term in the first expression by placing an empty "atom" -- produced by {} -- in the superscript position. Incidentally, as @egreg points out in a comment, if the superscript term to the second J-expression is taller than the character 1 (and contains, say, <whatever>), it'll be necessary to use \vphantom{<whatever>} instead of {} in the first J-expression in order to force the two subscript terms to be aligned with each other.

enter image description here

\dots\ some words $J_{ne}^{} \bm{\mathsf{J}}_{ne}^{-1}$ more words \dots
  • No phantom is necessary, just ^{} will do. May 30, 2013 at 11:59
  • A phantom might be needed for some bigger superscript to the second symbol.
    – egreg
    May 30, 2013 at 12:37

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.