1

When a superscript is placed inside a subscript, its relative position to the "base" becomes different, as shown by the following MWE:

\documentclass{article}
\usepackage{amsmath}

\newcommand\inset{L^-}

\begin{document}

\[
\inset \text{ vs. } \int_{l \in \inset}
\]

\end{document}

enter image description here

I was wondering if there is a way to define the macro so that it looks the same in subscripts?

  • 1
    In the latter case, the symbol occurs in "cramped" scriptscript style; in the former, it occurs in non-cramped script style. The solution consists of forcing non-cramped script style for the latter case. – Mico Mar 31 '18 at 1:29
3

By default, the superscript-- symbol is in "cramped scriptscriptstyle" in the second example, but in (non-cramped) scriptstyle in the first. To change the second case to the non-cramped style, add a \scriptstyle directive ahead of l\in\inset.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\newcommand\inset{L^{-}}
\begin{document}
\[
\inset \text{ vs.\ } \int_{\scriptstyle l\in\inset}
\]
\end{document}
0

enter image description here

Use \vphantom{x} as a virtual subscript for L and you are good.

\documentclass{article}
\usepackage{amsmath}

\newcommand\inset{L^-}
\newcommand\insetv{L_{\vphantom{x}}^{-}}


\begin{document}

\[
\inset \text{ vs. } \int_{l \in \insetv}
\]

\end{document}
  • 1
    not quite the same. the insertion of the \phantom causes the superscript to shift ever so slightly to the right. try placing the phantom subscript after the superscript. – barbara beeton Mar 31 '18 at 1:11

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.