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