]> git.lyx.org Git - lyx.git/blob - lib/layouts/theorems-case.inc
Make Word Wrap property confiurable by language
[lyx.git] / lib / layouts / theorems-case.inc
1 # Original Author : Paul Rubin <rubin@msu.edu>
2 # Modified by Richard Heck to use enumitem
3
4 # Definition of case environment as an enumeration
5
6 # Define Case as an enumeration environment
7 # with its own counters
8
9 Format 74
10
11 Counter casei
12         LabelString "Case \arabic{casei}."
13 End
14 Counter caseii
15         Within casei
16         LabelString "Case \roman{caseii}."
17 End
18 Counter caseiii
19         Within caseii
20         LabelString "Case \alph{caseiii}."
21 End
22 Counter caseiv
23         Within caseiii
24         LabelString "Case \arabic{caseiv}."
25 End
26
27 Style Case
28   Category              Reasoning
29   Margin                Static
30   LatexType             Item_Environment
31   LatexName             casenv
32   LabelType             Enumerate
33   LeftMargin            "Case ###."
34   LabelSep              xx
35   ParSkip               0.0
36   ItemSep               0.2
37   TopSep                0.7
38   BottomSep             0.7
39   ParSep                0.3
40   Align                 Block
41   AlignPossible         Block, Left
42   LabelCounter          case
43   LabelFont
44     Series              Medium
45     Shape               Italic
46   EndFont
47   HTMLTag               ol
48   HTMLItem              li
49   HTMLLabel             NONE
50   RefPrefix             enu
51   Argument listpreamble:1
52     LabelString    "List preamble"
53     MenuString     "List Preamble"
54     Tooltip        "LaTeX code to be inserted before the first item"
55     PassThru       1
56     Font
57       Family typewriter
58       Color latex
59     EndFont
60   EndArgument
61   Argument item:1
62     LabelString   "Custom Item|s"
63     Tooltip       "A customized item string"
64   EndArgument
65   NextNoIndent          1
66         Requires enumitem
67         # It'd be easier to use \setlist[caseenv] here, but that causes problems
68         # if you nest an ordinary list inside a case environment. See discussion
69         # at bug #7611.
70   Preamble
71     \newlist{casenv}{enumerate}{4}
72     \setlist[casenv]{leftmargin=*,align=left,widest={iiii}}
73     \setlist[casenv,1]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
74     \setlist[casenv,2]{label={{\itshape\ \casename} \roman*.},ref=\roman*}
75     \setlist[casenv,3]{label={{\itshape\ \casename\ \alph*.}},ref=\alph*}
76     \setlist[casenv,4]{label={{\itshape\ \casename} \arabic*.},ref=\arabic*}
77   EndPreamble
78   LangPreamble
79     \providecommand{\casename}{_(Case)}
80   EndLangPreamble
81   BabelPreamble
82     \addto\captions$$lang{\renewcommand{\casename}{_(Case)}}
83   EndBabelPreamble
84   RefPrefix OFF
85 End