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