1 #\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)}
\r
3 # Control the layout of enumerate, itemize and description
\r
4 # with an optional argument.
\r
5 # See http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf
\r
7 # Author: Günter Milde <milde@users.berlios.de>
\r
9 # 2008-12-04 first published version
\r
10 # 2009-02-02 use name Labeling for "LyX-List/Labeling" list type,
\r
11 # copy standard layout verbatim for failsave working with
\r
12 # both KOMA and non-KOMA document classes
\r
13 # 2010-11-16 use Require keyword instead of \usepackage in preamble
\r
15 # The package enumitem provides user control over the layout of the three
\r
16 # basic list environments: enumerate, itemize and description. It supersedes
\r
17 # both enumerate and mdwlist (providing well-structured replacements for all
\r
18 # their funtionality), and in addition provides functions to compute the
\r
19 # layout of labels, and to ‘clone’ the standard environments, to create new
\r
20 # environments with counters of their own.
\r
22 # - fancy labels and fancy refs,
\r
23 # - leftmargin, labelsep and labelwidth automatically set,
\r
24 # - changes applied globally or only in one of the three
\r
25 # types or even in a single list (including topsep),
\r
26 # - several description styles (which fix some bad spacing, too),
\r
27 # - starting value and counter resuming,
\r
28 # - trivlists properly formatted,
\r
29 # - control on page breaking
\r
31 # Styling the basic lists is possible
\r
33 # a) generally in the LaTeX preamble and
\r
34 # b) per environment with optional arguments
\r
36 # See enumitem.pdf for details and examples.
\r
37 # http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf
\r
39 # TODO: since version 2.0, enumitem supports "cloning" of lists.
\r
40 # Producing a labeling as clone of a description allows
\r
41 # Preamble-Styling specific to this list type.
\r
46 \newlength{\lyxlabelwidth} % auxiliary length
\r
49 # Customisable Basic Lists
\r
50 # ------------------------
\r
52 # With enumitem, the three standard list environments take an optional
\r
53 # argument. See enumitem.pdf_ for possible values.
\r
70 # Customisable LyX List
\r
71 # ---------------------
\r
74 # verbatim insert definition of List environment,
\r
75 # The KOMA script classes replace List with Labeling,
\r
76 # this leads to an error with "CopyStyle List"!
\r
79 LatexType List_Environment
\r
87 AlignPossible Block, Left
\r
89 LabelString "00.00.0000"
\r
90 # en of verbatim copy
\r
96 % labeling-like list based on enumitem's description list with
\r
97 % mandatory second argument (label-pattern):
\r
98 \newenvironment{elabeling}[2][]%
\r
99 {\settowidth{\lyxlabelwidth}{#2}
\r
100 \begin{description}[font=,style=sameline,
\r
101 leftmargin=\lyxlabelwidth,#1]}
\r
102 {\end{description}}
\r
110 # Styles with pre-defined optional arguments for ease of use
\r
112 Style Enumerate-Resume
\r
113 CopyStyle Enumerate
\r
114 LatexParam [resume]
\r
117 # a blue label to indicate that this is not a WYSIWYG label
\r
118 # because the numbering differs in the output
\r