Alan Isaac
2008-02-26 21:08:40 UTC
I wanted to color a theorem environment
and precede it with a rule, so I tried:
\newtheorem{xmplint}{Example}
\newenvironment{xmpl}[1][1]{%
\noindent\color{xmpl}\hrulefill
\begin{xmplint}[#1]
}{
\end{xmplint}
}
This does not quite work, most obviously if
I do not pass an optional paramter. (It is
as if I passed a value of 1?)
Can I nicely pass the optional parameter?
Thanks,
Alan Isaac
and precede it with a rule, so I tried:
\newtheorem{xmplint}{Example}
\newenvironment{xmpl}[1][1]{%
\noindent\color{xmpl}\hrulefill
\begin{xmplint}[#1]
}{
\end{xmplint}
}
This does not quite work, most obviously if
I do not pass an optional paramter. (It is
as if I passed a value of 1?)
Can I nicely pass the optional parameter?
Thanks,
Alan Isaac