Welcome to our community

Be a part of something great, join today!

Theorem environment


Well-known member
MHB Math Scholar
Mar 10, 2012
I copied the following from a website:

\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newcommand{\qed}{\nobreak \ifvmode \relax \else
\ifdim\lastskip<1.5em \hskip-\lastskip
\hskip1.5em plus0em minus0.5em \fi \nobreak
\vrule height0.75em width0.5em depth0.25em\fi}
Using this the theorems get automatically numbered. But the statement of the theorems is always in italics. What modifications I can make in the above code to avoid this?


Well-known member
MHB Math Scholar
Jan 30, 2012
Re: theorem environment

There are two packages that extend plain LaTeX's theorem facilities: amsthm and ntheorem. They allow defining numbered and unnumbered theorem-style environments with different styles. They also define the proof environment. There are several predefined styles, of which, I believe, the style definition makes the text upright. To use it, say "\theoremstyle{definition}" before "\newtheorem".

For a description of amsthm, see Wikibooks. For a comparison of amsthm and ntheorem, see StackExchange. Once you decide which package to use, read its documentation, which can be found in CTAN, for example.

When dealing with theorems, I also found it useful to have a reference command that not only inserts the theorem's number, but also typesets the word "Theorem", "Definition", etc. This way, when you change the environment around a particular statement, say, from theorem to proposition, you don't have to update all places where you refer to this statement. There are several packages, including hyperref and ntheorem, that provide versions of the "\ref" command that also typeset the statement's type. However, when I looked into this several years ago, there was a problem combining this feature with sharing a counter between several statement types, e.g., having "Theorem 1" followed by "Definition 2" instead of "Definition 1". If anyone knows a convenient way to do this, I would like to know. I can also share the trick that I was using to solve this.


Well-known member
Feb 1, 2012
Re: theorem environment

It depends on how nice you want your theorems to look. Here is a theorem I have in some notes:

Even though the far left line for the box doesn't show, it appears when printed. I have no idea why the pdf glitches and does that some times.
Last edited: