# Need help with modifying ntheorem environments

I am trying to modify some of the theorem environments defined in ntheorem. I wanted the definitions in my document to be boxed the way in which ntheorem does for the framed theorem classes which they define by:

\theoremclass{Theorem}
\theoremstyle{break}
\newframedtheorem{importantTheorem}[Theorem]{Theorem}


and so I modified the above code to the following:

\theoremclass{Theorem}
\theoremstyle{break}
\newframedtheorem{defn}[Theorem]{Definition}


then in my document called up an instance of a definition by:

\begin{defn}[Logical Equivalance] Two propositions are said to be logically equivalent iff ...
\end{defn}


Now, I wish to modify their shaded theorem environment which is coded as follows:

\theoremclass{Theorem}
\theoremstyle{break}


I tried the following:

\theoremclass{Theorem}
\theoremstyle{break}


but keep getting the error:

Undefined control sequence: begin{prop}


Can anyone help me with this?

\documentclass[10pt,a4paper]{article}

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath,amssymb,amscd,amstext,amsbsy,array,color,epsfig}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage[amsmath,framed,thmmarks]{ntheorem}

\begin{document}

\theoremstyle{marginbreak}
\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\star}}
\theoremseparator{:}
\newtheorem{axm}{Axiom}[section]

\theoremstyle{marginbreak}
\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{:}
\newtheorem{Theorem}{Theorem}[section]

\theoremclass{Theorem}
\theoremstyle{break}

\theoremstyle{changebreak}
\theoremsymbol{\ensuremath{\heartsuit}}
\theoremindent0.5cm
\theoremnumbering{greek}
\newtheorem{lem}{Lemma}[section]

\theoremindent0cm
\theoremnumbering{arabic}
\newtheorem{cor}[Theorem]{Corollary}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\bullet}}
\theoremseparator{}
\newtheorem{exm}{Example}

\theoremclass{Theorem}
\theoremstyle{plain}
\theoremsymbol{\ensuremath{\clubsuit}}
\newframedtheorem{defn}[Theorem]{Definition}

\theorembodyfont{\upshape}
\theoremstyle{nonumberplain}
\theoremseparator{.}
\theoremsymbol{\rule{1ex}{1ex}}
\newtheorem{proof}{Proof}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\ast}}
\theoremseparator{.}
\newtheorem{rem}{Remark}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\newtheorem{exc}{Exercise}[section]

\begin{defn}[Logical Equivalance] Two propositions are said to be logically equivalent iff ...
\end{defn}

\begin{prop}
Let $P$ and $Q$ be propositions. Then ...
\end{prop}

\end{document}


Thanks!!!

-
Please, add a minimal working example; it doesn't matter if it produces the error, but for help us in finding the issue it should start with \documentclass and end with \end{document}. However, the undefined sequence seems to be \psframebox, due to not loading PSTricks. –  egreg Jul 28 '13 at 20:26

You can fix your MWE by adding the line

\newtheorem{Theorem}{Thm}


which is needed for both of your subsequent theorem-like environments, prop and defn.

% arara: latex
% arara: dvips
% arara: ps2pdf
% !arara: indent: {overwrite: yes}
\documentclass[10pt,a4paper]{article}

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{framed}
\usepackage[amsmath,framed,thmmarks]{ntheorem}

\newtheorem{Theorem}{Thm}
\theoremclass{Theorem}
\theoremstyle{break}

\theoremclass{Theorem}
\theoremstyle{plain}
\theoremsymbol{\ensuremath{\clubsuit}}
\newframedtheorem{defn}[Theorem]{Definition}

\begin{document}

\begin{defn}[Logical Equivalance]
Two propositions are said to be logically equivalent iff ...
\end{defn}

\begin{prop}
Let $P$ and $Q$ be propositions. Then ...
\end{prop}

\end{document}


Note that this MWE relies upon the pstricks package, so needs to be compiled through the latex->dvips->ps2pdf unless you want to follow the instructions in How to use PSTricks in pdfLaTeX?

