]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-case.inc
cb54e0277e17db062682ab8a0902537486102c64
[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 68
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              Reasoning
29
30   Margin                Static
31   LatexType             Item_Environment
32   LatexName             casenv
33   LabelType             Enumerate
34   LeftMargin            "Case ###."
35   LabelSep              xx
36   ParSkip               0.0
37   ItemSep               0.2
38   TopSep                0.7
39   BottomSep             0.7
40   ParSep                0.3
41   Align                 Block
42   AlignPossible         Block, Left
43   LabelCounter          case
44   LabelFont
45     Series              Medium
46     Shape               Italic
47   EndFont
48   HTMLTag               ol
49   HTMLItem              li
50   HTMLLabel             NONE
51   RefPrefix             enu
52   Argument item:1
53     LabelString   "Custom Item|s"
54     Tooltip       "A customized item string"
55   EndArgument
56   NextNoIndent          1
57         Requires enumitem
58         # It'd be easier to use \setlist[caseenv] here, but that causes problems
59         # if you nest an ordinary list inside a case environment. See discussion
60         # at bug #7611.
61   Preamble
62     \newlist{casenv}{enumerate}{4}
63     \setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
64     \setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
65     \setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
66     \setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
67     \setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
68   EndPreamble
69   LangPreamble
70     \providecommand{\casename}{_(Case)}
71   EndLangPreamble
72   BabelPreamble
73     \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
74   EndBabelPreamble
75   RefPrefix OFF
76 End