How do you use theorem environments in LaTeX?

  • Context:
  • Thread starter Thread starter karush
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
karush
Gold Member
MHB
Messages
3,240
Reaction score
5
Im in a class now the teacher wants us do do all the homework in latex

But this was in the preamble
how do you use this?

%THEOREMS ETC
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem*{defn}{Definition}
\newtheorem{cor}[theorem]{Corollary}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}{Example}
\newtheorem{examples}[theorem]{Examples}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{note}[theorem]{}
 
Physics news on Phys.org
You put this code in the preamble of the document, probably after [M]\usepackage{amsthm}[/M] or [M]usepackage{ntheorem}[/M]. In the body of the document you can say:
[latexs]
\begin{theorem}[Pythagoras; Homer Simpson's version]
The sum of the square roots of any two sides of an isosceles triangle is equal to the square root of the remaining side.
\end{theorem}
[/latexs]
and similarly for other defined environments: [M]definition[/M], [M]defn[/M] and so on. I suggest you try using these environments to see what they look like, or read the documentation for the packages mentioned above. The documentation can be found in the local installation or on ctan.org.