]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-ams-bytype.inc
Update all layouts to format 35.
[lyx.git] / lib / layouts / theorems-ams-bytype.inc
1 # Original Author : David L. Johnson <dlj0@lehigh.edu>
2 # Probably broken by Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
3 # modified and modularized by Emmanuel GUREGHIAN <gureghia@boston.bertin.fr>
4 # Tinkered with Sep. '07 by Paul Rubin <rubin@msu.edu>
5 # Modularized Jan 08 by Richard Heck <rgheck@comcast.net>
6 # Hacked June '09 by Paul Rubin <rubin@msu.edu> to use separate counters
7
8 # The environnements defined are :
9 # - Theorem
10 # - Corollary
11 # - Lemma
12 # - Proposition
13 # - Conjecture
14 # - Fact
15 # - Definition
16 # - Example
17 # - Problem
18 # - Exercise
19 # - Remark
20 # - Claim
21 # - Case (regular only -- defined as an enumeration)
22
23 # We need separate counters for each theorem-like style.
24 Format 35
25 Counter theorem
26 End
27 Counter corollary
28 End
29 Counter lemma
30 End
31 Counter proposition
32 End
33 Counter conjecture
34 End
35 Counter fact
36 End
37 Counter definition
38 End
39 Counter example
40 End
41 Counter problem
42 End
43 Counter exercise
44 End
45 Counter remark
46 End
47 Counter claim
48 End
49
50 Style Theorem
51         Category              Theorem
52         Margin                First_Dynamic
53         LatexType             Environment
54         LatexName             thm
55         NextNoIndent          1
56         OptionalArgs          1
57         LabelSep              xx
58         ParIndent             MMM
59         ParSkip               0.4
60         ItemSep               0.2
61         TopSep                0.7
62         BottomSep             0.7
63         ParSep                0.3
64         Align                 Block
65         AlignPossible         Left
66         LabelType             Counter
67         LabelCounter          theorem
68         LabelString           "Theorem \thetheorem."
69         Font
70           Shape               Italic
71           Size                Normal
72         EndFont
73         LabelFont
74           Shape               Up
75           Series              Bold
76         EndFont
77         Preamble
78                 \theoremstyle{plain}
79                 \newtheorem{thm}{\protect\theoremname}
80         EndPreamble
81         LangPreamble
82                 \providecommand{\theoremname}{_(Theorem)}
83         EndLangPreamble
84         BabelPreamble
85                 \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
86         EndBabelPreamble
87         Requires              amsthm
88 End
89
90
91 Style Corollary
92         CopyStyle             Theorem
93         LatexName             cor
94         LabelString           "Corollary \thecorollary."
95         Preamble
96           \theoremstyle{plain}
97           \newtheorem{cor}{\protect\corollaryname}
98         EndPreamble
99         LabelCounter          corollary
100         LangPreamble
101                 \providecommand{\corollaryname}{_(Corollary)}
102         EndLangPreamble
103         BabelPreamble
104                 \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}}
105         EndBabelPreamble
106 End
107
108
109 Style Lemma
110         CopyStyle             Theorem
111         LatexName             lem
112         LabelString           "Lemma \thelemma."
113         Preamble
114           \theoremstyle{plain}
115           \newtheorem{lem}{\protect\lemmaname}
116         EndPreamble
117         LangPreamble
118           \providecommand{\lemmaname}{_(Lemma)}
119         EndLangPreamble
120         BabelPreamble
121           \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}}
122         EndBabelPreamble
123         LabelCounter          lemma
124 End
125
126
127 Style Proposition
128         CopyStyle             Theorem
129         LatexName             prop
130         LabelString           "Proposition \theproposition."
131         Preamble
132           \theoremstyle{plain}
133           \newtheorem{prop}{\protect\propositionname}
134         EndPreamble
135         LangPreamble
136           \providecommand{\propositionname}{_(Proposition)}
137         EndLangPreamble
138         BabelPreamble
139           \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}}
140         EndBabelPreamble
141         LabelCounter          proposition
142 End
143
144
145 Style Conjecture
146         CopyStyle             Theorem
147         LatexName             conjecture
148         LabelString           "Conjecture \theconjecture."
149         Preamble
150           \theoremstyle{plain}
151           \newtheorem{conjecture}{\protect\conjecturename}
152         EndPreamble
153         LangPreamble
154           \providecommand{\conjecturename}{_(Conjecture)}
155         EndLangPreamble
156         BabelPreamble
157           \addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}}
158         EndBabelPreamble
159         LabelCounter          conjecture
160 End
161
162
163 Style Fact
164         CopyStyle             Theorem
165         LatexName             fact
166         LabelString           "Fact \thefact."
167         Preamble
168           \theoremstyle{plain}
169           \newtheorem{fact}{\protect\factname}
170         EndPreamble
171         LangPreamble
172           \providecommand{\factname}{_(Fact)}
173         EndLangPreamble
174         BabelPreamble
175           \addto\captions$$lang{\renewcommand{\factname}{_(Fact)}}
176         EndBabelPreamble
177         LabelCounter          fact
178 End
179
180
181 Style Definition
182         CopyStyle             Theorem
183         LatexName             defn
184         LabelString           "Definition \thedefinition."
185         Font
186           Shape               Up
187         EndFont
188         LabelFont
189           Shape               Up
190           Series              Bold
191         EndFont
192         Preamble
193           \theoremstyle{definition}
194           \newtheorem{defn}{\protect\definitionname}
195         EndPreamble
196         LangPreamble
197           \providecommand{\definitionname}{_(Definition)}
198         EndLangPreamble
199         BabelPreamble
200           \addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}}
201         EndBabelPreamble
202         LabelCounter          definition
203 End
204
205
206 Style Example
207         CopyStyle             Definition
208         LatexName             example
209         LabelString           "Example \theexample."
210         Preamble
211          \theoremstyle{definition}
212           \newtheorem{example}{\protect\examplename}
213         EndPreamble
214         Requires              amsthm
215         LangPreamble
216           \providecommand{\examplename}{_(Example)}
217         EndLangPreamble
218         BabelPreamble
219           \addto\captions$$lang{\renewcommand{\examplename}{_(Example)}}
220         EndBabelPreamble
221         LabelCounter          example
222 End
223
224
225 Style Problem
226         CopyStyle             Definition
227         LatexName             problem
228         LabelString           "Problem \theproblem."
229         Preamble
230           \theoremstyle{definition}
231           \newtheorem{problem}{\protect\problemname}
232         EndPreamble
233         Requires              amsthm
234         LangPreamble
235           \providecommand{\problemname}{_(Problem)}
236         EndLangPreamble
237         BabelPreamble
238           \addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}}
239         EndBabelPreamble
240         LabelCounter          problem
241 End
242
243
244 Style Exercise
245         CopyStyle             Definition
246         LatexName             xca
247         LabelString           "Exercise \theexercise."
248         Preamble
249           \theoremstyle{definition}
250           \newtheorem{xca}{\protect\exercisename}
251         EndPreamble
252         Requires              amsthm
253         LangPreamble
254           \providecommand{\exercisename}{_(Exercise)}
255         EndLangPreamble
256         BabelPreamble
257           \addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}}
258         EndBabelPreamble
259         LabelCounter          exercise
260 End
261
262
263 Style Remark
264         CopyStyle             Theorem
265         LatexName             rem
266         LabelString           "Remark \theremark."
267         Font
268           Shape               Up
269           Size                Normal
270         EndFont
271         LabelFont
272           Series              Medium
273           Shape               Italic
274         EndFont
275         Preamble
276           \theoremstyle{remark}
277           \newtheorem{rem}{\protect\remarkname}
278         EndPreamble
279         LangPreamble
280           \providecommand{\remarkname}{_(Remark)}
281         EndLangPreamble
282         BabelPreamble
283           \addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}}
284         EndBabelPreamble
285         LabelCounter          remark
286 End
287
288
289 Style Claim
290         CopyStyle             Remark
291         LatexName             claim
292         LabelString           "Claim \theclaim."
293         Preamble
294           \theoremstyle{remark}
295           \newtheorem{claim}{\protect\claimname}
296         EndPreamble
297         Requires              amsthm
298         LangPreamble
299           \providecommand{\claimname}{_(Claim)}
300         EndLangPreamble
301         BabelPreamble
302           \addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}}
303         EndBabelPreamble
304         LabelCounter          claim
305 End
306
307
308 # Define Case as an enumeration environment
309 Style Case
310         Category              Theorem
311         Margin                Static
312         LatexType             Item_Environment
313         LatexName             caseenv
314         LabelType             Itemize
315         NextNoIndent          1
316         LeftMargin            "Case ###."
317         ParSkip               0.0
318         ItemSep               0.2
319         TopSep                0.7
320         BottomSep             0.7
321         ParSep                0.3
322         Align                 Block
323         AlignPossible         Block, Left
324         LabelSep              xx
325         LabelString           "Case #."
326         LabelFont
327           Series              Medium
328           Shape               Italic
329         EndFont
330         Preamble
331           \newcounter{casectr}
332           \newenvironment{caseenv}
333           {\begin{list}{{\itshape\ \protect\casename} \arabic{casectr}.}{%
334            \setlength{\leftmargin}{\labelwidth}
335            \addtolength{\leftmargin}{\parskip}
336            \setlength{\itemindent}{\listparindent}
337            \setlength{\itemsep}{\medskipamount}
338            \setlength{\topsep}{\itemsep}}
339            \setcounter{casectr}{0}
340            \usecounter{casectr}}
341           {\end{list}}
342         EndPreamble
343         LangPreamble
344           \providecommand{\casename}{_(Case)}
345         EndLangPreamble
346         BabelPreamble
347           \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
348         EndBabelPreamble
349 End