]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-case.inc
fix column default of IEEEtran layout
[lyx.git] / lib / layouts / theorems-case.inc
1 # Original Author : Paul Rubin <rubin@msu.edu>
2 # Modified by Richard Kimberly 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 104
10
11 Counter casei
12         GuiName "Case (Level 1)" 
13         PrettyFormat "Case \arabic{casei}"
14         LabelString "Case \arabic{casei}."
15 End
16 Counter caseii
17         GuiName "Case (Level 2)"
18         Within casei
19         LabelString "Case \roman{caseii}."
20         PrettyFormat "Case \roman{caseii}"
21 End
22 Counter caseiii
23         GuiName "Case (Level 3)"
24         Within caseii
25         LabelString "Case \alph{caseiii}."
26         PrettyFormat "Case \alph{caseiii}"
27 End
28 Counter caseiv
29         GuiName "Case (Level 4)"
30         Within caseiii
31         PrettyFormat "Case \arabic{caseiv}"
32         LabelString "Case \arabic{caseiv}."
33 End
34
35 Style Case
36   Category              Reasoning
37   Margin                Static
38   LatexType             Item_Environment
39   LatexName             casenv
40   LabelType             Enumerate
41   LeftMargin            "Case ###."
42   LabelSep              xx
43   ParSkip               0.0
44   ItemSep               0.2
45   TopSep                0.7
46   BottomSep             0.7
47   ParSep                0.3
48   Align                 Block
49   AlignPossible         Block, Left
50   LabelCounter          case
51   LabelFont
52     Series              Medium
53     Shape               Italic
54   EndFont
55   HTMLTag               ol
56   HTMLItem              li
57   HTMLLabel             NONE
58   HTMLClass             lyxcase
59   RefPrefix             enu
60   Argument listpreamble:1
61     LabelString    "List preamble"
62     MenuString     "List Preamble"
63     Tooltip        "LaTeX code to be inserted before the first item"
64     PassThru       1
65     Font
66       Family typewriter
67       Color latex
68     EndFont
69   EndArgument
70   Argument item:1
71     LabelString   "Custom Item|s"
72     Tooltip       "A customized item string"
73   EndArgument
74   NextNoIndent          1
75         Requires enumitem
76         # It'd be easier to use \setlist[caseenv] here, but that causes problems
77         # if you nest an ordinary list inside a case environment. See discussion
78         # at bug #7611.
79   Preamble
80     \newlist{casenv}{enumerate}{4}
81     \setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
82     \setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
83     \setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
84     \setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
85     \setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
86   EndPreamble
87   LangPreamble
88     \providecommand{\casename}{_(Case)}
89   EndLangPreamble
90   BabelPreamble
91     \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
92   EndBabelPreamble
93   RefPrefix OFF
94   DocBookTag            para
95   DocBookAttr           role='cases'
96 End