[texhax] \newtheorem

Lars Madsen daleif at imf.au.dk
Tue Jun 7 15:19:06 CEST 2005


Patric Glöde :

> Dear TeXhax,
>
> is it possible to define \newtheorem environments such that the text
> does not appear in italics? If for example I want to define an environment
> \newtheorem{expl}{Example}[section]
> I do not want to the text to appear in italics whereas in the environment
> \newtheorem{thm}{Theorem}[section]
> itatlics are OK. It may be necessary to use the \newenvironment command
> .. is this really necessary? And is it then possible to adapt the counter to 
> the section counter?
>
> Thanks for help!
>

\usepackage{amsmath}
\usepackage[amsmath]{ntheorem}

\newtheorem{thm}{Theorem}[section] %standard setup
\theoremheaderfont{\normalfont\bfseries}
\theorembodyfont{\normalfont}
\newtheorem{expl}{Example}[section]

see the ntheorem manual for more information


> Patric Gloede
>
> PS: Another question: How can I adapt the counter of the equations to the 
> section counter (so (1.1), (1.2) and so on instead of (1), (2) ...)?
>

\usepackage{amsmath}
\numberwithin{equation}{section}


-- 

/daleif

``You cannot help men permanently by doing for them 
what they could and should do for themselves. ''
  -- Abraham Lincoln


More information about the texhax mailing list