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