Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}

and it does not compile. Can someone please help me write a theorem in a book?

share|improve this question
5  
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
1  
If you search this site for theorem, you'll get a lot of relevant results. –  cmhughes Oct 4 '11 at 14:41

1 Answer 1

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:

My first theorem

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.

share|improve this answer
    
Very nice answer! –  Juan A. Navarro Oct 4 '11 at 11:28
1  
@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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.