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 LabelString "Case \arabic{casei}."
16 LabelString "Case \roman{caseii}."
20 LabelString "Case \alph{caseiii}."
24 LabelString "Case \arabic{caseiv}."
31 LatexType Item_Environment
34 LeftMargin "Case ###."
42 AlignPossible Block, Left
53 LabelString "Custom Item|s"
54 Tooltip "A customized item string"
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
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*}
70 \providecommand{\casename}{_(Case)}
73 \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}