]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-ams-extended-chap-bytype.module
Correct version number
[lyx.git] / lib / layouts / theorems-ams-extended-chap-bytype.module
1 #\DeclareLyXModule{AMS Theorems (Extended, Numbered by Type within Chapters)}
2 #\DeclareCategory{Maths}
3 #DescriptionBegin
4 #Defines some additional theorem environments for use with the
5 #AMS theorems packages. Includes Criterion, Algorithm, Axiom,
6 #Condition, Note, Notation, Summary, Acknowledgement, Conclusion,
7 #Assumption, and Case, in both numbered and non-numbered forms.
8 #Contrary to the plain AMS-Extended module, the different theorem
9 #types provided here each have a separate counter, restarted with each
10 #new chapter (e.g., criterion 1.1, criterion 1.2, axiom 1.1, assumption 1.1, #criterion 2.1, criterion 2.2, axiom 2.1..., as opposed to criterion 1,
11 #criterion 2, axiom 3, assumption 4...)
12 #DescriptionEnd
13 #Requires: theorems-ams-chap-bytype
14
15 # Original Author : David L. Johnson <dlj0@lehigh.edu>
16 # Probably broken by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
17 # modified and modularized by Emmanuel GUREGHIAN <gureghia@boston.bertin.fr>
18 # Tinkered with Sep. '07 by Paul Rubin <rubin@msu.edu>
19 # Modularized Jan 08 by Richard Heck <rgheck@comcast.net>
20 # Hacked June '09 by Paul Rubin <rubin@msu.edu> to use separate counters
21 # Chapter dependence added Oct '16 by Andrew Parsloe <aparsloe@clear.net.nz>
22
23 Format 82
24
25 Requires        amsmath
26
27 # The environnements defined (regular and starred) are :
28 # - Criterion
29 # - Algorithm
30 # - Axiom
31 # - Condition
32 # - Note
33 # - Notation
34 # - Summary
35 # - Acknowledgement
36 # - Conclusion
37 # - Assumption
38 # - Question
39
40 # We need separate counters for each theorem-like style.
41 Counter criterion
42         GuiName Criterion
43 End
44 Counter algorithm
45         GuiName Algorithm
46 End
47 Counter axiom
48         GuiName Axiom
49 End
50 Counter condition
51         GuiName Condition
52 End
53 Counter note
54         GuiName Note
55 End
56 Counter notation
57         GuiName Notation
58 End
59 Counter summary
60         GuiName Summary
61 End
62 Counter acknowledgement
63         GuiName Acknowledgement
64 End
65 Counter conclusion
66         GuiName Conclusion
67 End
68 Counter assumption
69         GuiName Assumption
70 End
71 Counter question
72         GuiName Question
73 End
74
75
76 # additional (AMS-extended) environments
77
78 Style Criterion
79         CopyStyle             Theorem
80         LatexName             criterion
81         LabelString           "Criterion \thechapter.\thecriterion."
82         Preamble
83           \theoremstyle{plain}
84     \ifx\thechapter\undefined
85       \newtheorem{criterion}{\protect\criterionname}
86     \else
87       \newtheorem{criterion}{\protect\criterionname}[chapter]
88     \fi
89         EndPreamble
90         LangPreamble
91           \providecommand{\criterionname}{_(Criterion)}
92         EndLangPreamble
93         BabelPreamble
94           \addto\captions$$lang{\renewcommand{\criterionname}{_(Criterion)}}
95         EndBabelPreamble
96         LabelCounter          criterion
97 End
98
99
100 Style Criterion*
101         CopyStyle             Theorem*
102         LatexName             criterion*
103         LabelString           "Criterion."
104         Preamble
105           \theoremstyle{plain}
106           \newtheorem*{criterion*}{\protect\criterionname}
107         EndPreamble
108         LangPreamble
109           \providecommand{\criterionname}{_(Criterion)}
110         EndLangPreamble
111         BabelPreamble
112           \addto\captions$$lang{\renewcommand{\criterionname}{_(Criterion)}}
113         EndBabelPreamble
114 End
115
116
117 Style Algorithm
118         CopyStyle             Theorem
119         LatexName             lyxalgorithm
120         LabelString           "Algorithm \thechapter.\thealgorithm."
121         Preamble
122           \theoremstyle{plain}
123     \ifx\thechapter\undefined
124       \newtheorem{lyxalgorithm}{\protect\algorithmname}
125     \else
126       \newtheorem{lyxalgorithm}{\protect\algorithmname}[chapter]
127     \fi
128         EndPreamble
129         LangPreamble
130           \providecommand{\algorithmname}{_(Algorithm)}
131         EndLangPreamble
132         BabelPreamble
133           \addto\captions$$lang{\renewcommand{\algorithmname}{_(Algorithm)}}
134         EndBabelPreamble
135         LabelCounter          algorithm
136 End
137
138
139 Style Algorithm*
140         CopyStyle             Theorem*
141         LatexName             lyxalgorithm*
142         LabelString           "Algorithm."
143         Preamble
144           \theoremstyle{plain}
145           \newtheorem*{lyxalgorithm*}{\protect\algorithmname}
146         EndPreamble
147         LangPreamble
148           \providecommand{\algorithmname}{_(Algorithm)}
149         EndLangPreamble
150         BabelPreamble
151           \addto\captions$$lang{\renewcommand{\algorithmname}{_(Algorithm)}}
152         EndBabelPreamble
153 End
154
155
156 Style Axiom
157         CopyStyle             Theorem
158         LatexName             ax
159         LabelString           "Axiom \thechapter.\theaxiom."
160         Preamble
161           \theoremstyle{plain}
162     \ifx\thechapter\undefined
163       \newtheorem{ax}{\protect\axiomname}
164     \else
165       \newtheorem{ax}{\protect\axiomname}[chapter]
166     \fi
167         EndPreamble
168         LangPreamble
169           \providecommand{\axiomname}{_(Axiom)}
170         EndLangPreamble
171         BabelPreamble
172           \addto\captions$$lang{\renewcommand{\axiomname}{_(Axiom)}}
173         EndBabelPreamble
174         LabelCounter          axiom
175 End
176
177
178 Style Axiom*
179         CopyStyle             Theorem*
180         LatexName             ax*
181         LabelString           "Axiom."
182         Preamble
183           \theoremstyle{plain}
184           \newtheorem*{ax*}{\protect\axiomname}
185         EndPreamble
186         LangPreamble
187           \providecommand{\axiomname}{_(Axiom)}
188         EndLangPreamble
189         BabelPreamble
190           \addto\captions$$lang{\renewcommand{\axiomname}{_(Axiom)}}
191         EndBabelPreamble
192 End
193
194
195 Style Condition
196         CopyStyle             Definition
197         LatexName             condition
198         LabelString           "Condition \thechapter.\thecondition."
199         Preamble
200           \theoremstyle{definition}
201     \ifx\thechapter\undefined
202       \newtheorem{condition}{\protect\conditionname}
203     \else
204       \newtheorem{condition}{\protect\conditionname}[chapter]
205     \fi
206         EndPreamble
207         LangPreamble
208           \providecommand{\conditionname}{_(Condition)}
209         EndLangPreamble
210         BabelPreamble
211           \addto\captions$$lang{\renewcommand{\conditionname}{_(Condition)}}
212         EndBabelPreamble
213         LabelCounter          condition
214 End
215
216
217 Style Condition*
218         CopyStyle             Definition*
219         LatexName             condition*
220         LabelString           "Condition."
221         Preamble
222           \theoremstyle{definition}
223           \newtheorem*{condition*}{\protect\conditionname}
224         EndPreamble
225         LangPreamble
226           \providecommand{\conditionname}{_(Condition)}
227         EndLangPreamble
228         BabelPreamble
229           \addto\captions$$lang{\renewcommand{\conditionname}{_(Condition)}}
230         EndBabelPreamble
231 End
232
233
234 Style Note
235         CopyStyle             Remark
236         LatexName             note
237         LabelString           "Note \thechapter.\thenote."
238         Preamble
239           \theoremstyle{remark}
240     \ifx\thechapter\undefined
241       \newtheorem{note}{\protect\notename}
242     \else
243       \newtheorem{note}{\protect\notename}[chapter]
244     \fi
245         EndPreamble
246         LangPreamble
247           \providecommand{\notename}{_(Note)}
248         EndLangPreamble
249         BabelPreamble
250           \addto\captions$$lang{\renewcommand{\notename}{_(Note)}}
251         EndBabelPreamble
252         LabelCounter          note
253 End
254
255
256 Style Note*
257         CopyStyle             Remark*
258         LatexName             note*
259         LabelString           "Note."
260         Preamble
261           \theoremstyle{remark}
262           \newtheorem*{note*}{\protect\notename}
263         EndPreamble
264         LangPreamble
265           \providecommand{\notename}{_(Note)}
266         EndLangPreamble
267         BabelPreamble
268           \addto\captions$$lang{\renewcommand{\notename}{_(Note)}}
269         EndBabelPreamble
270 End
271
272
273 Style Notation
274         CopyStyle             Remark
275         LatexName             notation
276         LabelString           "Notation \thechapter.\thenotation."
277         Preamble
278           \theoremstyle{remark}
279     \ifx\thechapter\undefined
280       \newtheorem{notation}{\protect\notationname}
281     \else
282       \newtheorem{notation}{\protect\notationname}[chapter]
283     \fi
284         EndPreamble
285         LangPreamble
286           \providecommand{\notationname}{_(Notation)}
287         EndLangPreamble
288         BabelPreamble
289           \addto\captions$$lang{\renewcommand{\notationname}{_(Notation)}}
290         EndBabelPreamble
291         LabelCounter          notation
292 End
293
294
295 Style Notation*
296         CopyStyle             Remark*
297         LatexName             notation*
298         LabelString           "Notation."
299         Preamble
300           \theoremstyle{remark}
301           \newtheorem*{notation*}{\protect\notationname}
302         EndPreamble
303         LangPreamble
304           \providecommand{\notationname}{_(Notation)}
305         EndLangPreamble
306         BabelPreamble
307           \addto\captions$$lang{\renewcommand{\notationname}{_(Notation)}}
308         EndBabelPreamble
309 End
310
311
312 Style Summary
313         CopyStyle             Remark
314         LatexName             summary
315         LabelString           "Summary \thechapter.\thesummary."
316         Preamble
317           \theoremstyle{remark}
318     \ifx\thechapter\undefined
319       \newtheorem{summary}{\protect\summaryname}
320     \fi
321     \else
322       \newtheorem{summary}{\protect\summaryname}[chapter]
323     \fi
324         EndPreamble
325         LangPreamble
326           \providecommand{\summaryname}{_(Summary)}
327         EndLangPreamble
328         BabelPreamble
329           \addto\captions$$lang{\renewcommand{\summaryname}{_(Summary)}}
330         EndBabelPreamble
331         LabelCounter          summary
332 End
333
334
335 Style Summary*
336         CopyStyle             Remark*
337         LatexName             summary*
338         LabelString           "Summary."
339         Preamble
340           \theoremstyle{remark}
341           \newtheorem*{summary*}{\protect\summaryname}
342         EndPreamble
343         LangPreamble
344           \providecommand{\summaryname}{_(Summary)}
345         EndLangPreamble
346         BabelPreamble
347           \addto\captions$$lang{\renewcommand{\summaryname}{_(Summary)}}
348         EndBabelPreamble
349 End
350
351
352 Style Acknowledgement
353         CopyStyle             Remark
354         LatexName             acknowledgement
355         LabelString           "Acknowledgement \thechapter.\theacknowledgement."
356         Preamble
357           \theoremstyle{remark}
358     \ifx\thechapter\undefined
359       \newtheorem{acknowledgement}{\protect\acknowledgementname}
360     \else
361       \newtheorem{acknowledgement}{\protect\acknowledgementname}[chapter]
362     \fi
363         EndPreamble
364         LangPreamble
365           \providecommand{\acknowledgementname}{_(Acknowledgement)}
366         EndLangPreamble
367         BabelPreamble
368           \addto\captions$$lang{\renewcommand{\acknowledgementname}{_(Acknowledgement)}}
369         EndBabelPreamble
370         LabelCounter          acknowledgement
371 End
372
373
374 Style Acknowledgement*
375         CopyStyle             Remark*
376         LatexName             acknowledgement*
377         LabelString           "Acknowledgement."
378         Preamble
379           \theoremstyle{remark}
380           \newtheorem*{acknowledgement*}{\protect\acknowledgementname}
381         EndPreamble
382         LangPreamble
383           \providecommand{\acknowledgementname}{_(Acknowledgement)}
384         EndLangPreamble
385         BabelPreamble
386           \addto\captions$$lang{\renewcommand{\acknowledgementname}{_(Acknowledgement)}}
387         EndBabelPreamble
388 End
389
390
391 Style Conclusion
392         CopyStyle             Remark
393         LatexName             conclusion
394         LabelString           "Conclusion \thechapter.\theconclusion."
395         Preamble
396           \theoremstyle{remark}
397     \ifx\thechapter\undefined
398       \newtheorem{conclusion}{\protect\conclusionname}
399     \else
400       \newtheorem{conclusion}{\protect\conclusionname}[chapter]
401     \fi
402         EndPreamble
403         LangPreamble
404           \providecommand{\conclusionname}{_(Conclusion)}
405         EndLangPreamble
406         BabelPreamble
407           \addto\captions$$lang{\renewcommand{\conclusionname}{_(Conclusion)}}
408         EndBabelPreamble
409         LabelCounter          conclusion
410 End
411
412
413 Style Conclusion*
414         CopyStyle             Remark*
415         LatexName             conclusion*
416         LabelString           "Conclusion."
417         Preamble
418           \theoremstyle{remark}
419           \newtheorem*{conclusion*}{\protect\conclusionname}
420         EndPreamble
421         LangPreamble
422           \providecommand{\conclusionname}{_(Conclusion)}
423         EndLangPreamble
424         BabelPreamble
425           \addto\captions$$lang{\renewcommand{\conclusionname}{_(Conclusion)}}
426         EndBabelPreamble
427 End
428
429
430 Style Assumption
431         CopyStyle             Theorem
432         LatexName             assumption
433         LabelString           "Assumption \thechapter.\theassumption."
434         Preamble
435           \theoremstyle{plain}
436     \ifx\thechapter\undefined
437       \newtheorem{assumption}{\protect\assumptionname}
438     \else
439       \newtheorem{assumption}{\protect\assumptionname}[chapter]
440     \fi
441         EndPreamble
442         LangPreamble
443           \providecommand{\assumptionname}{_(Assumption)}
444         EndLangPreamble
445         BabelPreamble
446           \addto\captions$$lang{\renewcommand{\assumptionname}{_(Assumption)}}
447         EndBabelPreamble
448         LabelCounter          assumption
449 End
450
451
452 Style Assumption*
453         CopyStyle             Theorem*
454         LatexName             assumption*
455         LabelString           "Assumption."
456         Preamble
457           \theoremstyle{plain}
458           \newtheorem*{assumption*}{\protect\assumptionname}
459         EndPreamble
460         LangPreamble
461           \providecommand{\assumptionname}{_(Assumption)}
462         EndLangPreamble
463         BabelPreamble
464           \addto\captions$$lang{\renewcommand{\assumptionname}{_(Assumption)}}
465         EndBabelPreamble
466 End
467
468 Style Question
469         CopyStyle             Theorem
470         DependsOn             Theorem
471         LatexName             question
472         LabelString           "Question \thechapter.\thequestion."
473         Preamble
474           \theoremstyle{plain}
475     \ifx\thechapter\undefined
476       \newtheorem{question}{\protect\questionname}
477     \else
478       \newtheorem{question}{\protect\questionname}[chapter]
479     \fi
480         EndPreamble
481         LangPreamble
482           \providecommand{\questionname}{_(Question)}
483         EndLangPreamble
484         BabelPreamble
485           \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}}
486         EndBabelPreamble
487         LabelCounter          question
488 End
489
490 Style Question*
491         CopyStyle             Theorem*
492         LatexName             question*
493         LabelString           "Question."
494         Preamble
495           \theoremstyle{plain}
496           \newtheorem*{question*}{\protect\questionname}
497         EndPreamble
498         LangPreamble
499           \providecommand{\questionname}{_(Question)}
500         EndLangPreamble
501         BabelPreamble
502           \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}}
503         EndBabelPreamble
504 End
505
506 Input theorems-refprefix.inc