2011-12-13 19:50:36 +00:00
|
|
|
# Original Author : Paul Rubin <rubin@msu.edu>
|
2020-12-05 22:09:17 +00:00
|
|
|
# Modified by Richard Kimberly Heck to use enumitem
|
2011-12-13 19:50:36 +00:00
|
|
|
|
|
|
|
# Definition of case environment as an enumeration
|
|
|
|
|
|
|
|
# Define Case as an enumeration environment
|
|
|
|
# with its own counters
|
|
|
|
|
2023-07-28 22:21:47 +00:00
|
|
|
Format 104
|
2011-12-13 19:50:36 +00:00
|
|
|
|
|
|
|
Counter casei
|
2023-07-28 22:22:14 +00:00
|
|
|
GuiName "Case (Level 1)"
|
|
|
|
PrettyFormat "Case \arabic{casei}"
|
|
|
|
LabelString "Case \arabic{casei}."
|
2011-12-13 19:50:36 +00:00
|
|
|
End
|
|
|
|
Counter caseii
|
2020-05-03 02:37:18 +00:00
|
|
|
GuiName "Case (Level 2)"
|
2023-07-31 22:41:11 +00:00
|
|
|
Within casei
|
|
|
|
LabelString "Case \roman{caseii}."
|
|
|
|
PrettyFormat "Case \roman{caseii}"
|
2011-12-13 19:50:36 +00:00
|
|
|
End
|
|
|
|
Counter caseiii
|
2020-05-03 02:37:18 +00:00
|
|
|
GuiName "Case (Level 3)"
|
2023-07-31 22:41:11 +00:00
|
|
|
Within caseii
|
|
|
|
LabelString "Case \alph{caseiii}."
|
|
|
|
PrettyFormat "Case \alph{caseiii}"
|
2011-12-13 19:50:36 +00:00
|
|
|
End
|
|
|
|
Counter caseiv
|
2020-05-03 02:37:18 +00:00
|
|
|
GuiName "Case (Level 4)"
|
2023-07-31 22:41:11 +00:00
|
|
|
Within caseiii
|
|
|
|
PrettyFormat "Case \arabic{caseiv}"
|
|
|
|
LabelString "Case \arabic{caseiv}."
|
2011-12-13 19:50:36 +00:00
|
|
|
End
|
|
|
|
|
|
|
|
Style Case
|
2022-12-31 10:28:56 +00:00
|
|
|
Category Reasoning
|
|
|
|
Margin Static
|
|
|
|
LatexType Item_Environment
|
|
|
|
LatexName casenv
|
|
|
|
LabelType Enumerate
|
|
|
|
LeftMargin "Case ###."
|
|
|
|
LabelSep xx
|
|
|
|
ParSkip 0.0
|
|
|
|
ItemSep 0.2
|
|
|
|
TopSep 0.7
|
|
|
|
BottomSep 0.7
|
|
|
|
ParSep 0.3
|
|
|
|
Align Block
|
|
|
|
AlignPossible Block, Left
|
|
|
|
LabelCounter case
|
|
|
|
LabelFont
|
|
|
|
Series Medium
|
|
|
|
Shape Italic
|
|
|
|
EndFont
|
|
|
|
HTMLTag ol
|
|
|
|
HTMLItem li
|
|
|
|
HTMLLabel NONE
|
|
|
|
HTMLClass lyxcase
|
|
|
|
RefPrefix enu
|
|
|
|
Argument listpreamble:1
|
|
|
|
LabelString "List preamble"
|
|
|
|
MenuString "List Preamble"
|
|
|
|
Tooltip "LaTeX code to be inserted before the first item"
|
|
|
|
PassThru 1
|
|
|
|
Font
|
|
|
|
Family typewriter
|
|
|
|
Color latex
|
2018-08-17 08:22:32 +00:00
|
|
|
EndFont
|
2022-12-31 10:28:56 +00:00
|
|
|
EndArgument
|
|
|
|
Argument item:1
|
|
|
|
LabelString "Custom Item|s"
|
|
|
|
Tooltip "A customized item string"
|
|
|
|
EndArgument
|
|
|
|
NextNoIndent 1
|
|
|
|
Requires enumitem
|
|
|
|
# It'd be easier to use \setlist[caseenv] here, but that causes problems
|
|
|
|
# if you nest an ordinary list inside a case environment. See discussion
|
|
|
|
# at bug #7611.
|
|
|
|
Preamble
|
|
|
|
\newlist{casenv}{enumerate}{4}
|
|
|
|
\setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
|
|
|
|
\setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
|
|
|
|
\setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
|
|
|
|
\setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
|
|
|
|
\setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
|
|
|
|
EndPreamble
|
|
|
|
LangPreamble
|
|
|
|
\providecommand{\casename}{_(Case)}
|
|
|
|
EndLangPreamble
|
|
|
|
BabelPreamble
|
|
|
|
\addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
|
|
|
|
EndBabelPreamble
|
|
|
|
RefPrefix OFF
|
|
|
|
DocBookTag para
|
|
|
|
DocBookAttr role='cases'
|
2011-12-13 19:50:36 +00:00
|
|
|
End
|