Possible Duplicate:
Good environment for writing math examples
How to create a new counter for an a new environment that is in sync with subsections
So I looked at the \newcommand command and I'm not quite sure how I can use that to my advantage. So I'm asking for your help :)
I am making a paper which has problems and examples in it. And I would like to have a command which will automatically make a mini text, let's say: Example 1, or Example 1.1 (according to the sections and subsections), that is bolded and in a specific color.
Currently I have the following syntax:
{\bf \color{Green}Example 3.}\bigskip
Show this and that...
{\bf \color{Emerald}Solution:}\bigskip
And this looks fine in PDF, but it get's kinda tedious. I have to watch what is the example number, and have I accidentally repeated it and so on.
The same would be for exercises.
How can I do something like that, so that I only have to write (in code) \example
or just \begin{example}.
l2tabu.\bfis obsolete. – Marco Daniel Nov 10 '11 at 09:57\newcommand{\example}[1]{\textcolor{Green}{\textbf{#1}}\bigskip}, but defining a proper headline would be better. – Martin Scharrer Nov 10 '11 at 10:10