1 #\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)}
2 #\DeclareCategory{List Enhancements}
4 # Controls the layout of enumerate, itemize, description, and list/labeling.
5 # See section Customized Lists of the User's Guide for a detailed description.
9 # Author: Günter Milde <milde@lyx.org>
11 # 2008-12-04 first published version.
12 # 2009-02-02 use name Labeling for "LyX-List/Labeling" list type,
13 # copy standard layout verbatim for failsave working with
14 # both KOMA and non-KOMA document classes.
15 # 2011-01-12 bugfix: set elabeling label font to \normalfont.
19 # The package enumitem provides user control over the layout of the three
20 # basic list environments: enumerate, itemize and description. It supersedes
21 # both enumerate and mdwlist (providing well-structured replacements for all
22 # their funtionality), and in addition provides functions to compute the
23 # layout of labels, and to ‘clone’ the standard environments, to create new
24 # environments with counters of their own.
26 # - fancy labels and fancy refs,
27 # - leftmargin, labelsep and labelwidth automatically set,
28 # - changes applied globally or only in one of the three
29 # types or even in a single list (including topsep),
30 # - several description styles (which fix some bad spacing, too),
31 # - starting value and counter resuming,
32 # - trivlists properly formatted,
33 # - control on page breaking
35 # Styling the basic lists is possible
37 # a) generally in the LaTeX preamble and
38 # b) per environment with optional arguments
40 # See enumitem.pdf_ for details and examples.
42 # TODO: since version 2.0, enumitem supports "cloning" of lists.
43 # Producing a labeling as clone of a description allows
44 # Preamble-Styling specific to this list type.
47 \newlength{\lyxlabelwidth} % auxiliary length
51 # Customisable Basic Lists
52 # ------------------------
54 # With enumitem, the three standard list environments take an optional
55 # argument. See enumitem.pdf for possible values.
59 LabelString "Itemize Options"
60 Tooltip "Optional arguments for this list (see enumitem manual)"
67 LabelString "Enumerate Options"
68 Tooltip "Optional arguments for this list (see enumitem manual)"
73 ModifyStyle Description
75 LabelString "Description Options"
76 Tooltip "Optional arguments for this list (see enumitem manual)"
82 # Customisable LyX List
83 # ---------------------
90 # FIXME This should probably be defined using \newlist instead
92 % labeling-like list based on enumitem's description list with
93 % mandatory second argument (label-pattern):
94 \newenvironment{elabeling}[2][]%
95 {\settowidth{\lyxlabelwidth}{#2}
96 \begin{description}[font=\normalfont,style=sameline,
97 leftmargin=\lyxlabelwidth,#1]}
107 # Styles with pre-defined optional arguments for ease of use
109 Style Enumerate-Resume
112 LabelString "Enumerate Options"
113 Tooltip "Optional arguments for this list (see enumitem manual)"
124 # http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf