]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems.inc
Some initial HTML for theorem environments.
[lyx.git] / lib / layouts / theorems.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 14
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         HTMLTag               div
63         HTMLAttr              class="theorem"
64         HTMLLabel             span
65         HTMLLabelAttr         class="theoremlabel"
66 End
67
68
69 Style Corollary
70         CopyStyle             Theorem
71         DependsOn             Theorem
72         LatexName             cor
73         LabelString           "Corollary \thetheorem."
74         Preamble
75                 \theoremstyle{plain}
76                 \newtheorem{cor}[thm]{\protect\corollaryname}
77         EndPreamble
78         LangPreamble
79                 \providecommand{\corollaryname}{_(Corollary)}
80         EndLangPreamble
81         BabelPreamble
82                 \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}}
83         EndBabelPreamble
84 End
85
86
87 Style Lemma
88         CopyStyle             Theorem
89         DependsOn             Theorem
90         LatexName             lem
91         LabelString           "Lemma \thetheorem."
92         Preamble
93                 \theoremstyle{plain}
94                 \newtheorem{lem}[thm]{\protect\lemmaname}
95         EndPreamble
96         LangPreamble
97                 \providecommand{\lemmaname}{_(Lemma)}
98         EndLangPreamble
99         BabelPreamble
100                 \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}}
101         EndBabelPreamble
102 End
103
104
105 Style Proposition
106         CopyStyle             Theorem
107         DependsOn             Theorem
108         LatexName             prop
109         LabelString           "Proposition \thetheorem."
110         Preamble
111                 \theoremstyle{plain}
112                 \newtheorem{prop}[thm]{\protect\propositionname}
113         EndPreamble
114         LangPreamble
115                 \providecommand{\propositionname}{_(Proposition)}
116         EndLangPreamble
117         BabelPreamble
118                 \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}}
119         EndBabelPreamble
120 End
121
122
123 Style Conjecture
124         CopyStyle             Theorem
125         DependsOn             Theorem
126         LatexName             conjecture
127         LabelString           "Conjecture \thetheorem."
128         Preamble
129                 \theoremstyle{plain}
130                 \newtheorem{conjecture}[thm]{\protect\conjecturename}
131         EndPreamble
132         LangPreamble
133                 \providecommand{\conjecturename}{_(Conjecture)}
134         EndLangPreamble
135         BabelPreamble
136                 \addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}}
137         EndBabelPreamble
138 End
139
140
141 Style Fact
142         CopyStyle             Theorem
143         DependsOn             Theorem
144         LatexName             fact
145         LabelString           "Fact \thetheorem."
146         Preamble
147                 \theoremstyle{plain}
148                 \newtheorem{fact}[thm]{\protect\factname}
149         EndPreamble
150         LangPreamble
151                 \providecommand{\factname}{_(Fact)}
152         EndLangPreamble
153         BabelPreamble
154                 \addto\captions$$lang{\renewcommand{\factname}{_(Fact)}}
155         EndBabelPreamble
156 End
157
158
159 Style Definition
160         CopyStyle             Theorem
161         DependsOn             Theorem
162         LatexName             defn
163         LabelString           "Definition \thetheorem."
164         Font
165           Shape               Up
166         EndFont
167         LabelFont
168           Shape               Up
169           Series              Bold
170         EndFont
171         Preamble
172                 \theoremstyle{definition}
173                 \newtheorem{defn}[thm]{\protect\definitionname}
174         EndPreamble
175         LangPreamble
176                 \providecommand{\definitionname}{_(Definition)}
177         EndLangPreamble
178         BabelPreamble
179                 \addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}}
180         EndBabelPreamble
181 End
182
183
184 Style Example
185         CopyStyle             Definition
186         LatexName             example
187         LabelString           "Example \thetheorem."
188         Preamble
189                 \theoremstyle{definition}
190                 \newtheorem{example}[thm]{\protect\examplename}
191         EndPreamble
192         LangPreamble
193                 \providecommand{\examplename}{_(Example)}
194         EndLangPreamble
195         BabelPreamble
196                 \addto\captions$$lang{\renewcommand{\examplename}{_(Example)}}
197         EndBabelPreamble
198 End
199
200
201 Style Problem
202         CopyStyle             Definition
203         LatexName             problem
204         LabelString           "Problem \thetheorem."
205         Preamble
206                 \theoremstyle{definition}
207                 \newtheorem{problem}[thm]{\protect\problemname}
208         EndPreamble
209         LangPreamble
210                 \providecommand{\problemname}{_(Problem)}
211         EndLangPreamble
212         BabelPreamble
213                 \addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}}
214         EndBabelPreamble
215 End
216
217
218 Style Exercise
219         CopyStyle             Definition
220         LatexName             xca
221         LabelString           "Exercise \thetheorem."
222         Preamble
223                 \theoremstyle{definition}
224                 \newtheorem{xca}[thm]{\protect\exercisename}
225         EndPreamble
226         LangPreamble
227                 \providecommand{\exercisename}{_(Exercise)}
228         EndLangPreamble
229         BabelPreamble
230                 \addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}}
231         EndBabelPreamble
232 End
233
234
235 Style Remark
236         CopyStyle             Theorem
237         DependsOn             Theorem
238         LatexName             rem
239         LabelString           "Remark \thetheorem."
240         Font
241           Shape               Up
242           Size                Normal
243         EndFont
244         LabelFont
245           Series              Medium
246           Shape               Italic
247         EndFont
248         Preamble
249                 \theoremstyle{remark}
250                 \newtheorem{rem}[thm]{\protect\remarkname}
251         EndPreamble
252         LangPreamble
253                 \providecommand{\remarkname}{_(Remark)}
254         EndLangPreamble
255         BabelPreamble
256                 \addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}}
257         EndBabelPreamble
258 End
259
260
261 Style Claim
262         CopyStyle             Remark
263         LatexName             claim
264         LabelString           "Claim \thetheorem."
265         Preamble
266                 \theoremstyle{remark}
267                 \newtheorem{claim}[thm]{\protect\claimname}
268         EndPreamble
269         LangPreamble
270                 \providecommand{\claimname}{_(Claim)}
271         EndLangPreamble
272         BabelPreamble
273                 \addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}}
274         EndBabelPreamble
275 End
276
277
278 # Define Case as an enumeration environment
279 Style Case
280         Category              Theorem
281         CopyStyle             Enumerate
282         LatexName             caseenv
283         LabelType             Static
284         LeftMargin            "Case ###."
285         LabelString           "Case #."
286         LabelFont
287           Series              Medium
288           Shape               Italic
289         EndFont
290         Preamble
291                 \newcounter{casectr}
292                 \newenvironment{caseenv}
293                 {\begin{list}{{\itshape\ \protect\casename} \arabic{casectr}.}{%
294                 \setlength{\leftmargin}{\labelwidth}
295                 \addtolength{\leftmargin}{\parskip}
296                 \setlength{\itemindent}{\listparindent}
297                 \setlength{\itemsep}{\medskipamount}
298                 \setlength{\topsep}{\itemsep}}
299                 \setcounter{casectr}{0}
300                 \usecounter{casectr}}
301                 {\end{list}}
302         EndPreamble
303         LangPreamble
304                 \providecommand{\casename}{_(Case)}
305         EndLangPreamble
306         BabelPreamble
307                 \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
308         EndBabelPreamble
309 End