How do you use theorem environments in LaTeX?

  • Context: MHB 
  • Thread starter Thread starter karush
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on utilizing theorem environments in LaTeX, specifically through the use of the amsthm or ntheorem packages. Key commands include \newtheorem for defining various theorem types such as Theorem, Lemma, and Definition, which should be placed in the document's preamble. An example provided illustrates the use of the theorem environment with a specific theorem statement. Users are encouraged to experiment with these environments and consult the documentation available on ctan.org for further guidance.

PREREQUISITES
  • Familiarity with LaTeX document structure
  • Understanding of LaTeX packages, specifically amsthm and ntheorem
  • Knowledge of theorem types and mathematical notation
  • Basic skills in editing LaTeX documents
NEXT STEPS
  • Explore the amsthm package documentation for advanced theorem styling options
  • Learn about the ntheorem package for additional theorem formatting capabilities
  • Practice creating custom theorem environments in LaTeX
  • Investigate LaTeX templates that incorporate theorem environments for homework or projects
USEFUL FOR

Students, educators, and researchers who need to format mathematical content in LaTeX, particularly those working on assignments or publications that require structured theorem presentations.

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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 31 ·
2
Replies
31
Views
4K