1 # Original Author : Paul Rubin <rubin@msu.edu>
2 # Modified by Richard 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
55 Argument listpreamble:1
56 LabelString "List preamble"
57 MenuString "List Preamble"
58 Tooltip "LaTeX code to be inserted before the first item"
66 LabelString "Custom Item|s"
67 Tooltip "A customized item string"
71 # It'd be easier to use \setlist[caseenv] here, but that causes problems
72 # if you nest an ordinary list inside a case environment. See discussion
75 \newlist{casenv}{enumerate}{4}
76 \setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
77 \setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
78 \setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
79 \setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
80 \setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
83 \providecommand{\casename}{_(Case)}
86 \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}