\vphantom and superscripts

The construct \vphantom is not a math operator, thus the rules for an ordinary math atom applies for the superscript. \mathop helps:

\documentclass{article}

\begin{document}
\[
  \int^S = \mathop{\vphantom{\int}}\nolimits^S
\]
\[
  \int\limits^S = \mathop{\vphantom{\int}}^S
\]
\end{document}

Result

With package amsmath an "empty" math operator can be declared with \DeclareMathOperator:

\documentclass{article}

\usepackage{amsmath}
\DeclareMathOperator*{\vint}{\vphantom{\int}}

\begin{document}
\[
  \int^S = \vint\nolimits^S
\]
\[
  \int\limits^S = \vint^S
\]
\end{document}

In case of a larger closing delimiter, \mathclose can help, e.g.:

\documentclass{article}

\begin{document}
\[
  \Biggr)^S = \mathclose{\vphantom{\Biggr)}}^S
\]
\end{document}

Superscript at invisible closing delimiter

I do not know, the reason for the question. If only a lonely higher superscript is needed, then an invisible \rule or \raisebox will help:

\documentclass{article}

\begin{document}
\[
  {}^S < \rule{0pt}{2.5ex}^S < \raisebox{3ex}{$\scriptstyle S$}
\]
\end{document}

Higher superscript


The reason is: the macro \vphantom expands to the \mathchoice primitive. This primitive puts the "choice item" to the math list. When the ^ follows, then nucleus of the atom is not created immediately before and you can read the TeXbook, page 291:

<superscript>: If the current list does not end with an atom, a new Ord atom with all fields empty is appended.

Try this:

$ \int^S, {\int}^S  % <- both creates the same result, Ord or Op is irrelevant
  \mathchoice{\int}{\int}{\int}{\int}^S % <- this emulates \vphnatom{\int}^S
  % and the empty atom is inserted (see TeXbook) like: 
  \mathchoice{\int}{\int}{\int}{\int}{}^S
  % so the result is the same as:
  {}^S
$

You can solve your problem by:

$ {\vphantom{\int}}^S $ 

because the Ord atom is created with "choice item" as nucleus.

Note: Ordinary atom is not problem, problem is \mathchoice.

Tags:

Superscripts