5

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?

2 Answers2

8

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[

Willie Wong
  • 24,733
  • 8
  • 74
  • 106
  • 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.

frabjous
  • 41,473