How do you use theorem environments in LaTeX?

  • MHB
  • Thread starter karush
  • Start date
In summary, the conversation discusses the usage of code in the preamble of a document for creating theorems, definitions, and other mathematical environments. The speaker recommends using certain packages and provides an example of how to use these environments in the body of a document. They also suggest reading the documentation for more information.
  • #1
karush
Gold Member
MHB
3,269
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
  • #2
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.
 

FAQ: How do you use theorem environments in LaTeX?

What does "But this was in the preamble" mean?

The phrase "But this was in the preamble" typically refers to a statement or idea that is mentioned in the introduction or opening of a document or speech. It can also be used to indicate that something was previously mentioned or stated.

Why is it important to pay attention to the preamble?

The preamble of a document, such as a constitution or contract, often outlines the purpose and principles upon which the rest of the document is based. It is important to pay attention to the preamble as it can provide context and understanding for the rest of the document.

What information is typically included in a preamble?

A preamble can include the date, location, and individuals involved in creating the document, as well as the reasons and goals for creating it. It may also include any relevant historical or cultural context.

Can the preamble be changed or amended?

In most cases, the preamble of a document is considered to be an introductory statement and is not subject to change or amendment. However, in some cases, a document may have a separate amendment process for the preamble.

Is the preamble legally binding?

In some cases, the preamble of a document may have legal significance and may be used to interpret the rest of the document. However, in most cases, the preamble is not legally binding and is simply an explanatory statement.

Similar threads

Replies
4
Views
3K
Replies
2
Views
7K
Replies
7
Views
3K
Replies
4
Views
2K
Back
Top