0

This question already has an answer here:

I use DeclareMathOperator all the time, but it has a side effect and creates a new definition that pollutes my namespace.

So I have a definition like this \DeclareMathOperator{\case}{case}, and then when I want to use case, I type \case.

I'd like to be able to define a function like op (e.g. \op{case}) and have that behave just like an operator created using DeclareMathOperator. For the most part, I currently use \text{...} if I'm only using something once or twice, which has the drawback that I have to explicit handle spaces myself.

Is it possible to define something like \op?

marked as duplicate by egreg, Community Jun 28 '17 at 22:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    \operatorname{case} – egreg Jun 28 '17 at 22:18
  • 4
    You have \operatorname{case}, but you shouldn't use operators only to have text in roman. You have \text or \mathrm for that. – Bernard Jun 28 '17 at 22:19

Browse other questions tagged or ask your own question.