2

I am having some problems that `seem' to me to be a conflict between amsmath and ntheorem. Here is a MWE:

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage[amsmath,amstext,thmmarks]{ntheorem}
\usepackage{color,fancyhdr,framed,latexsym,multicols,slashed}

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

\begin{document}
\begin{Theorem}
Let $X$ be a set with $n$ elements. Then $\mathcal{P}(X)$ is a set with $2^n$ elements.
\end{Theorem}

\end{document}

Ay help would be greatly appreciated. Thanks.

10
  • 1
    You have to load the amsmath package; ntheorem doesn't do it and the options activates the compatibility mode. The option amstext doesn't exist. Check also multicol (not with a final s); the \newframedtheorem command is provided by mdframed. – egreg May 13 '12 at 20:10
  • @egreg: Thanks-How do I load the amsmath package wit ntheorem? Thanks again. – Michael Dykes May 13 '12 at 20:17
  • Just issue \usepackage{amsmath} before loading ntheorem. – egreg May 13 '12 at 20:17
  • @egreg: Just one more question on this, and please excuse my inexperience in this matter, but ?How do I convert the mdframed.dtx file into a .sty file? Thanks. – Michael Dykes May 13 '12 at 20:30
  • What system and TeX distribution are you using? – egreg May 13 '12 at 20:32
3

A minimal document that compiles is

\documentclass[a4paper]{report}
\usepackage{amsmath} % necessary for the `amsmath` option
\usepackage{framed}  % necessary for the `\newframedtheorem` command
\usepackage[amsmath,thmmarks,framed]{ntheorem}

\theoremclass{Theorem}
\theoremstyle{break}
\newframedtheorem{Theorem}{Theorem}

\begin{document}
\begin{Theorem}
Let $X$ be a set with $n$ elements. Then $\mathcal{P}(X)$ is a set with $2^n$ elements.
\end{Theorem}

\end{document}

You're making some errors

  1. In order to use the amsmath option in ntheorem you have to load amsmath
  2. In order to use the \newframedtheorem command defined in ntheorem you have to load framed and pass the framed option.
  3. You have a spurious [Theorem] in the definition of the environment.

However, the mdframed package is much more powerful for defining "boxed" theorems. Check its documentation

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.