3

I have defined my own math operator (for displaying the order of certain function sequences--this is not the "normal" Big-O notation, though) by:

\newcommand{\order}[1]{\ensuremath{\operatorname{o}\left({#1}\right)}}

This leads to pretty strange spacing:

strange spacing

How can I resolve this? Is there a better way to specify the operator?

  • 1
    You mean the spacing between the “o” and the opening bracket? – Caramdir Aug 25 '10 at 16:12
7

First, I think in general it is probably a better idea to use \DeclareMathOperator rather than a combination of \newcommand and \operatorname. That said, I think your problem is because you used \left(. It should be fixed if you insert \mathopen{} before the \left(. See also Difference between \big[ and \bigl[

  • Thank you! I do not know why I did not use \DeclareMathOperator in the first place for this instance. The link about spacing is also quite helpful. – Bran the Blessed Aug 26 '10 at 17:47
2

I tend to use the spacing commands such as \mathleft for left punctuation, \mathright for right punctuation, \mathop for a "large" operator, \mathbin for a binary operator, \mathrel for a relation sign. Details on p. 75ff of Voß's Mathmode.pdf.

  • Do you mean \mathopen and \mathclose? – TH. Aug 26 '10 at 5:46

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.