]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-chap-bytype.module
DocBook: implement LyX-Code.
[lyx.git] / lib / layouts / theorems-chap-bytype.module
1 #\DeclareLyXModule{Standard Theorems (Numbered by Type within Chapters)}
2 #\DeclareCategory{Maths}
3 #DescriptionBegin
4 #Defines some theorem environments for use with non-AMS classes. Contrary to the
5 #plain Theorem module, the different theorem types provided here each have a separate
6 #counter (e.g., theorem 1, theorem 2, lemma 1, proposition 1, theorem 3, lemma 2, ...,
7 #as opposed to theorem 1, theorem 2, lemma 3, proposition 4, ...). The numbering is reset
8 #at each chapter start.
9 #DescriptionEnd
10 #Requires: theorems-bytype | theorems-ams-bytype
11 #Excludes: theorems-std | theorems-ams | theorems-starred | theorems-sec | theorems-sec-bytype
12
13 # Author: Paul Rubin <rubin@msu.edu> (hacked from Richard Heck's various modules)
14
15 Format 82
16
17 # We need separate counters for each theorem-like style.
18 Counter theorem
19         GuiName Theorem
20         Within         chapter
21 End
22 Counter corollary
23         GuiName Corollary
24         Within         chapter
25 End
26 Counter lemma
27         GuiName Lemma
28         Within         chapter
29 End
30 Counter proposition
31         GuiName Proposition
32         Within         chapter
33 End
34 Counter conjecture
35         GuiName Conjecture
36         Within         chapter
37 End
38 Counter fact
39         GuiName Fact
40         Within         chapter
41 End
42 Counter definition
43         GuiName Definition
44         Within         chapter
45 End
46 Counter example
47         GuiName Example
48         Within         chapter
49 End
50 Counter problem
51         GuiName Problem
52         Within         chapter
53 End
54 Counter exercise
55         GuiName Exercise
56         Within         chapter
57 End
58 Counter remark
59         GuiName Remark
60         Within         chapter
61 End
62 Counter claim
63         GuiName Claim
64         Within         chapter
65 End
66
67 Style Theorem
68         Preamble
69           \theoremstyle{plain}
70           \ifx\thechapter\undefined
71             \newtheorem{thm}{\protect\theoremname}
72           \else
73             \newtheorem{thm}{\protect\theoremname}[chapter]
74           \fi
75         EndPreamble
76 End
77
78
79 Style Corollary
80         Preamble
81           \theoremstyle{plain}
82           \ifx\thechapter\undefined
83             \newtheorem{cor}{\protect\corollaryname}
84           \else
85             \newtheorem{cor}{\protect\corollaryname}[chapter]
86           \fi
87         EndPreamble
88 End
89
90
91 Style Lemma
92         Preamble
93           \theoremstyle{plain}
94           \ifx\thechapter\undefined
95             \newtheorem{lem}{\protect\lemmaname}
96           \else
97             \newtheorem{lem}{\protect\lemmaname}[chapter]
98           \fi
99         EndPreamble
100 End
101
102
103 Style Proposition
104         Preamble
105           \theoremstyle{plain}
106           \ifx\thechapter\undefined
107             \newtheorem{prop}{\protect\propositionname}
108           \else
109             \newtheorem{prop}{\protect\propositionname}[chapter]
110           \fi
111         EndPreamble
112 End
113
114
115 Style Conjecture
116         Preamble
117           \theoremstyle{plain}
118           \ifx\thechapter\undefined
119             \newtheorem{conjecture}{\protect\conjecturename}
120           \else
121             \newtheorem{conjecture}{\protect\conjecturename}[chapter]
122           \fi
123         EndPreamble
124 End
125
126
127 Style Fact
128         Preamble
129           \theoremstyle{plain}
130           \ifx\thechapter\undefined
131             \newtheorem{fact}{\protect\factname}
132           \else
133             \newtheorem{fact}{\protect\factname}[chapter]
134           \fi
135         EndPreamble
136 End
137
138
139 Style Definition
140         Preamble
141           \theoremstyle{definition}
142           \ifx\thechapter\undefined
143             \newtheorem{defn}{\protect\definitionname}
144           \else
145             \newtheorem{defn}{\protect\definitionname}[chapter]
146           \fi
147         EndPreamble
148 End
149
150
151 Style Example
152         Preamble
153           \theoremstyle{definition}
154           \ifx\thechapter\undefined
155             \newtheorem{example}{\protect\examplename}
156           \else
157             \newtheorem{example}{\protect\examplename}[chapter]
158           \fi
159         EndPreamble
160 End
161
162
163 Style Problem
164         Preamble
165           \theoremstyle{definition}
166           \ifx\thechapter\undefined
167             \newtheorem{problem}{\protect\problemname}
168           \else
169             \newtheorem{problem}{\protect\problemname}[chapter]
170           \fi
171         EndPreamble
172 End
173
174
175 Style Exercise
176         Preamble
177           \theoremstyle{definition}
178           \ifx\thechapter\undefined
179             \newtheorem{xca}{\protect\exercisename}
180           \else
181             \newtheorem{xca}{\protect\exercisename}[chapter]
182           \fi
183         EndPreamble
184 End
185
186
187 Style Remark
188         Preamble
189           \theoremstyle{remark}
190           \ifx\thechapter\undefined
191             \newtheorem{rem}{\protect\remarkname}
192           \else
193             \newtheorem{rem}{\protect\remarkname}[chapter]
194           \fi
195         EndPreamble
196 End
197
198
199 Style Claim
200         Preamble
201           \theoremstyle{remark}
202           \ifx\thechapter\undefined
203             \newtheorem{claim}{\protect\claimname}
204           \else
205             \newtheorem{claim}{\protect\claimname}[chapter]
206           \fi
207         EndPreamble
208 End