I am writing a mathematical report. where i need to include some examples, e.g., solving odes. is there a package which provide a good environment for writing examples?
Asked
Active
Viewed 1.5k times
3
1 Answers
9
One possibility is to add amsthm package and then add something like:
\newtheorem{example}{Example}
for the definition of the Example environment. You can adjust the counters and such things as well.
Here's a minimal example:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{example}{Example}
\begin{document}
Here is the first example:
\begin{example}
First example
\end{example}
and here's the second
\begin{example}
last example
\end{example}
\end{document}
Dror
- 22,613
amsthm, for example, will let you define a new "theorem-like" environment, i.e. it has a numbered heading ("Example 1.1") that can be referenced. – Ulrich Schwarz Apr 04 '11 at 07:15