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