mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 14:04:25 +00:00
515708f6eb
Repairs to case environment, from Paul Rubin. Modified by RGH to use
enumitem, since we already have a module for that, and there will be
conflicts between enumerate.sty and enumitem.sty.
A side effect of this, however, is that we will load enumitem.sty
whenver we use case environments.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40492 a592a061-630c-0410-9148-cb99ea01b6c8
(cherry picked from commit 4663e5ec88
)
Conflicts:
lib/layouts/theorems.inc
58 lines
1.6 KiB
PHP
58 lines
1.6 KiB
PHP
# Original Author : Paul Rubin <rubin@msu.edu>
|
|
# Modified by Richard Heck to use enumitem
|
|
|
|
# Definition of case environment as an enumeration
|
|
|
|
# Define Case as an enumeration environment
|
|
# with its own counters
|
|
|
|
Format 35
|
|
|
|
Counter casei
|
|
LabelString "Case \arabic{casei}."
|
|
End
|
|
Counter caseii
|
|
Within casei
|
|
LabelString "Case \roman{caseii}."
|
|
End
|
|
Counter caseiii
|
|
Within caseii
|
|
LabelString "Case \alph{caseiii}."
|
|
End
|
|
Counter caseiv
|
|
Within caseiii
|
|
LabelString "Case \arabic{caseiv}."
|
|
End
|
|
|
|
Style Case
|
|
Category Theorem
|
|
CopyStyle Enumerate
|
|
LatexName casenv
|
|
LabelType Enumerate
|
|
LeftMargin "Case ###."
|
|
LabelCounter case
|
|
LabelFont
|
|
Series Medium
|
|
Shape Italic
|
|
EndFont
|
|
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
|
|
End
|