[Tex/LaTex] Define additional math operators to be typeset in roman


Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including \max, \min, and \log. How can I define additional such commands?

Best Answer

\DeclareMathOperator{\foo}{foo} and \DeclareMathOperator*{\hocolim}{hocolim} for sub- and superscripts in the limits position.

This requires


which is recommended for math documents anyway.

Minimal example:




Example of $\foo(x)$ and $\foo x$.

Example of $\hocolim_{x\in X} f(x)$ and displayed
\hocolim_{x\in X} f(x)


enter image description here

Related Question