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