Writing theorems and definitions
LaTeX provides environment for theorems, definitions, and alike. Returning to our first example in this chapter, we could define a theorem environment by:
\newtheorem{thm}{Theorem}
Then, we declare a definition environment, using an optional argument stating an existing environment with which we would like to share the numbering:
\newtheorem{dfn}[thm]{Definition}
And in this simple way, we may use these environments:
\begin{dfn} A quadratic equation is an equation of the form \begin{equation} \label{quad} ax^2 + bx + c = 0, \end{equation} where \( a, b \) and \( c \) are constants and \( a \neq 0 \). \end{dfn} \begin{thm} A quadratic equation (\ref{quad}) has two solutions for the variable \( x \): \begin{equation} \label{root} x_{1,2} = \frac{-b \pm \sqrt{b^2-4ac}}{2a}. \end{equation} \end{thm}
In the output, such environments are numbered and labeled "Theorem" and "Definition", respectively. In Chapter 10, Developing Large Documents, when we are going...