How to Set Theorem Styles in LaTeX
Explanation
When a theorem environment is created with \newtheorem, by default the heading is printed in bold and the body in italics. However, for environments such as definitions or remarks, it is easier to read when the body is not italicized. The amsthm package provides three predefined styles for this purpose, and one can choose among them with the \theoremstyle command.
\theoremstyle{stylename}
Here, stylename is one of plain, definition, or remark. The differences among the three styles are as follows.
| Style | Heading | Body | Typical environments |
|---|---|---|---|
plain | bold | italic | theorem, lemma, proposition, corollary |
definition | bold | upright (roman) | definition, example, condition |
remark | italic | upright (roman) | remark, note, comment |
Since plain is the default of \newtheorem, plain is applied whenever no style is specified.
Code
\theoremstyle applies to the \newtheorem declarations that follow it. Therefore, it must be declared in advance, before defining the environments whose style you want to change. Once declared, it remains in effect until the next \theoremstyle appears.
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
With this setup, theorem and lemma are printed in the plain style, definition in the definition style, and remark in the remark style. In the document body, they are used as follows.
\begin{theorem}
\lipsum[1][1-4]
\end{theorem}
\begin{definition}
\lipsum[1][5-8]
\end{definition}
\begin{remark}
\lipsum[1][9-12]
\end{remark}
The output is as follows. One can see that the body of theorem is italicized, the bodies of definition and remark are printed upright, and only the heading of remark is italicized.

