Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What is the correct way to typeset essential supremum, with the limits underneath the operator? My first try was \operatorname{ess}\sup\limits_{x\in[0, 1]}, but this puts the x\in[0, 1] under the sup only.

The best I got was using \operatorname*{ess\,sup}_{x\in[0, 1]}, but I'm not sure if \, is the correct amount of space. Is there some way to trick \limits to working here?

share|improve this question

1 Answer 1

up vote 15 down vote accepted

The following defines an new math operator with:

  • \DeclareMathOperator{\OperatorCommand}{OperatorName} and
  • \DeclareMathOperator*{\OperatorCommand}{OperatorName} if limits are to be used.

enter image description here

\documentclass[letterpaper]{article}
\usepackage{amsmath}
% We use the starred versions since we are interested in using limits.
% You can use \thinspace if you want to use a command. If you want to use more math oriented
% commands you can use \mspace{<length in mu>} like \mspace{2mu}
\DeclareMathOperator*{\esssup}{ess\,sup}

\begin{document}
\[\esssup_{x\in[0, 1]}\]
\end{document}

The \, and \! commands are the most useful for fine tuning math formulas.

Note that \thinspace is the same thing as \,.

Spaces which are very useful can be:

  • \thinspace = \,
  • \medspace = \:
  • \thickspace = \;

Negative spaces now:

  • \negthinspace = \!
  • \negmedspace
  • \negthickspace

If we get a little bit more technical, in the amsmath.sty, we can find the definitions of the above as:

\DeclareRobustCommand{\tmspace}[3]{%
  \ifmmode\mskip#1#2\else\kern#1#3\fi\relax}

\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
\let\thinspace\,

\renewcommand{\!}{\tmspace-\thinmuskip{.1667em}}
\let\negthinspace\!

\renewcommand{\:}{\tmspace+\medmuskip{.2222em}}
\let\medspace\:

\newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}}

\renewcommand{\;}{\tmspace+\thickmuskip{.2777em}}
\let\thickspace\;

\newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}}

\newcommand{\mspace}[1]{\mskip#1\relax}

Of course, \mspace{<length>} can be used for both positive and negative spaces. For example, \mspace{1mu} and \mspace{-1mu} where mu means math unit.

Note that \, is used extensively even to define \limsup command in the amsmath package in the following manner:

\def\limsup{\qopname\relax m{lim\,sup}}

The above can be found in amsopn.sty.

share|improve this answer
    
Note that \, and friends are math spacing whereas \thinspace and co. are text spacing, which is a critical distinction (it produces errors otherwise). –  Alex Nelson Dec 10 '12 at 3:29
    
@AlexNelson Hmmm is it? I didn't know that. What errors are you talking about? –  azetina Dec 10 '12 at 3:36
    
sum was a typo. It should be sup everywhere. –  asmeurer Dec 10 '12 at 3:40
2  
@AlexNelson amsmath defines \, as \renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}. This means that +\thinmuskip (\thinmuskip=3mu=3/18em=.1667em) is used in math mode, .1667em in text mode. Furthermore, amsmath lets \thinspace to \,, so they are equal. –  Qrrbrbirlbel Dec 10 '12 at 4:16
1  
@AlexNelson The command \, can be used in both text and math mode, where it has the same behavior. Well, this is not strictly true, of which I can give a wonderful proof, but comments are too short to contain it. –  egreg Dec 10 '12 at 8:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.