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