]> git.lyx.org Git - features.git/blob - lib/layouts/theorems-ams.inc
Partial fix of bug 1476:
[features.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 12
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                 \providecommand{\theoremname}{Theorem}
53                 \theoremstyle{plain}
54                 \newtheorem{thm}{\protect\theoremname}
55         EndPreamble
56         I18nPreamble
57           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}\fi}
58         EndI18nPreamble
59         Requires              amsthm
60 End
61
62
63 Style Corollary
64         CopyStyle             Theorem
65         DependsOn             Theorem
66         LatexName             cor
67         LabelString           "Corollary \thetheorem."
68         Preamble
69           \providecommand{\corollaryname}{Corollary}
70           \theoremstyle{plain}
71           \newtheorem{cor}[thm]{\protect\corollaryname}
72         EndPreamble
73         I18nPreamble
74           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}}\fi}
75         EndI18nPreamble
76 End
77
78
79 Style Lemma
80         CopyStyle             Theorem
81         DependsOn             Theorem
82         LatexName             lem
83         LabelString           "Lemma \thetheorem."
84         Preamble
85           \providecommand{\lemmaname}{Lemma}
86           \theoremstyle{plain}
87           \newtheorem{lem}[thm]{\protect\lemmaname}
88         EndPreamble
89         I18nPreamble
90           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}}\fi}
91         EndI18nPreamble
92 End
93
94
95 Style Proposition
96         CopyStyle             Theorem
97         DependsOn             Theorem
98         LatexName             prop
99         LabelString           "Proposition \thetheorem."
100         Preamble
101           \providecommand{\propositionname}{Proposition}
102           \theoremstyle{plain}
103           \newtheorem{prop}[thm]{\protect\propositionname}
104         EndPreamble
105         I18nPreamble
106           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}}\fi}
107         EndI18nPreamble
108 End
109
110
111 Style Conjecture
112         CopyStyle             Theorem
113         DependsOn             Theorem
114         LatexName             conjecture
115         LabelString           "Conjecture \thetheorem."
116         Preamble
117           \providecommand{\conjecturename}{Conjecture}
118           \theoremstyle{plain}
119           \newtheorem{conjecture}[thm]{\protect\conjecturename}
120         EndPreamble
121         I18nPreamble
122           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}}\fi}
123         EndI18nPreamble
124 End
125
126
127 Style Fact
128         CopyStyle             Theorem
129         DependsOn             Theorem
130         LatexName             fact
131         LabelString           "Fact \thetheorem."
132         Preamble
133           \providecommand{\factname}{Fact}
134           \theoremstyle{plain}
135           \newtheorem{fact}[thm]{\protect\factname}
136         EndPreamble
137         I18nPreamble
138           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\factname}{_(Fact)}}\fi}
139         EndI18nPreamble
140 End
141
142
143 Style Definition
144         CopyStyle             Theorem
145         DependsOn             Theorem
146         LatexName             defn
147         LabelString           "Definition \thetheorem."
148         Font
149           Shape               Up
150         EndFont
151         LabelFont
152           Shape               Up
153           Series              Bold
154         EndFont
155         Preamble
156           \providecommand{\definitionname}{Definition}
157           \theoremstyle{definition}
158           \newtheorem{defn}[thm]{\protect\definitionname}
159         EndPreamble
160         I18nPreamble
161           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}}\fi}
162         EndI18nPreamble
163 End
164
165
166 Style Example
167         CopyStyle             Definition
168         LatexName             example
169         LabelString           "Example \thetheorem."
170         Preamble
171           \providecommand{\examplename}{Example}
172           \theoremstyle{definition}
173           \newtheorem{example}[thm]{\protect\examplename}
174         EndPreamble
175         I18nPreamble
176           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\examplename}{_(Example)}}\fi}
177         EndI18nPreamble
178 End
179
180
181 Style Problem
182         CopyStyle             Definition
183         LatexName             problem
184         LabelString           "Problem \thetheorem."
185         Preamble
186           \providecommand{\problemname}{Problem}
187           \theoremstyle{definition}
188           \newtheorem{problem}[thm]{\protect\problemname}
189         EndPreamble
190         I18nPreamble
191           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}}\fi}
192         EndI18nPreamble
193 End
194
195
196 Style Exercise
197         CopyStyle             Definition
198         LatexName             xca
199         LabelString           "Exercise \thetheorem."
200         Preamble
201           \providecommand{\exercisename}{Exercise}
202           \theoremstyle{definition}
203           \newtheorem{xca}[thm]{\protect\exercisename}
204         EndPreamble
205         I18nPreamble
206           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}}\fi}
207         EndI18nPreamble
208 End
209
210
211 Style Remark
212         CopyStyle             Theorem
213         DependsOn             Theorem
214         LatexName             rem
215         LabelString           "Remark \thetheorem."
216         Font
217           Shape               Up
218           Size                Normal
219         EndFont
220         LabelFont
221           Series              Medium
222           Shape               Italic
223         EndFont
224         Preamble
225           \providecommand{\remarkname}{Remark}
226           \theoremstyle{remark}
227           \newtheorem{rem}[thm]{\protect\remarkname}
228         EndPreamble
229         I18nPreamble
230           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}}\fi}
231         EndI18nPreamble
232 End
233
234
235 Style Claim
236         CopyStyle             Remark
237         LatexName             claim
238         LabelString           "Claim \thetheorem."
239         Preamble
240           \providecommand{\claimname}{Claim}
241           \theoremstyle{remark}
242           \newtheorem{claim}[thm]{\protect\claimname}
243         EndPreamble
244         I18nPreamble
245           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}}\fi}
246         EndI18nPreamble
247 End
248
249
250 # Define Case as an enumeration environment
251 Style Case
252         Category              Theorem
253         Margin                Static
254         LatexType             Item_Environment
255         LatexName             caseenv
256         LabelType             Static
257         NextNoIndent          1
258         LeftMargin            "Case ###."
259         ParSkip               0.0
260         ItemSep               0.2
261         TopSep                0.7
262         BottomSep             0.7
263         ParSep                0.3
264         Align                 Block
265         AlignPossible         Block, Left
266         LabelSep              xx
267         LabelString           "Case #."
268         LabelFont
269           Series              Medium
270           Shape               Italic
271         EndFont
272         Preamble
273           \providecommand{\casename}{Case}
274           \newcounter{casectr}
275           \newenvironment{caseenv}
276           {\begin{list}{{\itshape\ \protect\casename} \arabic{casectr}.}{%
277            \setlength{\leftmargin}{\labelwidth}
278            \addtolength{\leftmargin}{\parskip}
279            \setlength{\itemindent}{\listparindent}
280            \setlength{\itemsep}{\medskipamount}
281            \setlength{\topsep}{\itemsep}}
282            \setcounter{casectr}{0}
283            \usecounter{casectr}}
284           {\end{list}}
285         EndPreamble
286         I18nPreamble
287           \AtBeginDocument{\ifx\LdfInit\undefined\relax\else\addto\captions$$lang{\renewcommand{\casename}{_(Case)}}\fi}
288         EndI18nPreamble
289 End