]> git.lyx.org Git - features.git/blobdiff - lib/layouts/theorems-chap.module
Update layout format.
[features.git] / lib / layouts / theorems-chap.module
index f21cb4b2e11a2a4e914c13914311354bfef61f4e..da4e052a602b361a0391be2b38ab24dfbcad481c 100644 (file)
@@ -1,14 +1,13 @@
 #\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 8
 
 Counter
        Name           theorem
@@ -17,6 +16,11 @@ End
 
 Style Theorem
        Preamble
-               \newtheorem{thm}{Theorem}[chapter]
+               \ifx\thechapter\undefined
+                       \newtheorem{thm}{Theorem}
+               \else
+                       \newtheorem{thm}{Theorem}[chapter]
+               \fi
+               
        EndPreamble
 End