For all of your framing needs I would highly recommend the mdframed package, which addresses the many short comings of its competitors.

Here's a version of the previous MWE using the mdframed package; note that this package does not rely upon the pstricks package (in contrast to the previous method). As such, you can (easily) compile this document with pdflatex.

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass[10pt,a4paper]{article}

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\usepackage[ntheorem,xcolor]{mdframed}

\newtheorem{Theorem}{Thm}
\theoremclass{Theorem}
\theoremstyle{break}
\newmdtheoremenv[
outerlinewidth = 2 ,%
roundcorner = 10 pt ,%
leftmargin = 40 ,%
rightmargin = 40 ,%
backgroundcolor=yellow!40,%
outerlinecolor=blue!70!black,%
innertopmargin=\topskip,%
splittopskip = \topskip ,%
ntheorem = true ,%
]{prop}[Theorem]{Proposition}

\theoremstyle{plain}
\theoremsymbol{\ensuremath{\clubsuit}}
%\newframedtheorem{defn}[Theorem]{Definition}
\newmdtheoremenv{defn}[Theorem]{Definition}

\begin{document}

\begin{defn}[Logical Equivalance]
Two propositions are said to be logically equivalent iff ...
\end{defn}

\begin{prop}
Let $P$ and $Q$ be propositions. Then ...
\end{prop}

\end{document}


Of course, the mdframed package can be told to use pstricks or tikz if you wish, but that is beyond the scope of the question- see the manual for more details.

Update, following the question edit.

With the additional theorem-like environments, this MWE works- note that you can't define a theorem-like environment twice using \newtheorem

% arara: latex
% arara: dvips
% arara: ps2pdf
% !arara: indent: {overwrite: yes}
\documentclass[10pt,a4paper]{article}

\usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{framed}
\usepackage[amsmath,framed,thmmarks]{ntheorem}

\theoremstyle{marginbreak}
\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{:}
\newtheorem{Theorem}{Theorem}[section]

\theoremclass{Theorem}
\theoremstyle{break}

\theoremclass{Theorem}
\theoremstyle{plain}
\theoremsymbol{\ensuremath{\clubsuit}}
\newframedtheorem{defn}[Theorem]{Definition}

\theoremstyle{marginbreak}
\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\star}}
\theoremseparator{:}
\newtheorem{axm}{Axiom}[section]

\theoremstyle{changebreak}
\theoremsymbol{\ensuremath{\heartsuit}}
\theoremindent0.5cm
\theoremnumbering{greek}
\newtheorem{lem}{Lemma}[section]

\theoremindent0cm
\theoremnumbering{arabic}
\newtheorem{cor}[Theorem]{Corollary}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\bullet}}
\theoremseparator{}
\newtheorem{exm}{Example}

\theorembodyfont{\upshape}
\theoremstyle{nonumberplain}
\theoremseparator{.}
\theoremsymbol{\rule{1ex}{1ex}}
\newtheorem{proof}{Proof}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\ast}}
\theoremseparator{.}
\newtheorem{rem}{Remark}

\theoremstyle{plain}
\theorembodyfont{\upshape}
\newtheorem{exc}{Exercise}[section]

\begin{document}

\begin{defn}[Logical Equivalance]
Two propositions are said to be logically equivalent iff ...
\end{defn}

\begin{prop}
Let $P$ and $Q$ be propositions. Then ...
\end{prop}

\end{document}

-
I just added my current definitions of theorem-like environments that I use for this document, and when I add \newtheorem{Theorem}{thm} I get the error message: Command \Theorem already defined. –  Michael Dykes Jul 28 '13 at 23:20
@MichaelDykes you've added them after your \end{document}. Please make a complete MWE :) –  cmhughes Jul 29 '13 at 7:51
I just corrected my mistake. Sorry about that :)- –  Michael Dykes Jul 29 '13 at 9:41
@MichaelDykes see my updated answer :) –  cmhughes Jul 29 '13 at 9:48
Now, I get the errors: No counter theorem defined for the proposition, and definition environments. –  Michael Dykes Jul 31 '13 at 1:35