]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-ams-extended-chap-bytype.module
Amend e6de6c2b
[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         Within         chapter
44 End
45 Counter algorithm
46         GuiName Algorithm
47         Within         chapter
48 End
49 Counter axiom
50         GuiName Axiom
51         Within         chapter
52 End
53 Counter condition
54         GuiName Condition
55         Within         chapter
56 End
57 Counter note
58         GuiName Note
59         Within         chapter
60 End
61 Counter notation
62         GuiName Notation
63         Within         chapter
64 End
65 Counter summary
66         GuiName Summary
67         Within         chapter
68 End
69 Counter acknowledgement
70         GuiName Acknowledgement
71         Within         chapter
72 End
73 Counter conclusion
74         GuiName Conclusion
75         Within         chapter
76 End
77 Counter assumption
78         GuiName Assumption
79         Within         chapter
80 End
81 Counter question
82         GuiName Question
83         Within         chapter
84 End
85
86
87 # additional (AMS-extended) environments
88
89 Style Criterion
90         CopyStyle             Theorem
91         LatexName             criterion
92         LabelString           "Criterion \thecriterion."
93         Preamble
94           \theoremstyle{plain}
95     \ifx\thechapter\undefined
96       \newtheorem{criterion}{\protect\criterionname}
97     \else
98       \newtheorem{criterion}{\protect\criterionname}[chapter]
99     \fi
100         EndPreamble
101         LangPreamble
102           \providecommand{\criterionname}{_(Criterion)}
103         EndLangPreamble
104         BabelPreamble
105           \addto\captions$$lang{\renewcommand{\criterionname}{_(Criterion)}}
106         EndBabelPreamble
107         LabelCounter          criterion
108 End
109
110
111 Style Criterion*
112         CopyStyle             Theorem*
113         LatexName             criterion*
114         LabelString           "Criterion."
115         Preamble
116           \theoremstyle{plain}
117           \newtheorem*{criterion*}{\protect\criterionname}
118         EndPreamble
119         LangPreamble
120           \providecommand{\criterionname}{_(Criterion)}
121         EndLangPreamble
122         BabelPreamble
123           \addto\captions$$lang{\renewcommand{\criterionname}{_(Criterion)}}
124         EndBabelPreamble
125 End
126
127
128 Style Algorithm
129         CopyStyle             Theorem
130         LatexName             lyxalgorithm
131         LabelString           "Algorithm \thealgorithm."
132         Preamble
133           \theoremstyle{plain}
134     \ifx\thechapter\undefined
135       \newtheorem{lyxalgorithm}{\protect\algorithmname}
136     \else
137       \newtheorem{lyxalgorithm}{\protect\algorithmname}[chapter]
138     \fi
139         EndPreamble
140         LangPreamble
141           \providecommand{\algorithmname}{_(Algorithm)}
142         EndLangPreamble
143         BabelPreamble
144           \addto\captions$$lang{\renewcommand{\algorithmname}{_(Algorithm)}}
145         EndBabelPreamble
146         LabelCounter          algorithm
147 End
148
149
150 Style Algorithm*
151         CopyStyle             Theorem*
152         LatexName             lyxalgorithm*
153         LabelString           "Algorithm."
154         Preamble
155           \theoremstyle{plain}
156           \newtheorem*{lyxalgorithm*}{\protect\algorithmname}
157         EndPreamble
158         LangPreamble
159           \providecommand{\algorithmname}{_(Algorithm)}
160         EndLangPreamble
161         BabelPreamble
162           \addto\captions$$lang{\renewcommand{\algorithmname}{_(Algorithm)}}
163         EndBabelPreamble
164 End
165
166
167 Style Axiom
168         CopyStyle             Theorem
169         LatexName             ax
170         LabelString           "Axiom \theaxiom."
171         Preamble
172           \theoremstyle{plain}
173     \ifx\thechapter\undefined
174       \newtheorem{ax}{\protect\axiomname}
175     \else
176       \newtheorem{ax}{\protect\axiomname}[chapter]
177     \fi
178         EndPreamble
179         LangPreamble
180           \providecommand{\axiomname}{_(Axiom)}
181         EndLangPreamble
182         BabelPreamble
183           \addto\captions$$lang{\renewcommand{\axiomname}{_(Axiom)}}
184         EndBabelPreamble
185         LabelCounter          axiom
186 End
187
188
189 Style Axiom*
190         CopyStyle             Theorem*
191         LatexName             ax*
192         LabelString           "Axiom."
193         Preamble
194           \theoremstyle{plain}
195           \newtheorem*{ax*}{\protect\axiomname}
196         EndPreamble
197         LangPreamble
198           \providecommand{\axiomname}{_(Axiom)}
199         EndLangPreamble
200         BabelPreamble
201           \addto\captions$$lang{\renewcommand{\axiomname}{_(Axiom)}}
202         EndBabelPreamble
203 End
204
205
206 Style Condition
207         CopyStyle             Definition
208         LatexName             condition
209         LabelString           "Condition \thecondition."
210         Preamble
211           \theoremstyle{definition}
212     \ifx\thechapter\undefined
213       \newtheorem{condition}{\protect\conditionname}
214     \else
215       \newtheorem{condition}{\protect\conditionname}[chapter]
216     \fi
217         EndPreamble
218         LangPreamble
219           \providecommand{\conditionname}{_(Condition)}
220         EndLangPreamble
221         BabelPreamble
222           \addto\captions$$lang{\renewcommand{\conditionname}{_(Condition)}}
223         EndBabelPreamble
224         LabelCounter          condition
225 End
226
227
228 Style Condition*
229         CopyStyle             Definition*
230         LatexName             condition*
231         LabelString           "Condition."
232         Preamble
233           \theoremstyle{definition}
234           \newtheorem*{condition*}{\protect\conditionname}
235         EndPreamble
236         LangPreamble
237           \providecommand{\conditionname}{_(Condition)}
238         EndLangPreamble
239         BabelPreamble
240           \addto\captions$$lang{\renewcommand{\conditionname}{_(Condition)}}
241         EndBabelPreamble
242 End
243
244
245 Style Note
246         CopyStyle             Remark
247         LatexName             note
248         LabelString           "Note \thenote."
249         Preamble
250           \theoremstyle{remark}
251     \ifx\thechapter\undefined
252       \newtheorem{note}{\protect\notename}
253     \else
254       \newtheorem{note}{\protect\notename}[chapter]
255     \fi
256         EndPreamble
257         LangPreamble
258           \providecommand{\notename}{_(Note)}
259         EndLangPreamble
260         BabelPreamble
261           \addto\captions$$lang{\renewcommand{\notename}{_(Note)}}
262         EndBabelPreamble
263         LabelCounter          note
264 End
265
266
267 Style Note*
268         CopyStyle             Remark*
269         LatexName             note*
270         LabelString           "Note."
271         Preamble
272           \theoremstyle{remark}
273           \newtheorem*{note*}{\protect\notename}
274         EndPreamble
275         LangPreamble
276           \providecommand{\notename}{_(Note)}
277         EndLangPreamble
278         BabelPreamble
279           \addto\captions$$lang{\renewcommand{\notename}{_(Note)}}
280         EndBabelPreamble
281 End
282
283
284 Style Notation
285         CopyStyle             Remark
286         LatexName             notation
287         LabelString           "Notation \thenotation."
288         Preamble
289           \theoremstyle{remark}
290     \ifx\thechapter\undefined
291       \newtheorem{notation}{\protect\notationname}
292     \else
293       \newtheorem{notation}{\protect\notationname}[chapter]
294     \fi
295         EndPreamble
296         LangPreamble
297           \providecommand{\notationname}{_(Notation)}
298         EndLangPreamble
299         BabelPreamble
300           \addto\captions$$lang{\renewcommand{\notationname}{_(Notation)}}
301         EndBabelPreamble
302         LabelCounter          notation
303 End
304
305
306 Style Notation*
307         CopyStyle             Remark*
308         LatexName             notation*
309         LabelString           "Notation."
310         Preamble
311           \theoremstyle{remark}
312           \newtheorem*{notation*}{\protect\notationname}
313         EndPreamble
314         LangPreamble
315           \providecommand{\notationname}{_(Notation)}
316         EndLangPreamble
317         BabelPreamble
318           \addto\captions$$lang{\renewcommand{\notationname}{_(Notation)}}
319         EndBabelPreamble
320 End
321
322
323 Style Summary
324         CopyStyle             Remark
325         LatexName             summary
326         LabelString           "Summary \thesummary."
327         Preamble
328           \theoremstyle{remark}
329     \ifx\thechapter\undefined
330       \newtheorem{summary}{\protect\summaryname}
331     \fi
332     \else
333       \newtheorem{summary}{\protect\summaryname}[chapter]
334     \fi
335         EndPreamble
336         LangPreamble
337           \providecommand{\summaryname}{_(Summary)}
338         EndLangPreamble
339         BabelPreamble
340           \addto\captions$$lang{\renewcommand{\summaryname}{_(Summary)}}
341         EndBabelPreamble
342         LabelCounter          summary
343 End
344
345
346 Style Summary*
347         CopyStyle             Remark*
348         LatexName             summary*
349         LabelString           "Summary."
350         Preamble
351           \theoremstyle{remark}
352           \newtheorem*{summary*}{\protect\summaryname}
353         EndPreamble
354         LangPreamble
355           \providecommand{\summaryname}{_(Summary)}
356         EndLangPreamble
357         BabelPreamble
358           \addto\captions$$lang{\renewcommand{\summaryname}{_(Summary)}}
359         EndBabelPreamble
360 End
361
362
363 Style Acknowledgement
364         CopyStyle             Remark
365         LatexName             acknowledgement
366         LabelString           "Acknowledgement \theacknowledgement."
367         Preamble
368           \theoremstyle{remark}
369     \ifx\thechapter\undefined
370       \newtheorem{acknowledgement}{\protect\acknowledgementname}
371     \else
372       \newtheorem{acknowledgement}{\protect\acknowledgementname}[chapter]
373     \fi
374         EndPreamble
375         LangPreamble
376           \providecommand{\acknowledgementname}{_(Acknowledgement)}
377         EndLangPreamble
378         BabelPreamble
379           \addto\captions$$lang{\renewcommand{\acknowledgementname}{_(Acknowledgement)}}
380         EndBabelPreamble
381         LabelCounter          acknowledgement
382 End
383
384
385 Style Acknowledgement*
386         CopyStyle             Remark*
387         LatexName             acknowledgement*
388         LabelString           "Acknowledgement."
389         Preamble
390           \theoremstyle{remark}
391           \newtheorem*{acknowledgement*}{\protect\acknowledgementname}
392         EndPreamble
393         LangPreamble
394           \providecommand{\acknowledgementname}{_(Acknowledgement)}
395         EndLangPreamble
396         BabelPreamble
397           \addto\captions$$lang{\renewcommand{\acknowledgementname}{_(Acknowledgement)}}
398         EndBabelPreamble
399 End
400
401
402 Style Conclusion
403         CopyStyle             Remark
404         LatexName             conclusion
405         LabelString           "Conclusion \theconclusion."
406         Preamble
407           \theoremstyle{remark}
408     \ifx\thechapter\undefined
409       \newtheorem{conclusion}{\protect\conclusionname}
410     \else
411       \newtheorem{conclusion}{\protect\conclusionname}[chapter]
412     \fi
413         EndPreamble
414         LangPreamble
415           \providecommand{\conclusionname}{_(Conclusion)}
416         EndLangPreamble
417         BabelPreamble
418           \addto\captions$$lang{\renewcommand{\conclusionname}{_(Conclusion)}}
419         EndBabelPreamble
420         LabelCounter          conclusion
421 End
422
423
424 Style Conclusion*
425         CopyStyle             Remark*
426         LatexName             conclusion*
427         LabelString           "Conclusion."
428         Preamble
429           \theoremstyle{remark}
430           \newtheorem*{conclusion*}{\protect\conclusionname}
431         EndPreamble
432         LangPreamble
433           \providecommand{\conclusionname}{_(Conclusion)}
434         EndLangPreamble
435         BabelPreamble
436           \addto\captions$$lang{\renewcommand{\conclusionname}{_(Conclusion)}}
437         EndBabelPreamble
438 End
439
440
441 Style Assumption
442         CopyStyle             Theorem
443         LatexName             assumption
444         LabelString           "Assumption \theassumption."
445         Preamble
446           \theoremstyle{plain}
447     \ifx\thechapter\undefined
448       \newtheorem{assumption}{\protect\assumptionname}
449     \else
450       \newtheorem{assumption}{\protect\assumptionname}[chapter]
451     \fi
452         EndPreamble
453         LangPreamble
454           \providecommand{\assumptionname}{_(Assumption)}
455         EndLangPreamble
456         BabelPreamble
457           \addto\captions$$lang{\renewcommand{\assumptionname}{_(Assumption)}}
458         EndBabelPreamble
459         LabelCounter          assumption
460 End
461
462
463 Style Assumption*
464         CopyStyle             Theorem*
465         LatexName             assumption*
466         LabelString           "Assumption."
467         Preamble
468           \theoremstyle{plain}
469           \newtheorem*{assumption*}{\protect\assumptionname}
470         EndPreamble
471         LangPreamble
472           \providecommand{\assumptionname}{_(Assumption)}
473         EndLangPreamble
474         BabelPreamble
475           \addto\captions$$lang{\renewcommand{\assumptionname}{_(Assumption)}}
476         EndBabelPreamble
477 End
478
479 Style Question
480         CopyStyle             Theorem
481         DependsOn             Theorem
482         LatexName             question
483         LabelString           "Question \thequestion."
484         Preamble
485           \theoremstyle{plain}
486     \ifx\thechapter\undefined
487       \newtheorem{question}{\protect\questionname}
488     \else
489       \newtheorem{question}{\protect\questionname}[chapter]
490     \fi
491         EndPreamble
492         LangPreamble
493           \providecommand{\questionname}{_(Question)}
494         EndLangPreamble
495         BabelPreamble
496           \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}}
497         EndBabelPreamble
498         LabelCounter          question
499 End
500
501 Style Question*
502         CopyStyle             Theorem*
503         LatexName             question*
504         LabelString           "Question."
505         Preamble
506           \theoremstyle{plain}
507           \newtheorem*{question*}{\protect\questionname}
508         EndPreamble
509         LangPreamble
510           \providecommand{\questionname}{_(Question)}
511         EndLangPreamble
512         BabelPreamble
513           \addto\captions$$lang{\renewcommand{\questionname}{_(Question)}}
514         EndBabelPreamble
515 End
516
517 Input theorems-refprefix.inc