ntheorem with the [amsthm] option ignores styling of a theorem environment
It is possible to "lift" the proof
environment code from ntheorem
:
\documentclass{article}
\usepackage[thmmarks]{ntheorem}% http://ctan.org/pkg/ntheorem
\makeatletter
\newcommand{\openbox}{\leavevmode
\hbox to.77778em{%
\hfil\vrule
\vbox to.675em{\hrule width.6em\vfil\hrule}%
\vrule\hfil}}
\gdef\proofSymbol{\openbox}
\newcommand{\proofname}{Proof.}
\newcounter{proof}\newcounter{currproofctr}\newcounter{endproofctr}%
\newenvironment{proof}[1][\proofname]{
\th@nonumberplain
\def\theorem@headerfont{\itshape}%
\normalfont
%\theoremsymbol{\ensuremath{_\blacksquare}}
\@thm{proof}{proof}{#1}}%
{\@endtheorem}
\makeatother
\theoremstyle{plain}
\theoremheaderfont{\normalfont\itshape}
\theorembodyfont{\normalfont}
\newtheorem*{myenv}{Note}
\begin{document}
\begin{myenv}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\begin{proof}
This statement is true, because the fox did jump over the lazy dog.
\end{proof}
\end{myenv}
\end{document}
The QED-symbol is displayed when using the thmmarks
package option of ntheorem
. In ntheorem
this is manually defined in \openbox
, and subsequently used as \proofSymbol
.
The package documentation answered as follows:
3.2.2 amsthm
Here, the user has to express his definitions by the
\newtheoremstyle
command provided byntheorem.sty
, including the use of\theoremheaderfont
and\theorembodyfont
. The options[amsthm]
and[standard]
are in conflict since they both define an environmentproof
. Thus, we recommend not to useamsthm
, since the features for defining theorem-like environments inntheorem.sty
—followingtheorem.sty
—seem to be more intuitive and user-friendly.
Package ntheorem
To get a similar proof environment without the option amsthm
you get do the following:
\documentclass[english]{article}
\usepackage{babel}
\usepackage{amsmath,amssymb}
\usepackage[thmmarks,amsmath]{ntheorem}
\newcommand{\openbox}{\leavevmode
\hbox to.77778em{%
\hfil\vrule
\vbox to.675em{\hrule width.6em\vfil\hrule}%
\vrule\hfil}}
\theoremstyle{nonumberplain}
\theoremsymbol{\openbox}
\newtheorem{proof}{Proof}
\theoremsymbol{}
\theoremstyle{plain}
\theoremheaderfont{\normalfont\itshape}
\theorembodyfont{\normalfont}
\newtheorem*{myenv}{Note}
\begin{document}
\begin{myenv}
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{myenv}
\begin{proof}[Alternative Text]
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{proof}
\end{document}
I'm using ntheorem with the amsthm option. I should be getting a environment with 'Note' in italic and the contents in normal roman font. Instead, I get 'Note' in boldface roman and the body in italic. What am I doing wrong?
I believe you need to provide a couple of \newtheoremstyle
commands before you can issue the command \newtheorem{myenv}{Note}
. According to the documentation of the ntheorem
package, the theoremstyles of both numbered and unnumbered "theorem" environments must be defined explicitly if the package was loaded with the amsthm
option. Here's what I suggest you do in the preamble, given your description of how you'd like the "note" environment to be styled:
\usepackage[amsthm]{ntheorem}
\theorembodyfont{\upshape}
\newtheoremstyle{notes} % for numbered notes
{\item[\hskip\labelsep \itshape ##1\ ##2.]}%
{\item[\hskip\labelsep \itshape ##1\ ##2, ##3.]}
\newtheoremstyle{nonumbernotes} % for unnumbered notes
{\item[\hskip\labelsep \itshape ##1.]}%
{\item[\hskip\labelsep \itshape ##1, ##3.]}
\theoremstyle{notes} % switch to newly defined theorem style
\newtheorem*{myenv}{Note}
After this, you should have no problems with your myenv
environments.