Characters in mathematical mode are usually shown in italics, but sometimes especial function names require different formatting, this is accomplished by using operators defined in L a T e X .
Contents 
Trigonometrical functions, logarithms, and some others can be written in a document by means of some special commands.
The commands will print the name of the function in Roman characters instead of italics.
Some operators can take parameters that are handled in a special way, for instance, limits.
Testing notation for limits \[ \lim_{h \rightarrow 0 } \frac{f(x+h)f(x)}{h} \] This operator changes when used alongside text \( \lim_{x \rightarrow h} (xh) \).
Notice how the limit declaration can include a subscript. See the reference guide for a complete list of available operators.
Some languages may add or change some commands, check the main page for languagespecific articles.
If you need to add a personalized operator to be displayed in Roman font instead of italics use
\DeclareMathOperator
\documentclass{article} \usepackage{amssymb} \usepackage{amsmath} \DeclareMathOperator{\Mr}{M_{\mathbb{R}}} \begin{document} Userdefined operator for matrices with Real entries \[ x \in \Mr \] \end{document}
The command
\DeclareMathOperator
takes two parameters, the first one is the name of the new operator and the second one is the text to be displayed. For this command to work you have to import the package
amsmath
in the preamble with
\usepackage{amsmath}
The command can be slightly modified if you need that your defined operator uses subscripts, as the
\lim
operator, in such case use
\DeclareMathOperator*
.
Complete list of mathematical operators
Operator  Renders as 

\cos


\csc


\exp


\ker


\limsup


\min


\sinh


\arcsin


\cosh


\deg


\gcd


\lg


\ln


\Pr


\sup

sup 
\arctan


\cot

cot 
\det


\hom


\lim

lim 
\log


\sec

sec 
\tan


\arg


\coth


\dim


\liminf


\max


\sin


\tanh

For more information see