I need to introduce an example in the text I am writting (in the same way as we introduce definitions, theorems and so on)
I have tried \begin{example} but such function did not work.
How do I do it that so that the example will be numberized as well (in the same way as for definitions)?
Thank you!
Text Formatting ⇒ introduce example
NEW: TikZ book now 40% off at Amazon.com for a short time.

introduce example
This is explained in the documentation for the amsthm package:
If you want the examples to be numbered by section you'd use
in the preamble.
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\newtheorem{example}{Example}
\begin{document}
\begin{example}
For example, this is an example.
\end{example}
\end{document}
Code: Select all
\newtheorem{example}{Example}[section]