0

I'm working with an amsbook document, and I want to use the ntheorem package. This is unsurprisingly causing a complaint with the amsthm package implicitly loaded for the amsbook documentclass. There's no clear superior choice between amsthm and ntheorem, each has its plusses and minuses. So it seemed the best option to use

\usepackage[amsthm]{ntheorem}

which gives an approximation of the best of both worlds (section 3.2.2). But that only works if you can remove the amsthm package. How do I achieve this result with the amsbook document class?

This code below exhibits alternately a minimal working and broken example:

\documentclass{article}%{amsbook}
\usepackage[amsthm]{ntheorem}

\begin{document}
Test
\end{document}

One answer provided implicitly here was that they just don't blend but I want to believe that it can be done.

EDIT: @david-carlisle and @barbara-beeton correct my misapprehension; apparently it is not the amsthm package included in amsbook, but instead that the amsbook class contains code equivalent to that provided in the amsthm class.

5

It is normally not too hard to prevent a package loading (if necessary by abusing the mechanism latex uses to prevent a package being loaded twice). However amsbook does not load amsthml it has the definition of a theorem mechanism inline within the body of amsbook.cls. The amsthm.sty package is an extraction of a subset of the amsbook code for use in non-AMS classes.

As such, it would be simpler to start from a different class and add any AMS-features that you want rather than start from amsbook and remove the theorem handling.

  • 1
    Not only is the code equivalent to that of amsthm incorporated into amsbook, it's not identical to the standalone amsthm. All AMS document classes and amsthm are generated from amsclass.dtx, so the differences can be determined there. (All in TeX Live.) – barbara beeton Jul 11 at 21:06
4

I don't agree that ntheorem is better than amsthm.

However, a not thoroughly tested way to remove amsthm from amsbook is as follows.

\makeatletter
\let\latex@newtheorem\newtheorem
\let\latex@thm\@thm
\let\latex@xthm\@xthm
\let\latex@ythm\@ythm
\makeatother

\documentclass{amsbook}

\makeatletter
\let\newtheorem\latex@newtheorem
\let\@thm\latex@thm
\let\@xthm\latex@xthm
\let\@ythm\latex@ythm
\let\theoremstyle\relax
\let\th@plain\relax
\let\openbox\relax
\let\proofname\relax
\let\proof\relax
\let\endproof\relax
\makeatother

\usepackage[amsthm]{ntheorem}

\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}
Test
\end{theorem}

\end{document}
  • Truly, I don't know enough to have an opinion on which, if either, is better. The other linked post suggested instead it's a function of trade-offs. Thank you for the suggestion. – Jason Hemann Jul 11 at 18:22

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.