[Tex/LaTex] \vphantom and superscripts

superscripts

The superscripts position is exactly the same for these two statements:

\vphantom{\int}^S and {}^S

How can I get the superscript higher up?

Edit

The \intis just an example. Here is another one: \vphantom{)}^S and )^S.

Best Answer

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

Related Question