12

I'm trying to write $\sup' S$ -- that is to say, $\sup S$ but with a prime on the sup. However, in display style, this comes out instead with the prime on top of the sup instead of in the superscript position. Presumably this is because LaTeX reads it as a superscript, and in display style, superscripts go on top of \sup just as subscripts go below it. How can I actually write sup' S and have it come out right?

Thank you!

  • {\textstyle \sup^S}? – John Kormylo Dec 31 '15 at 2:41
  • \[\mbox{\ensuremath\sup}' S \] – Fran Dec 31 '15 at 2:53
7

You can drop in a \nolimits

\documentclass{article}
%\usepackage{amsmath}
\begin{document}
 \[\sup' S\]
 \[\sup\nolimits' S \]
\end{document}
4

Define a new operator:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\psup}{sup^{\prime}}

\begin{document}
\[
\psup_{x>0}f(x)\ne\sup_{x>0}f(x)
\]
\end{document}

enter image description here

It's just a bit more complicated if you want that the limit is centered with respect to “sup” disregarding the prime:

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\psupop}{\hphantom{^{\prime}}sup^{\prime}}
\DeclareRobustCommand\psup{%
  \mathop{}\!{\mathpalette\psupadjust\relax}\!\psupop}

\makeatletter
\newcommand{\psupadjust}[2]{%
  \sbox\z@{$\m@th#1{}^{\prime}$}%
  \kern-\wd\z@
}
\makeatother

\begin{document}
\[
a+\psup_{x>0}f(x)_{\psup A}\ne a+\sup_{x>0}f(x)_{\sup A}
\]
\end{document}

I insert an empty math operator for fixing the spacing, then a negative thin space, a negative kern as wide as a prime, another negative thin space for neutralizing the one inserted by \psupop (which has at its left an empty space as wide as a prime).

enter image description here

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.