#\DeclareLyXModule{Theorems (Order By Chapter)}
#DescriptionBegin
-#Defines some theorem environments for use with non-AMS classes. The theorems are
-#numbered by chapter.
+#Numbers theorems and the like by chapter. Use this module only with
+#layouts that provide a chapter environment.
#DescriptionEnd
-#Requires: Theorems | Theorems (AMS)
+#Requires: theorems-std | theorems-ams
# Author: Richard Heck <rgheck@comcast.net>
-# Adapted from amsmaths.inc
-Format 6
+Format 7
Counter
Name theorem
Style Theorem
Preamble
- \newtheorem{thm}{Theorem}[chapter]
+ \ifx\thechapter\undefined
+ \newtheorem{thm}{Theorem}
+ \else
+ \newtheorem{thm}{Theorem}[chapter]
+ \fi
+
EndPreamble
End