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