Taking an example from category theory, given a category "C", the opposite category is usually denoted "C^op". Where "op" is an abbreviation for opposite. Now there are three ways to put this in latex:

  • As C^{op}
  • As C^\operatorname{op}
  • As C^\text{op}

While I wouldn't use the first one, thw second and third both make sense to me in some way. So is their a convention which one should use, and if so, what's the reasoning behind it


The first one might not be a good idea, like you already noticed, because op could be mistaken for o⋅p. But I don’t think the other options are correct either.

\operatorname{op} puts correct spacing around keywords, when used as mathematical operators. That is not the case here.

\text{op}, at least syntactical, means prose. But you are trying to display mathematical notation.

So I think the best way is to use \mathrm{op}. Or still better, define


and use it as \opcat{C}.

  • 2
    7 seconds slower (but we agree on the answer:-) – David Carlisle Feb 12 '14 at 14:39
  • 1
    @DavidCarlisle: Indeed, congratulations, you have my upvote ;-) – bodo Feb 12 '14 at 14:40
  • 1
    Likewise, you have mine:-) – David Carlisle Feb 12 '14 at 14:44
  • I would argue for the use of \text, due to its font-preserving properties, and the fact that the label (not an index) is actually text. You're not merely marking up some mathematical symbols in a Roman font, you're indicating the presence of a standard vernacular word or abbreviation thereof. – Xerxes Feb 12 '14 at 18:36
  • 1
    @Xerxes I'd strongly disagree here op is not an abbreviation for a natural language vernacular word; it is a specific categorical operator which just happens to use a superscript rather than prefix notation. It should not pick up the surrounding text font any more than log or sin should. – David Carlisle Feb 13 '14 at 10:40

Definitely not ^{op} the math italic font should never be used for multi-letter identifiers.

^\operatorname{op} (by default) uses the same font as \mathrm with \mathop spacing (the same as \log or \sin. The \mathop has no effect in the usage shown but would in other contexts.

^\text{op} (with the amsmath definition of \text) will make a mathord, using the current text font.

Probably I would use (a macro defined as) \mathrm{op} so that it uses the \mathrm font with mathord spacing.

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.