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