]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-bytype.inc
Fix #7495 by adding layouts for ctex document classes and
[lyx.git] / lib / layouts / theorems-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 # - Proof
22 # - Case (regular only -- defined as an enumeration)
23
24 Format 35
25
26 Style Theorem
27         Category              Theorem
28         Margin                First_Dynamic
29         LatexType             Environment
30         LatexName             thm
31         NextNoIndent          1
32         OptionalArgs          1
33         LabelSep              xx
34         ParIndent             MMM
35         ParSkip               0.4
36         ItemSep               0.2
37         TopSep                0.7
38         BottomSep             0.7
39         ParSep                0.3
40         Align                 Block
41         AlignPossible         Left
42         LabelType             Counter
43         LabelCounter          theorem
44         LabelString           "Theorem \thetheorem."
45         Font
46           Shape               Italic
47           Size                Normal
48         EndFont
49         LabelFont
50           Shape               Up
51           Series              Bold
52         EndFont
53         Preamble
54           \theoremstyle{plain}
55           \newtheorem{thm}{\protect\theoremname}
56         EndPreamble
57         LangPreamble
58                 \providecommand{\theoremname}{_(Theorem)}
59         EndLangPreamble
60         BabelPreamble
61                 \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
62         EndBabelPreamble
63         Requires              amsthm
64 End
65
66
67 Style Corollary
68         CopyStyle             Theorem
69         LatexName             cor
70         LabelString           "Corollary \thecorollary."
71         Preamble
72           \theoremstyle{plain}
73           \newtheorem{cor}{\protect\corollaryname}
74         EndPreamble
75         LangPreamble
76                 \providecommand{\corollaryname}{_(Corollary)}
77         EndLangPreamble
78         BabelPreamble
79                 \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}}
80         EndBabelPreamble
81         LabelCounter          corollary
82 End
83
84
85 Style Lemma
86         CopyStyle             Theorem
87         LatexName             lem
88         LabelString           "Lemma \thelemma."
89         Preamble
90           \theoremstyle{plain}
91           \newtheorem{lem}{\protect\lemmaname}
92         EndPreamble
93         LangPreamble
94                 \providecommand{\lemmaname}{_(Lemma)}
95         EndLangPreamble
96         BabelPreamble
97                 \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}}
98         EndBabelPreamble
99         LabelCounter          lemma
100 End
101
102
103 Style Proposition
104         CopyStyle             Theorem
105         LatexName             prop
106         LabelString           "Proposition \theproposition."
107         Preamble
108           \theoremstyle{plain}
109           \newtheorem{prop}{\protect\propositionname}
110         EndPreamble
111         LangPreamble
112                 \providecommand{\propositionname}{_(Proposition)}
113         EndLangPreamble
114         BabelPreamble
115                 \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}}
116         EndBabelPreamble
117         LabelCounter          proposition
118 End
119
120
121 Style Conjecture
122         CopyStyle             Theorem
123         LatexName             conjecture
124         LabelString           "Conjecture \theconjecture."
125         Preamble
126           \theoremstyle{plain}
127           \newtheorem{conjecture}{\protect\conjecturename}
128         EndPreamble
129         LangPreamble
130                 \providecommand{\conjecturename}{_(Conjecture)}
131         EndLangPreamble
132         BabelPreamble
133                 \addto\captions$$lang{\renewcommand{\conjecturename}{_(Conjecture)}}
134         EndBabelPreamble
135         LabelCounter          conjecture
136 End
137
138
139 Style Fact
140         CopyStyle             Theorem
141         LatexName             fact
142         LabelString           "Fact \thefact."
143         Preamble
144           \theoremstyle{plain}
145           \newtheorem{fact}{\protect\factname}
146         EndPreamble
147         LangPreamble
148                 \providecommand{\factname}{_(Fact)}
149         EndLangPreamble
150         BabelPreamble
151                 \addto\captions$$lang{\renewcommand{\factname}{_(Fact)}}
152         EndBabelPreamble
153         LabelCounter          fact
154 End
155
156
157 Style Definition
158         CopyStyle             Theorem
159         LatexName             defn
160         LabelString           "Definition \thedefinition."
161         Font
162           Shape               Up
163         EndFont
164         LabelFont
165           Shape               Up
166           Series              Bold
167         EndFont
168         Preamble
169           \theoremstyle{definition}
170           \newtheorem{defn}{\protect\definitionname}
171         EndPreamble
172         LangPreamble
173                 \providecommand{\definitionname}{_(Definition)}
174         EndLangPreamble
175         BabelPreamble
176                 \addto\captions$$lang{\renewcommand{\definitionname}{_(Definition)}}
177         EndBabelPreamble
178         LabelCounter          definition  
179 End
180
181
182 Style Example
183         CopyStyle             Definition
184         LatexName             example
185         LabelString           "Example \theexample."
186         Preamble
187           \theoremstyle{definition}
188           \newtheorem{example}{\protect\examplename}
189         EndPreamble
190         Requires              amsthm
191         LangPreamble
192                 \providecommand{\examplename}{_(Example)}
193         EndLangPreamble
194         BabelPreamble
195                 \addto\captions$$lang{\renewcommand{\examplename}{_(Example)}}
196         EndBabelPreamble
197         LabelCounter          example
198 End
199
200
201 Style Problem
202         CopyStyle             Definition
203         LatexName             problem
204         LabelString           "Problem \theproblem."
205         Preamble
206           \theoremstyle{definition}
207           \newtheorem{problem}{\protect\problemname}
208         EndPreamble
209         Requires              amsthm
210         LangPreamble
211                 \providecommand{\problemname}{_(Problem)}
212         EndLangPreamble
213         BabelPreamble
214                 \addto\captions$$lang{\renewcommand{\problemname}{_(Problem)}}
215         EndBabelPreamble
216         LabelCounter          problem
217 End
218
219
220 Style Exercise
221         CopyStyle             Definition
222         LatexName             xca
223         LabelString           "Exercise \theexercise."
224         Preamble
225           \theoremstyle{definition}
226           \newtheorem{xca}{\protect\exercisename}
227         EndPreamble
228         Requires              amsthm
229         LangPreamble
230                 \providecommand{\exercisename}{_(Exercise)}
231         EndLangPreamble
232         BabelPreamble
233                 \addto\captions$$lang{\renewcommand{\exercisename}{_(Exercise)}}
234         EndBabelPreamble
235         LabelCounter          exercise
236 End
237
238
239 Style Remark
240         CopyStyle             Theorem
241         LatexName             rem
242         LabelString           "Remark \theremark."
243         Font
244           Shape               Up
245           Size                Normal
246         EndFont
247         LabelFont
248           Series              Medium
249           Shape               Italic
250         EndFont
251         Preamble
252           \theoremstyle{remark}
253           \newtheorem{rem}{\protect\remarkname}
254         EndPreamble
255         LangPreamble
256                 \providecommand{\remarkname}{_(Remark)}
257         EndLangPreamble
258         BabelPreamble
259                 \addto\captions$$lang{\renewcommand{\remarkname}{_(Remark)}}
260         EndBabelPreamble
261         LabelCounter          remark
262 End
263
264
265 Style Claim
266         CopyStyle             Remark
267         LatexName             claim
268         LabelString           "Claim \theclaim."
269         Preamble
270           \theoremstyle{remark}
271           \newtheorem{claim}{\protect\claimname}
272         EndPreamble
273         Requires              amsthm
274         LangPreamble
275                 \providecommand{\claimname}{_(Claim)}
276         EndLangPreamble
277         BabelPreamble
278                 \addto\captions$$lang{\renewcommand{\claimname}{_(Claim)}}
279         EndBabelPreamble
280         LabelCounter          claim
281 End
282
283
284 # Define Case as an enumeration environment
285 Style Case
286         Category              Theorem
287         CopyStyle             Enumerate
288         LatexName             caseenv
289         LabelType             Static
290         LeftMargin            "Case ###."
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         RefPrefix OFF
316 End
317
318 Input theorems-refprefix.inc