]> git.lyx.org Git - lyx.git/blobdiff - lib/layouts/theorems-chap.module
Fix a bug involving module conflicts. We need to check not only that we
[lyx.git] / lib / layouts / theorems-chap.module
index aae92e23f4f8532eaf88e63182c941aacaa5adb0..6dd56f6548a651601653ae309ba925e3b4526f09 100644 (file)
@@ -1,20 +1,25 @@
 #\DeclareLyXModule{Theorems (Order By Chapter)}
 #DescriptionBegin
-#Numbers theorems and the like 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>
 
-Format 6
+Format 10
 
-Counter
-       Name           theorem
+Counter theorem
        Within         chapter
 End
 
 Style Theorem
        Preamble
-               \newtheorem{thm}{Theorem}[chapter]
+               \ifx\thechapter\undefined
+                       \newtheorem{thm}{Theorem}
+               \else
+                       \newtheorem{thm}{Theorem}[chapter]
+               \fi
+               
        EndPreamble
 End