Debian Codegraph @

texmf-dist/doc/latex/enumitem/enumitem.tex

raw
1 %
2 % Copyright (C) 2003-2025 Javier Bezos http://www.texnia.com
3 %
4 % This file may be distributed and/or modified under the conditions of
5 % the MIT License. A version can be found at the end of this file.
6 %
7 % Repository: https://github.com/jbezos/enumitem
8 %
9
10 \documentclass[a4paper]{ltxguide}
11
12 \raggedright
13 \parskip=.8ex
14 \advance\oddsidemargin-.5cm
15 \advance\textwidth1cm
16 \addtolength{\textheight}{2cm}
17 \addtolength{\topmargin}{-1.5cm}
18
19 \usepackage{xcolor,bera}
20
21 \definecolor{notes}{rgb}{.75, .3, .3}%
22
23 \makeatletter
24 \newenvironment{desc}
25 {\if@nobreak
26 \vskip-\lastskip
27 \vspace*{-2.5ex}%
28 \fi
29 \decl}
30 {\enddecl}
31 \def\@begintheorem#1#2{%
32 \list{}{}%
33 \global\advance\@listdepth\m@ne
34 \item[{\sffamily\bfseries\color{notes}\MakeUppercase{#1}}]}%
35 \makeatother
36 \newtheorem{warning}{Warning}
37 \newtheorem{note}{Note}
38 \newtheorem{example}{Example}
39 \makeatother
40
41 \usepackage{framed}
42 \definecolor{shadecolor}{rgb}{0.96,0.96,0.93}
43 \let\bblxv\verbatim
44 \let\bblexv\endverbatim
45 \def\verbatim{\begin{shaded*}\bblxv\vskip-\baselineskip\vskip2.5\parsep}
46 \def\endverbatim{\bblexv\vskip-2\baselineskip\end{shaded*}}
47
48 \newcommand\New[1]{%
49 \colorbox[rgb]{.87, .9, .83}{New #1}\enspace\ignorespaces}
50
51 \usepackage{hyperref}
52
53 \title{Customizing lists\\with the\\\textsf{enumitem} package}
54
55 \author{Javier Bezos\footnote{For bug reports, comments and
56 suggestions go to \href{http://www.texnia.com/enumitem.html}%
57 {\texttt{http://www.texnia.com/enumitem.html}}.}}
58
59 \date{Version 3.11\\2025/02/06}
60
61 \IfFileExists{enumitem.sty}{\usepackage{enumitem}}{}
62 \IfFileExists{layouts.sty}{\usepackage{layouts}}{}
63
64 \addtolength{\topmargin}{-3pc}
65 \addtolength{\textwidth}{6pc}
66 \addtolength{\oddsidemargin}{-2pc}
67 \addtolength{\textheight}{7pc}
68
69 \raggedright
70 \parindent1.8em
71 \parskip0pt
72
73 \begin{document}
74
75 \maketitle
76 \tableofcontents
77
78 \newpage
79
80 \vspace*{1cm}
81
82 \begin{note}
83 Changes and new features with relation to version 3.5 are highlighted
84 with \New{X.X}\hspace{-.5em}. The most recent features could be still
85 unstable. Please, report any issues you find on
86 \texttt{https://github.com/jbezos/enumitem/issues}, which is better
87 than just complaining on an e-mail list or a web forum. Forking
88 and pull requests are welcome.
89 \end{note}
90
91 \begin{warning}
92 Version 3.6 introduced two new keys: |left| and |first|. If your
93 documents define some series with these names, an error is raised.
94 Just rename them, or set the package option |series=override|.
95 \end{warning}
96
97 \section{Introduction}
98
99 This package provides most of the flexibility you may want to customize
100 the three basic list environments (|enumerate|, |itemize| and
101 |description|) and to design your own lists, with a |<key>=<value>|
102 syntax:
103 \begin{itemize}
104 \item Fancy labels and fancy refs, including a syntax similar to that
105 in the \textsf{enumerate} package.
106
107 \item Alternative ways for positioning the label, with a new
108 parameter (|labelindent|) and a tab-like setting (|left|).
109
110 \item Settings applied globally or only in one of the three types or
111 even in a single list (including |\topsep|).
112
113 \item Inline lists.
114
115 \item Several description styles (which fix some bad spacing, too).
116
117 \item |trivlist|s properly formatted.
118
119 \item Gathering of lists to be treated like a unit, as well as counter
120 resuming.
121
122 \end{itemize}
123
124 In the interface a sort of ``inheritance'' is used. You can set
125 globally the behavior of lists and then override several parameters of,
126 say, |enumerate| and then in turn override a few parameters in a
127 particular instance. The values will be searched in the hierarchy.
128
129 The package extends the syntax of the lists to allow an optional
130 argument where a set of parameters in the form |key=value| are
131 available. These keys are equivalent to the well known list parameters.
132 Please, see a \LaTeX{} manual for a description of them. Next sections
133 explain the extensions provided by \textsf{enumitem}.
134 \begin{itemize}
135 \item
136 Vertical spacing:
137 \begin{itemize}
138 \setlength{\itemsep}{0pt}
139 \item |topsep|
140 \item |partopsep|
141 \item |parsep|
142 \item |itemsep|
143 \end{itemize}
144 \item
145 Horizontal spacing:
146 \begin{itemize}
147 \setlength{\itemsep}{0pt}
148 \item |leftmargin|
149 \item |rightmargin|
150 \item |listparindent|
151 \item |labelwidth|
152 \item |labelsep|
153 \item |itemindent|
154 \end{itemize}
155 \end{itemize}
156
157 \begin{example}
158 A straightforward example is:
159 \begin{verbatim}
160 \begin{itemize}[itemsep=1ex, leftmargin=1cm]
161 \end{verbatim}
162 \end{example}
163
164 \begin{note}
165 A way to see how these parameters work is with the |layouts| package
166 (the manual is named |layman.pdf|).
167 \ifx\listdiagram\notundefined\else
168 See figure \ref{f.drawlist}.
169 \begin{figure}
170 \centering
171 \listdiagram
172 \caption{List parameters}\label{f.drawlist}
173 \end{figure}
174 \fi
175 \end{note}
176
177 \section{Quick reference}
178
179 Some common settings. See the manual below for details.
180
181 \begin{itemize}
182 \def\verbatim{\begin{shaded*}\bblxv}
183 \def\endverbatim{\bblexv\vskip-1.6\baselineskip\end{shaded*}}
184
185 \item To remove the vertical space altogether in a list:
186 \begin{verbatim}
187 \begin{enumerate}[nosep]
188 \end{verbatim}
189
190 \item To remove the vertical space altogether in \textit{all} lists:
191 \begin{verbatim}
192 \setlist{nosep}
193 \end{verbatim}
194
195 \item To start the label at the margin and the item text at the
196 current parindent:
197 \begin{verbatim}
198 \begin{enumerate}[left=0pt .. \parindent]
199 \end{verbatim}
200
201 \item To configure the labels like in \textsf{enumerate}: include the
202 package option |shortlabels| and then, as a first element, write your
203 label:
204 \begin{verbatim}
205 \begin{enumerate}[(1)]
206 \end{verbatim}
207
208 \item To continue the previous list, after a ``pause'':
209 \begin{verbatim}
210 \begin{enumerate}[resume*]
211 \end{verbatim}
212
213 \item To use the three basic lists in line: just add the package option
214 |inline| and then the environments |enumerate*|, |itemize*| and
215 |description*|.
216
217 \item To set a numeric label with parenthesis, but a cross-reference
218 without them:
219 \begin{verbatim}
220 \begin{enumerate}[label=(\arabic*), ref=\arabic*]
221 \end{verbatim}
222
223 \end{itemize}
224
225 \section{Keys}
226
227 This section describes the keys in displayed lists. Most of them are
228 available in inline lists, where further keys are available (see
229 \ref{s.inline}).
230
231 \begin{warning}
232 If the value is completely enclosed in braces, they are stripped off.
233 If you want the braces, they must be duplicated. This is the default
234 behavior of \textsf{keyval}, which \textsf{enumitem} just emulates.
235 \end{warning}
236
237 \subsection{Label and cross references format}
238
239 \begin{desc}
240 |label=<commands>|
241 \end{desc}
242
243 Sets the label to be used in the current level. A set of starred
244 versions of |\alph|, |\Alph|, |\arabic|, |\roman| and |\Roman|, without
245 argument stand for the current counter in
246 |enumerate|.\footnote{Actually, the asterisk is currently the argument
247 but things may change. Consider them as starred variants and follow the
248 corresponding syntax.} It works with |\value|, too (provided the widest
249 label is not to be computed or |widest*| is used, see below).
250
251 \begin{note}
252 If you prefer setting labels like the \textsf{enumerate} package, use
253 ``short labels'' (see section \ref{s.short}).
254 \end{note}
255
256 \begin{example}
257 The following prints \textit{a}), \textit{b}), and so on (this is a
258 standard style in Spanish, and formerly used by Chicago, too).
259 \begin{verbatim}
260 \begin{enumerate}[label=\emph{\alph*})]
261 \end{verbatim}
262 \end{example}
263
264 \begin{warning}
265 The value of |label| is a moving argument, and fragile commands must
266 be protected \textit{except} the counters. Because of that, use of
267 |\value| is somewhat tricky, because |\the| or |\ifnum|
268 expects an actual value, which is not the case when |label| is
269 being processed to replace internally the |*| by the form with
270 the counter argument. The best solution is usually encapsulating the
271 logic inside a new ``counter'' with the help of
272 |\AddEnumerateCounter|.\footnote{Which is admittedly somewhat
273 convoluted. A better way to accomplish this is on the way.}
274 \end{warning}
275
276 \begin{example}
277 A fancier example
278 (which looks ugly, but it is intended only to illustrate what is
279 possible; requires \textsf{color} and \textsf{pifont}):
280 \begin{verbatim}
281 \begin{enumerate}[label=\protect\fcolorbox{blue}{yellow}{\protect\ding{\value*}}]
282 \end{verbatim}
283 \end{example}
284
285 \begin{desc}
286 |label*=<commands>|
287 \end{desc}
288
289 Like |label| but its value is appended to the parent label. For
290 example, the following defines a |legal| list (1., 1.1., 1.1.1., and so
291 on):
292 \begin{verbatim}
293 \newlist{legal}{enumerate}{10}
294 \setlist[legal]{label*=\arabic*.}
295 \end{verbatim}
296
297 \begin{desc}
298 |ref=<commands>|
299 \end{desc}
300
301 By default, |label| sets also the form of cross references and
302 |\the...| (overriding the settings in parent hierarchical
303 levels), but you can define a different format with this key. For
304 example, to remove the right parenthesis:
305 \begin{verbatim}
306 \begin{enumerate}[label=\emph{\alph*}), ref=\emph{\alph*}]
307 \end{verbatim}
308
309 \begin{note}
310 In both |label| and |ref|, the counters can be used as usual. So, and
311 provided the current level is the second one:
312 \begin{verbatim}
313 \begin{enumerate}[label=\theenumi.\arabic*.]
314 \end{verbatim}
315 or
316 \begin{verbatim}
317 \begin{enumerate}[label=\arabic{enumi}.\arabic*.]
318 \end{verbatim}
319 \end{note}
320
321 \begin{note}
322 The |label|s are \textit{not} accumulated to form the reference.
323 If you want, say, something like 1.\textit{a} from 1) as first level
324 and \textit{a}) as second level, you must set it with |ref|. You may
325 use |\ref{level1}.\ref{level2}| with appropriate |ref| settings, but as
326 Robin Fairbairns points out in the \TeX{} FAQ:
327 \begin{quote}
328 \dots{} [that] would be both tedious and error-prone. What is more, it
329 would be undesirable, since you would be constructing a visual
330 representation which is inflexible (you could not change all the
331 references to elements of a list at one fell swoop).
332 \end{quote}
333 This is sensible and I recommend to follow the advice, but sometimes
334 you might want something like:
335 \begin{verbatim}
336 ... subitem \ref{level2} of item \ref{level1} ...
337 \end{verbatim}
338 \end{note}
339
340 \begin{warning}
341 The value of |ref| is a moving argument, and fragile commands must be
342 protected \textit{except} the counters.
343 \end{warning}
344
345 \begin{desc}
346 |font=<commands>|\qquad|format=<commands>|
347 \end{desc}
348
349 Sets the label font. Useful when the label is changed with the optional
350 argument of |\item| and in \texttt{description}. The last command in
351 |<commands>| can take an argument with the item label. In
352 \texttt{description} class setting are in force, so you may want to begin
353 with |\normalfont|. A synonym is \texttt{format}. Actually, this key
354 may be used for any stuff to be executed at each |\item|, just before the
355 label.
356
357 \begin{desc}
358 |align=left|\qquad |align=right|\qquad |align=parleft|
359 \end{desc}
360
361 How the label is aligned (with relation to the label box edges).
362 Three values are possible: |left|, the default |right| and
363 |parleft| (a parbox of width |\labelwidth| with flush left
364 text). The parameters controlling the label spacing should be
365 properly set, either by hand or more conveniently with the |*|
366 settings (see below):
367 \begin{verbatim}
368 \begin{enumerate}[label=\Roman*., align=left, leftmargin=*]
369 \end{verbatim}
370 When the label box is supposed to have its natural width, use
371 |left|.
372
373 \begin{desc}
374 |\SetLabelAlign{<value>}{<commands>}|
375 \end{desc}
376
377 New align types can be defined (or the existing ones redefined) with
378 |\SetLabelAlign|; the predefined values are equivalent
379 to:
380 \begin{verbatim}
381 \SetLabelAlign{right}{\hss\llap{#1}}
382 \SetLabelAlign{left}{#1\hfil}
383 \SetLabelAlign{parleft}{\strut\smash{\parbox[t]\labelwidth{\raggedright##1}}}
384 \end{verbatim}
385
386 \begin{example}
387 Although primarily intended for the alignment, this commands has
388 other uses (an example is the provided |parleft|). For example, with
389 the following all labels with |align=right| are set as superscripts:
390 \begin{verbatim}
391 \SetLabelAlign{right}{\hss\llap{\textsuperscript{#1}}}
392 \end{verbatim}
393 A new name is also possible, of course.
394 \end{example}
395
396 \begin{note}
397 If the last thing in the definition is a skip (typically |\hfil|), it
398 is removed sometimes by |description|. If for some reason you want to
399 avoid this, just add |\null| at the end.
400 \end{note}
401
402 \begin{note}
403 If you want the internal settings for \texttt{align} and \texttt{font}
404 be ignored, you can override the \textsf{enumitem} definition of
405 |\makelabel| in \texttt{before}:
406 \begin{verbatim}
407 \begin{description}[before={\renewcommand\makelabel[1]{\ref{##1}}}]
408 \end{verbatim}
409 Alternatively, define a macro and use |\let|.
410 \end{note}
411
412 \subsection{Horizontal spacing of labels}
413
414 The horizontal space in the left margin of the current level is
415 distributed in the following way:\footnote{Admittedly, these figures
416 are not exactly the clearest possible, and I intend to improve them in
417 a future release.}
418 \begin{center}
419 \begin{tabular}{cc}
420 \fbox{\fbox{\strut \texttt{labelindent}}
421 \fbox{\strut \texttt{labelwidth}}
422 \fbox{\strut \texttt{labelsep} $-$ \texttt{itemindent}}}
423 &
424 \fbox{\strut\texttt{itemindent}}\\
425 \texttt{leftmargin}
426 \end{tabular}
427 \end{center}
428 Here |labelindent| is a new parameter introduced by \textsf{enumitem},
429 described below. The rest are those in standard \LaTeX.
430
431 Actually, the layout is more complex because the label box (ie,
432 |labelwidth|) could stick into the margin, which means |labelindent|
433 takes a negative value.
434
435 \begin{note}
436 Since |\parindent| is not used as such inside lists, but instead is
437 set internally to either |\itemindent| or |\listparindent|, when used
438 as the value of a parameter \textsf{enumitem} returns the global
439 value, i. e., the value it has outside the outermost list.
440 \end{note}
441
442 \begin{note}
443 \New{3.6} If you find these parameters baffling, you are not alone. You
444 can visualize them by writing |\DrawEnumitemLabel| just before the
445 first item (or in |first|), which draws 4 rules from top to bottom,
446 |labelindent|, |labelwidth|, |labelsep|, |itemindent| (thin if
447 positive, thick if negative); the |leftmargin| is marked with two
448 vertical rules.
449 \end{note}
450
451 \begin{desc}
452 |labelindent=<length>|\\
453 |\labelindent|
454 \end{desc}
455
456 This parameter is added in \textsf{enumitem} for the blank space from
457 the margin of the enclosing list/text to the left edge of the label
458 box. This means there is a redundancy because one of the parameters
459 depends on the others, i.e., it has to be computed from the other
460 values, as described below. By default, the computed value is
461 |labelindent|, even if explicitly set with some value (it defaults to
462 0~pt). So, if you are setting it to some value, very likely you want to
463 set some other parameter to |!| or |*|, because otherwise it is
464 ignored.
465
466 There is a new counter length |\labelindent|.
467
468 The five parameters are related in the following way:
469 \[
470 |\leftmargin|+|\itemindent| =
471 |\labelindent|+|\labelwidth|+|\labelsep|
472 \]
473
474 \begin{desc}
475 |left=<labelindent>|\\
476 |left=<labelindent> .. <leftmargin>|
477 \end{desc}
478
479 \New{3.6} This is a convenience key to set quickly the most common
480 layouts for the label. You may regard it as a sort or ``rule'' with two
481 tab stops: the start of the label and the start of the text (both with
482 relation to the normal side margin). With only |<labelindent>|, the
483 left margin (the ``start of text'') is computed with the |labelsep|. It
484 internally resorts to |widest|, so the restrictions of the letter with
485 relation to |description| also applies here: you might need change the
486 computed parameter (eg, |itemindent=*| with |align=left|).
487
488 \begin{example}
489 Typical settings would be:
490 \begin{verbatim}
491 \begin{enumerate}[left= 0pt]
492 \begin{enumerate}[left= 0pt .. \parindent]
493 \begin{enumerate}[left= \parindent]
494 \begin{enumerate}[left= \parindent .. 2\parindent]
495 \begin{enumerate}[left= -\parindent .. 0pt]
496 \end{verbatim}
497 \end{example}
498
499 \begin{note}
500 The label width is set to the default widest one. If there are lists
501 with Arabic numerals $\ge 10$, you may want to set |widest|, too.
502 \end{note}
503
504 \begin{note}
505 |left=<labelindent>| sets |leftmargin=*|;
506 |left=<labelindent> .. <leftmargin>| sets |labelsep=*|.
507 \end{note}
508
509 \begin{desc}
510 |leftmargin=!|\qquad|itemindent=!|\qquad|labelsep=!|
511 \qquad|labelwidth=!|\qquad|labelindent=!|
512 \end{desc}
513
514 Sets which value is to be computed from the others. The default is
515 |labelindent=!|, but note some keys set another value (|wide| and
516 description |style|s). Computations are done after \textit{all} keys
517 have been read. Explicit values are not lost, and so with the following
518 hierarchical settings:
519 \begin{verbatim}
520 leftmargin=2em
521 labelindent=1em,leftmargin=!
522 labelindent=!
523 \end{verbatim}
524 |leftmargin| is again 2em and |labelindent| is the computed parameter.
525
526 \begin{note}
527 With |align=right| (the default), |labelindent=!| and |labelwidth=!|
528 behave similarly in practice.
529 \end{note}
530
531 \begin{desc}
532 |leftmargin=*|\qquad|itemindent=*|\qquad|labelsep=*|
533 \qquad|labelwidth=*|\qquad|labelindent=*|
534 \end{desc}
535
536 Like before, but in addition |labelwidth| is first set to the width of
537 the current label, using the default value of \textit{0} in |\arabic*|,
538 \textit{viii} in |\roman*|, \textit{m} in |\alph*| and similarly in
539 uppercase forms (these values can be changed with |widest|, see below).
540 Examples are:
541 \begin{verbatim}
542 \begin{itemize}[label=\textbullet, leftmargin=*]
543 \begin{enumerate}[label=\roman*), leftmargin=*, widest=iii]
544 \begin{itemize}[label = \textbullet,
545 leftmargin = 2pc,
546 labelsep = *]
547 \begin{enumerate}[label = \arabic*.,
548 labelindent = \parindent,
549 leftmargin = 2\parindent,
550 labelsep = *]
551 \end{verbatim}
552
553 The most useful are |labelsep=*| and |leftmargin=*|. With the former
554 the item body begins at a fixed place (namely, |leftmargin|), while
555 with the latter begins at a variable place depending on the label (but
556 always the same within a list, of course).
557
558 \begin{note}
559 Unfortunately, \LaTeX{} does not define a default |labelsep| to
560 be applied to all lists---simply the current value is used. With
561 \textsf{enumitem} you can set default values for every list, as
562 described below, and so, if you want to make sure |labelsep| is
563 under your control, all you need is something like:
564 \begin{verbatim}
565 \setlist{labelsep=.5em}
566 \end{verbatim}
567 \end{note}
568
569 \begin{note}
570 |labelwidth=*| and |labelwidth=!| are synonymous. Use them with care,
571 because they may take negative values, which does not make sense (a
572 warning is shown).
573 \end{note}
574
575 \begin{desc}
576 |widest=<string>|\qquad|widest*=<integer>|\qquad|widest|
577 \end{desc}
578
579 To be used in conjunction with the \texttt{*}-values, if desired. It
580 overrides the default value for the widest printed counter. Sometimes,
581 if lists are not very long, a value of |a| for |\alph| is more sensible
582 than the default |m|:
583 \begin{verbatim}
584 \begin{enumerate}[leftmargin=*, widest=a] % Assume standard 2nd level
585 \end{verbatim}
586 With no value, the default is restored. With |widest*|, the string is
587 built using |<integer>| as the value of the counter (e.g., with
588 |\roman|,
589 |widest=viii| and |widest*=8| are the same).
590
591 Since |\value| does not return a string but a number, |widest| and the
592 |*| values cannot be used with it. However, with |widest*|,
593 being a number, it is allowed.
594
595 \New{3.6} It can be used with |itemize| and |description|, too.
596 However, since the latter does some tricky formatting inside the label
597 you might need change the computed parameter (eg, |itemindent=*| with
598 |align=left|).
599
600 \begin{desc}
601 |labelsep*=<length>|
602 \end{desc}
603
604 Remember |labelsep| spans part of |leftmargin| and |itemindent| if the
605 latter is not zero. This is often somewhat confusing, so a new key is
606 provided---with \texttt{labelsep*} the value is reckoned from the left
607 margin (it just sets |\labelsep| and then adds |\itemindent| to it, but
608 in addition later changes to |itemindent| are taken into account):
609 \begin{center}
610 \begin{tabular}{cc}
611 \fbox{\fbox{\strut \texttt{labelindent}}
612 \fbox{\strut \texttt{labelwidth}}
613 \fbox{\strut \texttt{labelsep*}}}
614 &
615 \fbox{\strut\texttt{itemindent}}\\
616 \texttt{leftmargin}
617 \end{tabular}
618 \end{center}
619
620 \begin{desc}
621 |labelindent*=<length>|
622 \end{desc}
623
624 Like |labelindent|, but it is reckoned from the left margin in
625 the current list and not from that in the enclosing list/text.
626
627 \begin{example}
628 A first pattern aligns the label with the surrounding |\parindent|
629 while the item body is indented depending on the label and a fixed
630 |labelsep|:
631 \begin{verbatim}
632 labelindent = \parindent,
633 leftmargin = *
634 \end{verbatim}
635 A fairly frequent variant is aligning the label with the surrounding
636 text (remember |labelindent| is |0pt| by default if it is not the
637 computed parameter):
638 \begin{verbatim}
639 leftmargin = *
640 \end{verbatim}
641 The former looks better in the first level while the latter seems
642 preferable in subsequent ones. That can be easily set with
643 \begin{verbatim}
644 \setlist{leftmargin=*}
645 \setlist[1]{labelindent=\parindent} % Only the level 1
646 \end{verbatim}
647 \end{example}
648
649 \begin{example}
650 A second pattern aligns the item body with the surrounding
651 |\parindent|. In this case (remember |labelindent| is the computed
652 parameter if not set):
653 \begin{verbatim}
654 leftmargin = \parindent
655 \end{verbatim}
656 \end{example}
657
658 \begin{example}
659 A third pattern would be the label aligned with |\parindent|,
660 and the item body with |2\parindent|:
661 \begin{verbatim}
662 labelindent = \parindent,
663 leftmargin = 2\parindent,
664 itemsep = *
665 \end{verbatim}
666 Again, a variant would be the label aligned with the surrounding
667 text, and the item body with |\parindent|:
668 \begin{verbatim}
669 leftmargin = \parindent,
670 itemsep = *
671 \end{verbatim}
672 \end{example}
673
674 \subsection{Numbering, stopping, and resuming}
675
676 \begin{desc}
677 |start=<integer>|
678 \end{desc}
679 Sets the number of the first item.
680
681 \begin{desc}
682 |resume|
683 \end{desc}
684
685 The counter continues from the previous |enumerate|,
686 instead of being reset to 1.
687 \begin{verbatim}
688 \begin{enumerate}
689 \item First item.
690 \item Second item.
691 \end{enumerate}
692 Text.
693 \begin{enumerate}[resume]
694 \item Third item
695 \end{enumerate}
696 \end{verbatim}
697
698 This is done locally. If you want global resuming, see next section on
699 series.
700
701 \begin{desc}
702 |resume*|
703 \end{desc}
704
705 Like |resume| but the options from the previous list are used, too.
706 This option must be restricted to the optional argument in a
707 environment (this is the only place where it makes sense). It should be
708 used sparingly---if you are using it often, then very likely you want
709 to define a new list (see \ref{s.clone}). Further keys are allowed, and
710 in this case the saved options are overridden by those in the current
711 list (i.e., the position of \texttt{resume*} does not matters). If
712 there is a series of a certain list with \texttt{resume*}, options are
713 taken from the list previous to the first one, except for
714 \texttt{start}.
715
716 \begin{example}
717 For example:
718 \begin{verbatim}
719 \begin{enumerate}[resume*, start=1] % or [start=1, resume*]
720 \end{verbatim}
721 uses the keys in the previous \texttt{enumerate}, but restarts the
722 counter.
723 \end{example}
724
725 \subsection{Series}
726
727 \begin{desc}
728 |series=<series-name>|\\
729 |<series-name>|\qquad|resume*=<series-name>|
730 \qquad|resume=<series-name>|
731 \end{desc}
732
733 Another method to continue lists is by means of the key
734 \texttt{series}, so that they behave like a unit. A list with key
735 \texttt{series} is considered the starting list and its settings are
736 stored \textit{globally}, so that they can be used later with
737 \texttt{resume}/\texttt{resume*}. All these keys take a value with the
738 series name (which must be different from existing keys):
739 \begin{itemize}
740 \item |resume=<series-name>| just continue numbering items in the
741 series,
742 \item |resume*=<series>| also applies the settings of the
743 starting list,
744 \item |<series>|, i.e., the series name used as a key, is an
745 alternative to |resume*=<series>|.
746 \end{itemize}
747
748 \begin{example}
749 Consider:
750 \begin{verbatim}
751 \begin{enumerate}[label=\arabic*(a), leftmargin=1cm, series=l_after]
752 \item A
753 \item B
754 \end{enumerate}
755 \end{verbatim}
756 You get: 1(a) 2(a). You can continue with:
757 \begin{verbatim}
758 \begin{enumerate}[label=\arabic*(b), resume*=l_after]
759 % or [label=\arabic*(b), l_after]
760 \item A
761 \item B
762 \end{enumerate}
763 \end{verbatim}
764 You get: 3(b) 4(b). (But you can use |start=1|, if you like.)
765 \end{example}
766
767 Note you can add further arguments, which are executed after those
768 saved at the starting list and therefore take precedence over them --
769 in particular, |resume*| itself takes precedence over a |start| (e.g.,
770 |start=1|) in the the starting list.
771
772 \begin{note}
773 Every time a series is started, several commands are defined
774 internally. Thus, to avoid wasting resources use the same name for
775 non-overlapping series.
776 \end{note}
777
778 \begin{warning}
779 The package may introduce new keys in the future, so using directly
780 |<series>| as a key is a potential source of forward
781 incompatibilities. However, it's safe using a non-letter character
782 other than hyphen or star in the key name (e.g., |!notes| or
783 |m_steps|), as well as uppercase letters and digits, because
784 \textsf{enumitem} will never use them. \New{3.7} If you have defined
785 some series with an all lowercase name and a new conflicting key has
786 been introduced, an alternative to changing their names is the
787 package option |series=override| (the error message is
788 \texttt{Invalid series name `key'}). With it series names take
789 precedence over predefined keys -- but use it only when absolutely
790 necessary.
791 \end{warning}
792
793 \subsection{Penalties}
794
795 \begin{desc}
796 |beginpenalty=<integer>|\qquad
797 |midpenalty=<integer>|\qquad |endpenalty=<integer>|
798 \end{desc}
799
800 Set the penalty at the beginning of a list, between items and at the
801 end of the list, respectively. Please, refer to your \LaTeX{} or
802 \TeX{} manual about how penalties control page breaks. Unlike other
803 parameters, when a list starts their values are not reset to the
804 default, thus they apply to the child lists.
805
806 \subsection{Injecting code}
807
808 \begin{desc}
809 |before=<code>| \qquad |before*=<code>|
810 \end{desc}
811
812 Execute code before the list starts (more precisely, in the second
813 argument of the |list| environment used to define them). The
814 unstarred form sets the code to be executed, overriding any previous
815 value, while the starred one adds the code to the existing one (in
816 the setting hierarchy, see below, \textit{not} with relation to the
817 enclosing list/text). It can contain, say, rules and text, but this
818 has not been extensively tested. All calculations have been finished,
819 and you can access and manipulate the list parameters.
820
821 \begin{example}
822 To have both margins (left and right) set to the widest label:
823 \begin{verbatim}
824 \setlist{leftmargin=*, before=\setlength{\rightmargin}{\leftmargin}}
825 \end{verbatim}
826 \end{example}
827
828 \begin{desc}
829 |after=<code>|\qquad|after*=<code>|
830 \end{desc}
831
832 Same, but just before the list ends.
833
834 \begin{desc}
835 |first=<code>|\qquad|first*=<code>|
836 \end{desc}
837
838 \New{3.6} Same, but as the very first thing in the list body, so that
839 \begin{verbatim}
840 \begin{itemize}[first=<code>]
841 \end{verbatim}
842 is the same as
843 \begin{verbatim}
844 \begin{itemize}
845 <code>
846 \end{verbatim}
847
848 \begin{example}
849 With |first| you can define your own environments for displayed
850 material. A trivial example is:
851 \begin{verbatim}
852 \newlist{letter}{itemize}{1}
853 \setlist[letter]{first=\item[]\itshape, rightmargin=\leftmargin}
854 \end{verbatim}
855 Here there is no need for a |label|, because it is not used.
856 \end{example}
857
858 \begin{desc}
859 |\EnumitemId|
860 \end{desc}
861
862 \New{3.7} To help in some tasks, a unique numeric identifier is
863 assigned to each list, returned by |\EnumitemId|.
864
865 \begin{example}
866 Here is an example of how to combine a |\label| with |\EnumitemId|,
867 and |after| to automatically set the width of the list label to the
868 widest one (provided the ref is the same as the label):\footnote{See
869 \texttt{https://tex.stackexchange.com/questions/29322/%
870 how-to-make-enumerate-items-align-at-left-margin}.}
871 \begin{verbatim}
872 \SetEnumitemKey{widestlabel}
873 {labelwidth = \widthof{\ref{enum-\EnumitemId}},
874 after = \label{enum-\EnumitemId}}
875 \end{verbatim}
876 Then just use the key |widestlabel|.
877 \end{example}
878
879 \begin{example}
880 Reverse counting is also doable, but somewhat trickier, and we need
881 some ``external'' help. Here is a possible solution, but not the
882 only one (and very likely not even the best -- for example, |start|
883 is in fact no-op).
884 \begin{verbatim}
885 \newcounter{rev-enumi} \newcounter{rev-enumii}
886 \newcounter{rev-enumiii} \newcounter{rev-enumiv}
887
888 \newcommand\revcounter[1]{%
889 \setcounter{#1}{\value{#1}-2}%
890 \stepcounter{rev-#1}%
891 \gdef\afterrev{%
892 \refstepcounter{rev-#1}%
893 \setcounter{rev-#1}{0}}}
894
895 \AddEnumerateCounter\revcounter\revcounter{} % the 2nd is dummy
896
897 \SetEnumitemKey{revRoman}
898 {start = \getrefnumber{enum-\EnumitemId}-1,
899 label = (\Roman*)\revcounter*,
900 ref = (\Roman*),
901 after = \afterrev
902 \label{enum-\EnumitemId}}
903 \end{verbatim}
904 \end{example}
905
906 \subsection{Description styles}
907
908 A key available in |description|.
909 \begin{desc}
910 |style=<name>|
911 \end{desc}
912
913 Sets the description \textit{style}. |<name>| can be any of the
914 following:
915 \begin{description}
916 \item[|standard|] Like |description| in standard classes, although
917 with other classes it could be somewhat different. The label is
918 boxed. Sets |itemindent=!|.
919
920 \item[|unboxed|] Much like the standard |description|, but
921 the label is not boxed to avoid uneven spacing and unbroken labels if
922 they are long. Sets |itemindent=!|.
923
924 \item [|nextline|] If the label does not fit in the margin, the text
925 continues in the next line, otherwise it is placed in a box of width
926 |\leftmargin| $-$ |\labelsep|, i.e., the item body never sticks into
927 the left margin. Sets |labelwidth=!|.
928
929 \item[|sameline|] Like |nextline| but if the label does not
930 fit in the margin the text continues in the same line. Same as
931 |style=unboxed,labelwidth=!|.
932
933 \item[|multiline|] The label is placed in a parbox whose width is
934 |leftmargin|, with several lines if necessary. Same as
935 |style=standard,align=parleft,labelwidth=!|. If you modify it, bear in
936 mind |align| cannot be set freely (for an internal optimization; in
937 particular, a horizontal box doesn’t make sense and can raise an
938 error).
939
940 \end{description}
941
942 \begin{warning}
943 \begin{enumerate}
944 \item Mixing boxed and unboxed labels has not a well-defined behavior.
945 \item When nesting list all combinations are allowed but not all make
946 sense.
947 \item Nesting |nextline| lists is not supported (it works, but its
948 behavior might change in the future, because the current one is not
949 what one could expect).
950 \end{enumerate}
951 \end{warning}
952
953 \subsection{Compact lists}
954
955 \begin{desc}
956 |noitemsep|\qquad|nosep|
957 \end{desc}
958
959 The key |noitemsep| kills the space between items and paragraphs
960 (i.e., |itemsep=0pt| and |parsep=0pt|), while
961 |nosep| kills all vertical spacing.\footnote{The key
962 \texttt{nolistsep}, now deprecated, introduced a thin stretch, which
963 was not the intended behavior.}
964
965 \subsection{``Wide'' lists}
966
967 \begin{desc}
968 |wide|\\
969 |wide=<parindent>|
970 \end{desc}
971
972 With this convenience key, the leftmargin is null and the label is
973 part of the text---in other word, the items look like ordinary
974 paragraphs.\footnote{\texttt{fullwidth} is deprecated.} Here |labelsep|
975 sets the separation between the label and the first word. It is
976 equivalent to
977 \begin{verbatim}
978 align=left, leftmargin=0pt, labelindent=\parindent,
979 listparindent=\parindent, labelwidth=0pt, itemindent=!
980 \end{verbatim}
981 With |wide=<parindent>| you may set at once another value instead of
982 |\parindent|. Of course, these keys can be overridden after
983 |wide|, too; for example, remembering that with left-aligned labels
984 the text is pushed if the they are wider than |labelwidth|, you
985 can set |labelwidth=1.5em| for a minimal width, or instead of
986 |itemindent=!| you may prefer |itemindent=*|, which sets the
987 minimal width to that of widest label. In level 2 you may prefer
988 |labelindent=2\parindent|, and so on. You may also want to
989 combine it with |noitemsep| or |nosep|.
990
991 \subsection{\textsf{enumerate}-like labels}
992 \label{s.short}
993
994 \begin{desc}
995 |shortlabels| (package option)
996 \end{desc}
997
998 With the package option \texttt{shortlabels} you can use an
999 \textsf{enumerate}-like syntax, where |A|, |a|, |I|,
1000 |i| and |1| stand for |\Alph*|, |\alph*|,
1001 |\Roman*|, |\roman*| and |\arabic*|. This is intended
1002 mainly as a sort of compatibility mode with the \textsf{enumerate}
1003 package, and therefore the following special rule applies: if the very
1004 first option (at any level) is not recognized as a valid key, then it
1005 will be considered a label with the \textsf{enumerate}-like syntax. For
1006 example:
1007 \begin{verbatim}
1008 \begin{enumerate}[i), labelindent=\parindent, labelsep=*]
1009 ...
1010 \end{enumerate}
1011 \end{verbatim}
1012 You may want to set |ref|, too, if different from the label.
1013
1014 Although perhaps not so useful, you can omit |label=| in the
1015 itemize environment under similar conditions, too:
1016 \begin{verbatim}
1017 \begin{itemize}[\textbullet]
1018 ...
1019 \end{itemize}
1020 \end{verbatim}
1021
1022 \begin{desc}
1023 |\SetEnumerateShortLabel{<key>}{<replacement>}|
1024 \end{desc}
1025
1026 With this command, you can define new keys (or redefine them), which is
1027 particularly useful for enumerate to be adapted to specific
1028 typographical rules or to extend it for non-Latin scripts. Here
1029 |<replacement>| contains one of the starred versions of
1030 counters.
1031
1032 \begin{example}
1033 For example:
1034 \begin{verbatim}
1035 \SetEnumerateShortLabel{i}{\textsc{\roman*}}
1036 \end{verbatim}
1037 redefines |i| so that items using this key are numbered with
1038 small caps roman numerals.
1039 \end{example}
1040
1041 \begin{note}
1042 The key has to be a single character.
1043 \end{note}
1044
1045 \subsection{Generic keys and values}
1046
1047 \begin{desc}
1048 |\SetEnumitemKey{<key>}{<replacement>}|
1049 \end{desc}
1050
1051 With this command you can create your own (valueless) keys. Keys so
1052 defined can then be used like the others.
1053
1054 \begin{example}
1055 With
1056 \begin{verbatim}
1057 \SetEnumitemKey{midsep}{topsep=3pt, partopsep=0pt}
1058 \end{verbatim}
1059 you may write
1060 \begin{verbatim}
1061 \begin{enumerate}[midsep]
1062 \end{verbatim}
1063 \end{example}
1064
1065 \begin{example}
1066 Another example is multicolumn lists, with \textsf{multicol}:
1067 \begin{verbatim}
1068 \SetEnumitemKey{twocol}{
1069 itemsep = 1\itemsep,
1070 parsep = 1\parsep,
1071 before = \raggedcolumns\begin{multicols}{2},
1072 after = \end{multicols}}
1073 \end{verbatim}
1074 Here, the settings for \texttt{itemsep} and \texttt{parsep} kill the
1075 stretch and shrink parts, which in this case improves the result. Of
1076 course, you may want to define a new list.
1077 \end{example}
1078
1079 \begin{warning}
1080 The package may introduce new keys in the future, so
1081 |\SetEnumitemKey| is a potential source of forward incompatibilities.
1082 However, it's safe using a non-letter character other than hyphen or
1083 star in the key name (e.g., |:name| or |2_col|), as well as uppercase
1084 letters and digits, because \textsf{enumitem} will never use them.
1085 \end{warning}
1086
1087 \begin{desc}
1088 |\SetEnumitemValue{<key>}{<string-value>}{<replacement>}|
1089 \end{desc}
1090
1091 This commands provides a further abstraction layer for the
1092 |<key>=<value>| pairs. With it you can define logical names which
1093 are translated to the actual value. For example, with:
1094 \begin{verbatim}
1095 \SetEnumitemValue{label}{numeric}{\arabic*.}
1096 \SetEnumitemValue{leftmargin}{standard}{\parindent}
1097 \end{verbatim}
1098 you might say:
1099 \begin{verbatim}
1100 \begin{enumerate}[label=numeric, leftmargin=standard]
1101 \end{verbatim}
1102 So, you can left to the final design what |label=numeric| means.
1103
1104 \section{Inline lists}
1105 \label{s.inline}
1106
1107 Inline lists are ``horizontal'' lists set as ordinary text inside a
1108 paragraph. With this package you can create inline lists, as explained
1109 below, with |\newlist|, which have their own labels and counters.
1110 However, very often inline versions of standard lists, with the same
1111 labeling schema, will be enough -- the package option |inline| does
1112 that.
1113
1114 \begin{warning}
1115 Items are boxed, so floats are lost and nested lists are not allowed
1116 (remember many displayed elements are defined as lists). Links may
1117 point to a wrong place, display math is forbidden, and due to an
1118 optimization done by \TeX{} when building lists explicit hyphenation
1119 may be wrong.\footnote{A Knuthian ``premature optimization''? Who
1120 knows, but anyway with Lua\TeX{} hyphenation should be correct.}
1121 There was a reason for this default setting, namely, this feature was
1122 mainly devised for short items (a few words), and the parameter
1123 |itemjoin*| could be useful for logical markup. To overcome these
1124 limitations, you may set |mode=unboxed|, described below.
1125 \end{warning}
1126
1127 \begin{desc}
1128 |inline| \qquad(package option)\\
1129 \texttt{enumerate*}\qquad\texttt{itemize*}\qquad
1130 \texttt{description*} \qquad(environments)
1131 \end{desc}
1132
1133 With the package option \texttt{inline}, three environments for inline
1134 lists are defined: \texttt{enumerate*}, \texttt{itemize*}, and
1135 \texttt{description*}. They emulate the behavior of \textsf{paralist}
1136 and \textsf{shortlst} in that labels and settings are shared with the
1137 displayed (ie, ``normal'') lists \texttt{enumerate}, \texttt{itemize}
1138 and \texttt{description}, respectively (however, remember resuming is
1139 based on environment names, not on list types). This applies only to
1140 those created with \texttt{inline} -- inline lists created with
1141 |\newlist| as described below are independent and use their own labels
1142 and settings.
1143
1144 \begin{note}
1145 Note |inline| is not required if you do not need the inline versions
1146 of standard lists, but instead you define your own standalone inline
1147 lists with |\newlist|.
1148 \end{note}
1149
1150 \begin{warning}
1151 Settings for these three environments as defined by |inline| are
1152 shared with the displayed variants, so they cannot be redefined
1153 directly with |\newlist|. Trying to do it raises a cryptic error. If
1154 you need separate setting, define them with |\newlist| and not with
1155 |inline|.
1156 \end{warning}
1157
1158 \begin{desc}
1159 |itemjoin=<string>|\qquad|itemjoin*=<string>|
1160 \qquad|afterlabel=<string>|
1161 \end{desc}
1162
1163 Format is set with keys \texttt{itemjoin} (default is a space), and
1164 \texttt{afterlabel} (default is |\nobreakspace|, ie, |~|).
1165 An additional key is \texttt{itemjoin*}, which, if set, is used
1166 instead of \texttt{itemjoin} before the last item.
1167
1168 |itemjoin| is ignored in vertical mode (i.e., in mode unboxed
1169 and just after a quote, a displayed list and the like).
1170
1171 \begin{example}
1172 With
1173 \begin{verbatim}
1174 before=\unskip{: }, itemjoin={{; }}, itemjoin*={{, and }}
1175 \end{verbatim}
1176 the following punctuation between items is used:
1177 \begin{quote}
1178 Blah blah: (a) one; (b) two; (c) three, and (d) four. Blah blah
1179 \end{quote}
1180 \end{example}
1181
1182 \begin{desc}
1183 |mode=unboxed|\qquad|mode=boxed|
1184 \end{desc}
1185
1186 If using floats, lists or displayed math inside inline lists is
1187 important, use an alternative ``mode'', which you can activate with
1188 \texttt{mode=unboxed} (the default is \texttt{mode=boxed}). With it,
1189 floats may be used freely, but misplaced |\item|s are not caught and
1190 \texttt{itemjoin*} is ignored (a warning is written to the log about
1191 this fact).
1192
1193 \section{Global settings}
1194
1195 Global changes, to be applied to all of these list, are also
1196 possible:
1197 \begin{desc}
1198 |\setlist[enumerate,<levels>]{<format>}|\\
1199 |\setlist[itemize,<levels>]{<format>}|\\
1200 |\setlist[description,<levels>]{<format>}|\\
1201 |\setlist[<levels>]{<format>}|
1202 \end{desc}
1203 Where |<level>| is the list level (one or more) in |list|, and the
1204 corresponding levels in |enumerate| and
1205 |itemize|.\footnote{|\string\setenumerate|,
1206 |\string\setitemize| and |\string\setdescription| are
1207 deprecated.} With no |<levels>|, the format applies to all of them.
1208 Here `list' does not mean any list but only the three ones handled by
1209 this package, and those redefined by this package or defined with
1210 |\newlist| (see below). For example:
1211 \begin{verbatim}
1212 \setlist{noitemsep}
1213 \setlist[1]{labelindent=\parindent} % << Usually a good idea
1214 \setlist[itemize]{leftmargin=*}
1215 \setlist[itemize,1]{label=$\triangleleft$}
1216 \setlist[enumerate]{labelsep=*, leftmargin=1.5pc}
1217 \setlist[enumerate,1]{label = \arabic*.,
1218 ref = \arabic*}
1219 \setlist[enumerate,2]{label = \emph{\alph*}),
1220 ref = \theenumi.\emph{\alph*}}
1221 \setlist[enumerate,3]{label = \roman*),
1222 ref = \theenumii.\roman*}
1223 \setlist[description]{font=\sffamily\bfseries}
1224 \end{verbatim}
1225 These setting are read in the following order: list, list at the
1226 current level, enumerate/itemize/description, and
1227 enumerate/itemize/description at the current level; if a key appears
1228 several times with different values, the last one, i.e., the most
1229 specific one, is applied. If we are resuming a series or a list with
1230 \texttt{resume*}, the saved keys are then applied. Finally, the
1231 optional argument (except \texttt{resume*}), if any, is applied.
1232
1233 \LaTeX{} provides a set of macros to change many of these parameters,
1234 but setting them with the package is more consistent and sometimes
1235 more flexible at the cost of being more ``explicit'' (and verbose).
1236
1237 The list specification can contain variables and counters, provided
1238 they are expandable, and counters are \textsf{calc}-savvy, so that if
1239 you load this package you can write things like:
1240 \begin{verbatim}
1241 \newcount{toplist}
1242 \setcount{toplist}{1}
1243 \newcommand{\mylistname}{enumerate}
1244 \setlist[\mylistname,\value{toplist}+1]{labelsep=\itemindent+2em]
1245 \end{verbatim}
1246 This allows defining lists with the help of loops.
1247
1248 \begin{warning}
1249 It seems there is no way to catch a misspelled name in |\setlist| or
1250 |\newlist|, and a meaningless error ``Missing number, treated as
1251 zero'' is raised.
1252 \end{warning}
1253
1254 \section{Size dependent settings}
1255 \label{s:sized}
1256
1257 \New{3.6} For settings depending on the font size, in most cases all
1258 you need are relative units like |ex| or |em|. Sometimes, you may want
1259 discrete steps, and a special syntax allows them.
1260
1261 The following package option is required for making use of this
1262 feature.
1263
1264 \begin{desc}
1265 |sizes| (package option)
1266 \end{desc}
1267
1268 Lengths can contain size-based settings as follows (the value before
1269 the first \texttt{<} is a default).
1270 \begingroup
1271 \makeatletter
1272 \renewcommand\verbatim@font{\normalfont\ttfamily}
1273 \begin{verbatim}
1274 \setlist{
1275 topsep = 20pt <-10> 6pt <10-> 40pt,
1276 leftmargin = <-10> 0cm <10> 1cm <10-> 2cm ,
1277 rightmargin = <-10> 0cm <10> 1cm <10-> 2cm ,
1278 }
1279 \end{verbatim}
1280 \endgroup
1281
1282 Names are accepted, too: |script|, |tiny|, |footnote|, |small|,
1283 |normal|, |large|, |Large|, |LARGE|, |huge|, |Huge| (ie, remove `size'
1284 from the \LaTeX{} name if necessary). For example:
1285 \begingroup
1286 \makeatletter
1287 \renewcommand\verbatim@font{\normalfont\ttfamily}
1288 \begin{verbatim}
1289 \setlist{
1290 topsep = 20pt <-normal> 6pt <normal-> 40pt,
1291 leftmargin = <-normal> 0cm <normal> 1cm <normal-> 2cm ,
1292 rightmargin = <-normal> 0cm <normal> 1cm <normal-> 2cm ,
1293 }
1294 \end{verbatim}
1295 \endgroup
1296
1297 Single values take precedence over ranges (i. e., specific takes
1298 precedence over generic). In ranges, the last match wins. The range
1299 |a-b| is $a \le \mbox{size} < b$ (the lower bound is included, but not
1300 the upper one). These rules allow in the examples above the setting for
1301 |10| or |normal| in the logical place. Remember nominal sizes are not
1302 always the real sizes -- for example, with option |11pt|, |\normalsize|
1303 (and |normal|) is 10.95. You may precede a value with several single
1304 qualifiers like
1305 \texttt{<}|small|\texttt{><}|normal|\texttt{>}|12pt|.\footnote{Note
1306 this syntax follows closely that of \texttt{\string\DeclareFontShape},
1307 except in the precedence of single values.} A value before the first
1308 \texttt{<..>} is considered a default value.
1309
1310 \begin{note}
1311 For efficiency reasons, named sizes are assigned only once, when
1312 \textsf{enumitem} is loaded, in the assumption they are set by the
1313 class, or a local style loaded previously.
1314 \end{note}
1315
1316 \begin{desc}
1317 |\SetEnumitemSize{<name>}{<selector>}|
1318 \end{desc}
1319
1320 \New{3.7} If sizes are modified after loading \textsf{enumitem} or you
1321 are using a class with non standard sizes (or even you just want
1322 another names), they can be set or reset with the following tool.
1323
1324 \begin{example}
1325 A trivial example:
1326 \begin{verbatim}
1327 \SetEnumitemSize{normal}{\normalsize}
1328 \SetEnumitemSize{large}{\large}
1329 \end{verbatim}
1330 \end{example}
1331
1332 \begin{desc}
1333 |\setlist|\texttt{\string<}|<size>|\texttt{\string>}%
1334 |[<names>,<levels>]{<keys/values>}|
1335 \end{desc}
1336
1337 \New{3.7} An extension to |\setlist| described below which adds the
1338 definitions, but only for the given size (either single or a range).
1339 The precedence rules for sizes also apply here (so that the order of
1340 |\setlist|'s are relevant), and size dependent keys as defined by this
1341 procedure take precedence over the rest of the keys. For example:
1342 \begingroup
1343 \makeatletter
1344 \renewcommand\verbatim@font{\normalfont\ttfamily}
1345 \begin{verbatim}
1346 \setlist<-normal>[enumerate]{nosep}
1347 \end{verbatim}
1348 \endgroup
1349
1350 However, only a size qualifier is accepted in each |\setlist|.
1351
1352 \section{Cloning the basic lists}
1353 \label{s.clone}
1354
1355 \begin{desc}
1356 |\newlist{<name>}{<type>}{<max-depth>}|\\
1357 |\renewlist{<name>}{<type>}{<max-depth>}|
1358 \end{desc}
1359
1360 The three lists can be cloned so that you can define ``logical''
1361 environments behaving like them. To define a new lists (or redefine a
1362 existing one), use |\newlist| (or |\renewlist|), where |<type>| is
1363 |enumerate|, |itemize| or |description|. Inline lists have types
1364 \texttt{enumerate*}, \texttt{itemize*}, and \texttt{description*}.
1365
1366 \begin{note}
1367 The inline |<type>|s are available always, even without the package
1368 option |inline|, which just defines three environments of the
1369 corresponding types with those names.
1370 \end{note}
1371
1372 If |<type>| is |enumerate|, a set of counters with names |<name>i|,
1373 |<name>ii|, |<name>iii|, |<name>iv|, etc. (depending on |<max-depth>|)
1374 is defined.
1375
1376 Then you can use those counters in labels; e. g., if you have defined a
1377 list named \texttt{steps}, you can define a label with:
1378 \begin{verbatim}
1379 label=\arabic{stepsii}.\arabic{stepsi}
1380 \end{verbatim}
1381
1382 \begin{warning}
1383 Don't use an arbitrarily large number for |<max-depth>|, to avoid
1384 creating too many counters and related macros.
1385 \end{warning}
1386
1387 \begin{warning}
1388 For consistency with the counter naming schema in \LaTeX, list levels
1389 are also named internally with a roman numeral, ie, |<list>i|,
1390 |<list>ii|, |<list>iii|, etc. For this reason (both counter and list
1391 names), defining two lists as, say, |books| and |booksi| leads to
1392 unexpected results (currently without any warning, which should be
1393 fixed).
1394 % TODO - Perhaps I must change the internal names, so that
1395 % this restriction doesn't apply to itemize and description.]
1396 \end{warning}
1397
1398 \begin{desc}
1399 |\setlist[<names>,<levels>]{<keys/values>}|\\
1400 |\setlist*[<names>,<levels>]{<keys/values>}|
1401 \end{desc}
1402
1403 After creating a list, you can (in fact you
1404 must, at least the label) set the new list with |\setlist|:
1405 \begin{verbatim}
1406 \newlist{ingredients}{itemize}{1}
1407 \setlist[ingredients]{label=\textbullet}
1408 \newlist{steps}{enumerate}{2}
1409 \setlist[steps,1,2]{label=(\arabic*)}
1410 \end{verbatim}
1411 Names in the optional argument of |\setlist| say which lists applies the
1412 settings to, and numbers say the level (it is |calc|-savvy). Several
1413 lists and/or several levels can be given, and all combinations are
1414 set; e.g.:
1415 \begin{verbatim}
1416 \setlist[enumerate,itemize,2,3]{...}
1417 \end{verbatim}
1418 \noindent sets enumerate/2, enumerate/3, itemize/2 and itemize/3.
1419 No number (or 0) means ``all levels'' and no name means ``all lists''; no
1420 optional argument means ``all lists at all levels''.
1421
1422 The starred form |\setlist*| adds the settings to the previous ones.
1423 You may restrict the additions to a certain font size, as explained in
1424 section \ref{s:sized}. It must be noted the latter have a higher
1425 precedence than the starred ones (i. e., settings added for some sizes
1426 take precedence over settings added for all sizes, so that the most
1427 specific value for a key is applied).
1428
1429 \begin{desc}
1430 |\setlistdepth{<integer>}|
1431 \end{desc}
1432
1433 By default, \LaTeX{} has a limit of 5 nesting levels, but when
1434 cloning lists this value may be too short, and therefore you may want
1435 to set a new value. In levels below the 5th (or the deepest defined by a
1436 class), the settings of the last are used (i.e., |\@listvi|).
1437
1438 \section{More about counters}
1439
1440 \subsection{New counter representation}
1441
1442 \begin{desc}
1443 |\AddEnumerateCounter{<LaTeX command>}{<internal command>}{<widest label>}|
1444 \end{desc}
1445
1446 ``Registers'' a counter representation so that \textsf{enumitem}
1447 recognizes it. Intended mainly for non Latin scripts, but also useful
1448 in Latin scripts.
1449
1450 \begin{example}
1451 The following example defines a new counter with named ordinals:
1452 \begin{verbatim}
1453 \makeatletter
1454 \def\ctext#1{\expandafter\@ctext\csname c@#1\endcsname}
1455 \def\@ctext#1{\ifcase#1\or First\or Second\or Third\or
1456 Fourth\or Fifth\or Sixth\fi}
1457 \makeatother
1458 \AddEnumerateCounter{\ctext}{\@ctext}{Second}
1459 \end{verbatim}
1460 \end{example}
1461
1462 \begin{note}
1463 The counter names can contain |@| even if not a letter without
1464 raising an error, as shown in the example above.
1465 \end{note}
1466
1467 A starred variant allows to give a number instead of a string as the
1468 widest label.
1469
1470 \begin{example}
1471 If the widest label is that corresponding to the value 2:
1472 \begin{verbatim}
1473 \AddEnumerateCounter*{\ctext}{\@ctmoreext}{2}
1474 \end{verbatim}
1475 \end{example}
1476
1477 This variant is to be preferred if the representation is not a plain
1478 string but it is styled, e.g., with small caps.
1479
1480 \begin{example}
1481 An example for Russian is:
1482 \begin{verbatim}
1483 \AddEnumerateCounter*{\asbuk}{\c@asbuk}{7}
1484 \end{verbatim}
1485 \end{example}
1486
1487 \subsection{Restarting \texttt{enumerate}s}
1488
1489 \begin{desc}
1490 |\restartlist{<list-name>}|
1491 \end{desc}
1492
1493 Currently you can get a continuous numbering through a document with:
1494 \begin{verbatim}
1495 \setlist[enumerate]{resume}
1496 \end{verbatim}
1497 |\restartlist| has been added for restarting the counter in the middle
1498 of the document. For example, you could emit a |\restartlist| when
1499 chapters start, so that there is a continuous numbering through every
1500 chapter.
1501
1502 \begin{warning}
1503 It is based solely in the list \textit{name}, \textit{not} the list
1504 \textit{type}, which means \texttt{enumerate*} as defined with the
1505 package option \texttt{inline} is not the same as \texttt{enumerate},
1506 because its name is different.
1507 \end{warning}
1508
1509 \section{Package options}
1510
1511 Besides |inline|, |ignoredisplayed|, |sizes|, |series=override| and
1512 |shortlabels|, the following option is available.
1513
1514 \begin{desc}
1515 |loadonly|
1516 \end{desc}
1517
1518 With this package option the package is loaded but the three
1519 lists are not redefined. You can create your own lists, yet, or
1520 even redefine the existing ones.
1521
1522 \section{The trivlist issue}
1523
1524 \LaTeX{} uses a simplified version of |list| named |trivlist| to set
1525 displayed material, like |center|, |tabbing|, |theorem|, etc., even if
1526 conceptually they are not lists. Unfortunately, |trivlist| uses the
1527 current list settings, which has the odd side effect that changing the
1528 vertical spacing of lists also changes sometimes the spacing in these
1529 environments.
1530
1531 This package modifies |trivlist| so that the default settings for
1532 the current level (ie, those set by the corresponding |clo|
1533 files) are set again. In standard \LaTeX{} that is usually redundant,
1534 but if we want to fine tune lists, not resetting the default values
1535 could be a real issue (particularly if you use the |nosep|
1536 option).
1537
1538 A minimal control of vertical spacing has been made possible
1539 with\footnote{|\string\setdisplayed| is deprecated.}
1540 \begin{itemize}
1541 \item |\setlist[trivlist,<level>]{<keys/values>}|
1542 \end{itemize}
1543 but |trivlist| itself, which is not used directly very often, does not
1544 accept an optional argument. This feature is not intended as a
1545 full-fledge |trivlist| formatter.
1546
1547 If for some reason you do not want to change |trivlist| and preserve
1548 the original definition, you can use the package option
1549 |ignoredisplayed|.
1550
1551 \New{3.6} If, on the other hand, you want to also apply the changes for
1552 all lists to trivlists, just set the package option |includedisplayed|.
1553
1554 \section{Samples}
1555
1556 \expandafter\ifx\csname setenumerate\endcsname\relax
1557
1558 Please, install first the package and then typeset this document again.
1559
1560 \else
1561
1562 In these samples we set |\setlist{noitemsep}|
1563
1564 \setlist{noitemsep}
1565 \small
1566
1567 \newcommand{\newsample}{\vskip6pt\goodbreak\hrule height 1pt\vskip6pt}
1568 \newcommand{\samplesep}{\vskip6pt\goodbreak\hrule\vskip6pt}
1569 \newbox\vsep
1570 \setbox\vsep\hbox{\vrule height 2ex depth 16ex width 1pt}
1571 \dp\vsep0pt
1572 \newcommand\showsep{\leavevmode\llap{\copy\vsep}}
1573
1574 \newsample
1575
1576 \begin{verbatim}
1577 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1578 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1579 \begin{enumerate}[labelindent=\parindent,leftmargin=*]
1580 \item lanza en astillero,
1581 \item adarna antigua,
1582 \item roc\'{\i}n flaco, y
1583 \item galgo corredor.
1584 \end{enumerate}
1585 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1586 noches, duelos y quebrantos los s\'{a}bados...
1587 \end{verbatim}
1588
1589 The rule shows |labelindent|.
1590
1591 \samplesep
1592
1593 \showsep En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1594 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1595 \begin{enumerate}[labelindent=\parindent,leftmargin=*]
1596 \item lanza en astillero,
1597 \item adarna antigua,
1598 \item roc\'{\i}n flaco, y
1599 \item galgo corredor.
1600 \end{enumerate}
1601 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1602 noches, duelos y quebrantos los s\'{a}bados...
1603
1604 \newsample
1605
1606 With |\begin{enumerate}[leftmargin=*] % labelindent=0pt by default|.
1607
1608 The rule shows |labelindent|.
1609
1610 \samplesep
1611
1612 \noindent\showsep\hskip\parindent En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1613 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1614 \begin{enumerate}[leftmargin=*]
1615 \item lanza en astillero,
1616 \item adarna antigua,
1617 \item roc\'{\i}n flaco, y
1618 \item galgo corredor.
1619 \end{enumerate}
1620 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1621 noches, duelos y quebrantos los s\'{a}bados...
1622
1623 \newsample
1624
1625 With |\begin{enumerate}[leftmargin=\parindent]|.
1626
1627 The rule shows |leftmargin|.
1628
1629 \samplesep
1630
1631 \showsep En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1632 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1633 \begin{enumerate}[leftmargin=\parindent]
1634 \item lanza en astillero,
1635 \item adarna antigua,
1636 \item roc\'{\i}n flaco, y
1637 \item galgo corredor.
1638 \end{enumerate}
1639 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1640 noches, duelos y quebrantos los s\'{a}bados...
1641
1642 \newsample
1643
1644 With |\begin{enumerate}[labelindent=\parindent,|\allowbreak
1645 | leftmargin=*,|\allowbreak| label=\Roman*.,|\allowbreak
1646 | widest=III,|\allowbreak| align=left]|.
1647
1648 The rule shows |labelindent|. Note
1649
1650 \samplesep
1651
1652 \showsep En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1653 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1654 \begin{enumerate}[labelindent=\parindent, leftmargin=*,
1655 label=\Roman*., widest=III, align=left]
1656 \item lanza en astillero,
1657 \item adarna antigua,
1658 \item roc\'{\i}n flaco, y
1659 \item galgo corredor.
1660 \end{enumerate}
1661 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1662 noches, duelos y quebrantos los s\'{a}bados...
1663
1664 \newsample
1665
1666 With |\begin{enumerate}[label=\fbox{\arabic*}]|. A reference to
1667 the first item is \ref{i:first}
1668
1669 \samplesep
1670
1671 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1672 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1673 \begin{enumerate}[label=\fbox{\arabic*}]
1674 \item \label{i:first}lanza en astillero,
1675 \item adarna antigua,
1676 \item roc\'{\i}n flaco, y
1677 \item galgo corredor.
1678 \end{enumerate}
1679 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1680 noches, duelos y quebrantos los s\'{a}bados...
1681
1682 \newsample
1683
1684 With nested lists.
1685
1686 \samplesep
1687
1688 \begin{verbatim}
1689 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1690 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1691 \begin{enumerate}[label=(\alph*), labelindent=\parindent,
1692 leftmargin=*, start=12]
1693 \item lanza en astillero,
1694 \begin{enumerate}[label=(\alph{enumi}.\roman*), leftmargin=*, start=7]
1695 \item adarna antigua,
1696 \end{enumerate}
1697 \item roc\'{\i}n flaco, y
1698 \begin{enumerate}[label=(\alph{enumi}.\roman*), leftmargin=*, resume]
1699 \item galgo corredor.
1700 \end{enumerate}
1701 \end{enumerate}
1702 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1703 noches, duelos y quebrantos los s\'{a}bados...
1704 \end{verbatim}
1705
1706 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1707 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1708 \begin{enumerate}[label=(\alph*), labelindent=\parindent,
1709 leftmargin=*, start=12]
1710 \item lanza en astillero,
1711 \begin{enumerate}[label=(\alph{enumi}.\roman*), leftmargin=*, start=7]
1712 \item adarna antigua,
1713 \end{enumerate}
1714 \item roc\'{\i}n flaco, y
1715 \begin{enumerate}[label=(\alph{enumi}.\roman*), leftmargin=*, resume]
1716 \item galgo corredor.
1717 \end{enumerate}
1718 \end{enumerate}
1719 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1720 noches, duelos y quebrantos los s\'{a}bados...
1721
1722 \newsample
1723
1724 \begin{verbatim}
1725 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1726 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1727 \begin{description}[font=\sffamily\bfseries, leftmargin=3cm,
1728 style=nextline]
1729 \item[Lo primero que ten\'{\i}a el Quijote] lanza en astillero,
1730 \item[Lo segundo] adarna antigua,
1731 \item[Lo tercero] roc\'{\i}n flaco, y
1732 \item[Y por \'{u}ltimo, lo cuarto] galgo corredor.
1733 \end{description}
1734 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1735 noches, duelos y quebrantos los s\'{a}bados...
1736 \end{verbatim}
1737
1738 \samplesep
1739
1740 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1741 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1742 \begin{description}[font=\sffamily\bfseries, leftmargin=3cm,
1743 style=nextline]
1744 \item[Lo primero que ten\'{\i}a el Quijote] lanza en astillero,
1745 \item[Lo segundo] adarna antigua,
1746 \item[Lo tercero] roc\'{\i}n flaco, y
1747 \item[Y por \'{u}ltimo, lo cuarto] galgo corredor.
1748 \end{description}
1749 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1750 noches, duelos y quebrantos los s\'{a}bados...
1751
1752 \newsample
1753
1754 Same, but with |sameline|.
1755
1756 \samplesep
1757
1758 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1759 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1760 \begin{description}[font=\sffamily\bfseries, leftmargin=3cm,
1761 style=sameline]
1762 \item[Lo primero que ten\'{\i}a el Quijote] lanza en astillero,
1763 \item[Lo segundo] adarna antigua,
1764 \item[Lo tercero] roc\'{\i}n flaco, y
1765 \item[Y por \'{u}ltimo, lo cuarto] galgo corredor.
1766 \end{description}
1767 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1768 noches, duelos y quebrantos los s\'{a}bados...
1769
1770 \newsample
1771
1772 Same, but with |multiline|. Note the text overlaps if the item body is
1773 too short.
1774
1775 \samplesep
1776
1777 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1778 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1779 \begin{description}[font=\sffamily\bfseries, leftmargin=3cm,
1780 style=multiline]
1781 \item[Lo primero que ten\'{\i}a el Quijote] lanza en astillero,
1782 \item[Lo segundo] adarna antigua,
1783 \item[Lo tercero] roc\'{\i}n flaco, y
1784 \item[Y por \'{u}ltimo, lo cuarto] galgo corredor.
1785 \end{description}
1786 Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
1787 noches, duelos y quebrantos los s\'{a}bados...
1788
1789 \fi
1790
1791 \normalsize
1792
1793 \section{Afterword}
1794
1795 \subsection{\LaTeX{} lists}
1796
1797 As it is well known, \LaTeX{} predefines three lists:
1798 \texttt{enumerate}, \texttt{itemize} and \texttt{description}. This
1799 is a very frequent classification which can also be found in, say,
1800 HTML. However, there is a more general model based in three
1801 fields---namely, label, title, and body---, so that enumerate and
1802 itemize has label (numbered and unnumbered) but no title, while
1803 description has title but no label. In this model, one can have a
1804 description with entries marked with labels, as for example (of
1805 course, this simple solution is far from satisfactory):
1806 \begin{verbatim}
1807 \newcommand\litem[1]{\item{\bfseries #1,\enspace}}
1808 \begin{itemize}[label=\textbullet]
1809 \litem{Lo primero que ten\'{\i}a el Quijote} lanza en astillero,
1810 ... etc.
1811 \end{verbatim}
1812
1813 \vskip6pt
1814 \goodbreak
1815 \hrule
1816 \vskip6pt
1817
1818 \newcommand\litem[1]{\item{\bfseries #1,\enspace}}
1819 En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
1820 no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
1821 \begin{itemize}[label=\textbullet]
1822 \litem{Lo primero que ten\'{\i}a el Quijote} lanza en astillero,
1823 \litem{Lo segundo} adarna antigua,
1824 \litem{Lo tercero} roc\'{\i}n flaco, y
1825 \litem{Y por \'{u}ltimo, lo cuarto} galgo corredor.
1826 \end{itemize}
1827
1828 \vskip6pt
1829 \goodbreak
1830 \hrule
1831 \vskip6pt
1832
1833 % This format in not infrequent at all and a tool for defining them is
1834 % on the way and at a very advanced stage. It has not been include in
1835 % version 3.0 because I'm not sure if the proper place is this package
1836 % or \textsf{titlesec} and it is not stable enough yet.
1837
1838 \subsection{Known issues}
1839
1840 \begin{itemize}
1841
1842 \item
1843 List resuming is based on environment names, and when a
1844 |\newenvironment| contains a list you may want to use |\begin{<list>}|
1845 and |\end{<list>}|. Using the corresponding low-level commands (ie,
1846 |\<list>| and |\end<list>|) is not an error, but it is your
1847 responsibility to make sure the result is correct.
1848
1849 \item The behavior of mixed boxed labels (including enumerate and
1850 itemize) and unboxed labels is not well-defined. The same applies to
1851 boxed and unboxed inline lists (which could even raise an error).
1852
1853 \item
1854 Similarly, resuming a series and a list at the same time is allowed,
1855 too, but again its behavior is not well-defined.
1856
1857 \item (3.5.2) An incompatibility with 2.x has popped up -- if you were
1858 using the optional argument to pass a value to a |\ref| or other
1859 macro requiring expandable macros, an error is raised. A quick fix
1860 is letting |\makelabel| to |\descriptionlabel| in \texttt{before}.
1861
1862 \end{itemize}
1863
1864 \subsection{What's new in 3.0}
1865
1866 \begin{itemize}
1867 \item Inline lists, with keys to set how items are joined (ie, the
1868 punctuation between items). Two modes are provided: |boxed| and
1869 |unboxed|.
1870
1871 \item |\setlist| is \textsf{calc}-savvy (eg, for use in loops),
1872 and you can set different lists and levels at once. \item All lengths
1873 related to labels can take the value |*| (and not only
1874 |labelsep| and |leftmargin|). Its behavior has been made
1875 consistent and there is new value |!| which does not compute the
1876 widest label.
1877
1878 \item With |\restartlist{<list-name>}|, list counters can be restarted (in
1879 case you are using |resume|).
1880
1881 \item |resume*| can be combined with other keys.
1882
1883 \item Lists can be gathered globally using series, so that they are
1884 considered a single list. To start a series just use
1885 |series=<series-name>| and then resume it with |resume=<series-name>|
1886 or |resume*=<series-name>|.
1887
1888 \item The ``experimental'' |fullwidth| has been replaced by a new key
1889 |wide|.
1890
1891 \item|\SetLabelAlign| defines new align values.
1892
1893 \item You can define ``abstract'' values (eg, |label=numeric|) and
1894 new keys.
1895 \end{itemize}
1896
1897 \begin{itemize}
1898 \item (3.2) |start| and |widest*| are \textsf{calc}-savvy.
1899 \item (3.2) |\value| can be used with |widest*|.
1900 \item (3.2) Some internal restrictions in |\arabic| and the like
1901 has been removed. It is more flexible at the cost of having a more
1902 ``relaxed'' error checking.
1903 \end{itemize}
1904 \subsection{Bug fixes}
1905
1906 \begin{itemize}
1907 \item Star values (eg, |leftmargin=*|) could not be overridden
1908 and new values were ignored.
1909 \item |nolistsep| as the first of several keys was not always
1910 recognized and therefore treated like a short label
1911 (i.e., |nol\roman*stsep|).
1912 \item |labelwidth| did not always work (when there was a prior
1913 |widest| and |*|)
1914 \item With |align=right| the label and the following text could
1915 overlap.
1916 \item |description| did not get the correct list level.
1917 \item At some point (2.x?) |\value*| stopped working.
1918 \item (3.1) Unfortunately, \textsf{xkeyval} ``kills''
1919 \textsf{keyval}, so the latest has been replicated in
1920 \textsf{enumitem}.
1921 \item (3.3) Fixes a serious bug -- with |*| neither
1922 |itemize| nor |description| worked.
1923 \item (3.4) Fixes bad spacing in mode boxed (misplaced |\unskip|
1924 before the first item and wrong spacefactor between items).
1925 \item (3.4) |nolistsep| did not work as intended, but since the
1926 error has been there for several years, a new key |nosep| is
1927 provided.
1928 \item (3.4) The issue with |nolistsep| with |shortlabels|
1929 (see above) was not fixed in all cases. Hopefully now it is.
1930 \item (3.5.0) Fixed the fix related to the spacefactor between items.
1931 \item (3.5.0) Fixed a problem with nested boxed inline lists.
1932 \item (3.5.1) \texttt{resume*} only worked once, and subsequent ones
1933 bahaved like \texttt{resume}.
1934 \item (3.5.2) Fixed |\setlist*|, which didn't work.
1935 \end{itemize}
1936
1937 \subsection{Acknowledgements}
1938
1939 I wish to thank particularly the comments and suggestions from Lars
1940 Madsen, who has found some bugs, too.
1941
1942 \end{document}
1943
1944 MIT License
1945 -----------
1946
1947 Permission is hereby granted, free of charge, to any person obtaining a
1948 copy of this software and associated documentation files (the
1949 "Software"), to deal in the Software without restriction, including
1950 without limitation the rights to use, copy, modify, merge, publish,
1951 distribute, sublicense, and/or sell copies of the Software, and to
1952 permit persons to whom the Software is furnished to do so, subject to
1953 the following conditions:
1954
1955 The above copyright notice and this permission notice shall be included
1956 in all copies or substantial portions of the Software.
1957
1958 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1959 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1960 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1961 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1962 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1963 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1964 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.