[Tex/LaTex] siamltx + amsthm: “LaTeX Error: No counter ‘Theorem’ defined.”

amsthmcountersincompatibility

When using the LaTeX class siamltx (from the SIAM page) together with amsthm (which I need for its theoremstyle command), I'm getting the error message

! LaTeX Error: No counter 'Theorem' defined.

The following code reproduces the error.

\documentclass{siamltex}                                                        

\let\proof\relax                                                                
\let\endproof\relax                                                             
\usepackage{amsthm}                                                             

\begin{document}                                                                

\begin{theorem}                                                                 
dasdas                                                                          
\end{theorem}                                                                   

\end{document}

Any way around this?

Best Answer

This class already defines the theorem environment, but amsthm redefines some (but not all) of the internal commands used in that definition (notably \@thm). This completely messes things up. For this reason, amsthm cannot be loaded under siamltex.cls. Sometimes, loading the package before the document class works. This can be done with

\RequirePackage{amsthm}
\documentclass{siamltex}

Unfortunately, the reverse problem occurs: siamltex redefines an internal macro of amsthm's version of the theorem environment (\@begintheorem) and messes it up.

The only work-around is not to use these two together. The class defines the various theorem-like environments already, as well as the proof environment, and does so in the ways the SIAM publishers chose, so there seems to be no reason for amsthm.