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