1 #\DeclareLyXModule{Theorems (Numbered by Type within Chapters)}
3 #Defines some theorem environments for use with non-AMS classes. Contrary to the
4 #plain Theorem module, the different theorem types provided here each have a separate
5 #counter (e.g., theorem 1, theorem 2, lemma 1, proposition 1, theorem 3, lemma 2, ...,
6 #as opposed to theorem 1, theorem 2, lemma 3, proposition 4, ...). The numbering is reset
7 #at each chapter start.
9 #Requires: theorems-bytype | theorems-ams-bytype
10 #Excludes: theorems-std | theorems-ams | theorems-starred | theorems-sec | theorems-sec-bytype
12 # Author: Paul Rubin <rubin@msu.edu> (hacked from Richard Heck's various modules)
16 # We need separate counters for each theorem-like style.
57 \ifx\thechapter\undefined
58 \newtheorem{thm}{\protect\theoremname}
60 \newtheorem{thm}{\protect\theoremname}[chapter]
69 \ifx\thechapter\undefined
70 \newtheorem{cor}{\protect\corollaryname}
72 \newtheorem{cor}{\protect\corollaryname}[chapter]
81 \ifx\thechapter\undefined
82 \newtheorem{lem}{\protect\lemmaname}
84 \newtheorem{lem}{\protect\lemmaname}[chapter]
93 \ifx\thechapter\undefined
94 \newtheorem{prop}{\protect\propositionname}
96 \newtheorem{prop}{\protect\propositionname}[chapter]
105 \ifx\thechapter\undefined
106 \newtheorem{conjecture}{\protect\conjecturename}
108 \newtheorem{conjecture}{\protect\conjecturename}[chapter]
117 \ifx\thechapter\undefined
118 \newtheorem{fact}{\protect\factname}
120 \newtheorem{fact}{\protect\factname}[chapter]
128 \theoremstyle{definition}
129 \ifx\thechapter\undefined
130 \newtheorem{defn}{\protect\definitionname}
132 \newtheorem{defn}{\protect\definitionname}[chapter]
140 \theoremstyle{definition}
141 \ifx\thechapter\undefined
142 \newtheorem{example}{\protect\examplename}
144 \newtheorem{example}{\protect\examplename}[chapter]
152 \theoremstyle{definition}
153 \ifx\thechapter\undefined
154 \newtheorem{problem}{\protect\problemname}
156 \newtheorem{problem}{\protect\problemname}[chapter]
164 \theoremstyle{definition}
165 \ifx\thechapter\undefined
166 \newtheorem{xca}{\protect\exercisename}
168 \newtheorem{xca}{\protect\exercisename}[chapter]
176 \theoremstyle{remark}
177 \ifx\thechapter\undefined
178 \newtheorem{rem}{\protect\remarkname}
180 \newtheorem{rem}{\protect\remarkname}[chapter]
188 \theoremstyle{remark}
189 \ifx\thechapter\undefined
190 \newtheorem{claim}{\protect\claimname}
192 \newtheorem{claim}{\protect\claimname}[chapter]