]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-case.inc
svcommon.inc, theorems-without-preamble.inc: correction from previous commit
[lyx.git] / lib / layouts / theorems-case.inc
1 # Original Author : Paul Rubin <rubin@msu.edu>
2 # Modified by Richard Heck to use enumitem
3
4 # Definition of case environment as an enumeration
5
6 # Define Case as an enumeration environment
7 # with its own counters
8
9 Format 41
10
11 Counter casei
12         LabelString "Case \arabic{casei}."
13 End
14 Counter caseii
15         Within casei
16         LabelString "Case \roman{caseii}."
17 End
18 Counter caseiii
19         Within caseii
20         LabelString "Case \alph{caseiii}."
21 End
22 Counter caseiv
23         Within caseiii
24         LabelString "Case \arabic{caseiv}."
25 End
26
27 Style Case
28   Category              Theorem
29   CopyStyle             Enumerate
30   LatexName             casenv
31   LabelType             Enumerate
32   LeftMargin            "Case ###."
33   LabelCounter          case
34   LabelFont
35     Series              Medium
36     Shape               Italic
37   EndFont
38         Requires enumitem
39         # It'd be easier to use \setlist[caseenv] here, but that causes problems
40         # if you nest an ordinary list inside a case environment. See discussion
41         # at bug #7611.
42   Preamble
43     \newlist{casenv}{enumerate}{4}
44     \setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
45     \setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
46     \setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
47     \setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
48     \setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
49   EndPreamble
50   LangPreamble
51     \providecommand{\casename}{_(Case)}
52   EndLangPreamble
53   BabelPreamble
54     \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
55   EndBabelPreamble
56   RefPrefix OFF
57 End