3

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?

Martin Scharrer
  • 262,582
Mia
  • 1,151
  • 2
    What in particular would you expect this package to do? 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
  • @Ulrich. Thanks Schwarz. Can you please post the latex-source. The document will contain lots of "examples" (e.g. solving a ode, solving a matrix equation). It is a very common thing. Is there a package to achieve it? Thanks again for your time. – Mia Apr 04 '11 at 07:47

1 Answers1

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