6

When does extra space get inserted by \operatorname? In the example below it appears extra spacing is inserted in the second and third case, but not the first. Why?

\documentclass{report}
\usepackage{amsmath}
\begin{document}
\[\operatorname{T}\{a,b\}\]
\[\operatorname{T}X\]
\[\operatorname{T}\big\{a,b\big\}\]
\end{document}
  • 2
    Last one should be \bigl\{a,b\bigr\}. – Manuel Feb 1 '15 at 11:04
10

\operatorname makes the command use the \mathop primitive to get operator spacing like \log.

TeX assigns a "class" to every atom in a math list and then adds space of various sizes between atoms of different classes. A mathop followed by an ordinary character gets a thin space but a mathop followed by a math-open (like ( ) does not. This is so that \log x gets a thin space separating the operator from the argument which is not needed in \log(x).

| improve this answer | |
  • 1
    There is a thin space in the last example because \big\{ builds an ordinary symbol and not an opening. – egreg Feb 1 '15 at 11:11
  • @egreg, is it a bug? \big\{ should be opening, shouldn't? – Sigur Feb 1 '15 at 11:15
  • 2
    @Sigur no it's a documented feature, that is why there is a \bigl command. – David Carlisle Feb 1 '15 at 11:16
  • 3
    @Sigur \bigl\{ does \mathopen{\big\{} and \bigr\} does \mathclose{\big\}}. There's also \bigm, where \bigm| does \mathrel{\big|}. Economy is the only reason for the existence of \big, which should never be used. – egreg Feb 1 '15 at 11:20

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.