1 # Original Author : Paul Rubin <rubin@msu.edu>
2 # Modified by Richard Kimberly Heck to use enumitem
4 # Definition of case environment as an enumeration
6 # Define Case as an enumeration environment
7 # with its own counters
12 GuiName "Case (Level 1)"
13 LabelString "Case \arabic{casei}."
16 GuiName "Case (Level 2)"
18 LabelString "Case \roman{caseii}."
21 GuiName "Case (Level 3)"
23 LabelString "Case \alph{caseiii}."
26 GuiName "Case (Level 4)"
28 LabelString "Case \arabic{caseiv}."
34 LatexType Item_Environment
37 LeftMargin "Case ###."
45 AlignPossible Block, Left
56 Argument listpreamble:1
57 LabelString "List preamble"
58 MenuString "List Preamble"
59 Tooltip "LaTeX code to be inserted before the first item"
67 LabelString "Custom Item|s"
68 Tooltip "A customized item string"
72 # It'd be easier to use \setlist[caseenv] here, but that causes problems
73 # if you nest an ordinary list inside a case environment. See discussion
76 \newlist{casenv}{enumerate}{4}
77 \setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
78 \setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
79 \setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
80 \setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
81 \setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
84 \providecommand{\casename}{_(Case)}
87 \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
91 DocBookAttr role='cases'