# Theorems in a book

I would like to write a theorem in the format of a book. So I write

\documentclass[12pt]{book}


but after that I write

\begin{theom}


-
We need a miminal example. Have you defined theom by a command or did you import it from some package? –  JF Meier Oct 4 '11 at 7:34
If you search this site for theorem, you'll get a lot of relevant results. –  cmhughes Oct 4 '11 at 14:41

As a start, I would suggest reading The Not So Short Introduction to LATEX2ε. It will give some idea of what LaTeX is all about and how to format a regular document.

Specific to your question, here is a small sample of what you might be after:

\documentclass[12pt]{book}
\newtheorem{theorem}{Theorem}
\begin{document}
\chapter{First chapter}
\section{First section}
This is some text, with the following theorem.
\begin{theorem}
My first theorem. \label{mytheorem}
\end{theorem}
Theorem~\ref{mytheorem} is pretty awesome.
\end{document}


Compiling this twice (to allow for appropriate referencing), you obtain:

If you're interested in numbering your theorem differently (say, having it reset with every \chapter and have the chapter number form part of the theorem number, as in chapter.theorem), you could use:

\newtheorem{theorem}{Theorem}[chapter]


The command breakdown as well as the meaning of the parameters is available from "Help with \newtheorem".

Specific theorem-formatting packages (like ntheorem or amsthm, say) are also available that might be of help. However, this depends on exactly what kind of formatting you're after.

-
Very nice answer! –  Juan A. Navarro Oct 4 '11 at 11:28
@Werner: Why did you define the counter theorem? –  Marco Daniel Oct 4 '11 at 17:22
@Marco: Arg... that was not needed. Another instinctive measure when dealing with numbered stuff. With no complaint of an already defined counter theorem, I assumed it was necessary. I've removed it from my MWE. –  Werner Oct 4 '11 at 17:45