texlive[49282] Master: enumitem (30nov18)
commits+karl at tug.org
commits+karl at tug.org
Fri Nov 30 22:48:04 CET 2018
Revision: 49282
http://tug.org/svn/texlive?view=revision&revision=49282
Author: karl
Date: 2018-11-30 22:48:04 +0100 (Fri, 30 Nov 2018)
Log Message:
-----------
enumitem (30nov18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.pdf
trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex
trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty
trunk/Master/tlpkg/libexec/ctan2tds
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/enumitem/README.md
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/enumitem/README
Deleted: trunk/Master/texmf-dist/doc/latex/enumitem/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/enumitem/README 2018-11-30 20:26:40 UTC (rev 49281)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/README 2018-11-30 21:48:04 UTC (rev 49282)
@@ -1,106 +0,0 @@
-Enumitem 3.5.2
-~~~~~~~~~~~~~~
-
-A package to customize the three basic lists (enumerate,
-itemize and description) by means of a set of parameters,
-and to clone them to define new "logical" lists.
-It provides most of the flexibility you may want to
-design your own lists:
-- fancy labels and fancy refs,
-- leftmargin, labelsep and labelwidth automatically set,
-- changes applied globally or only in one of the three
- types or even in a single list (including topsep) by
- means of a sort of "inheritance",
-- inline lists,
-- several description styles (which fix some bad
- spacing, too),
-- starting value and counter resuming,
-- trivlists properly formatted,
-- control on page breaking,
-- gathering of lists to be treated like a unit.
-
-Recent changes (3.0)
-~~~~~~~~~~~~~~~~~~~~
-
-1) Inline lists, with keys to set how items are joined (ie, the
-punctuation between items). Two modes are provided: `boxed' an
-`unboxed' -- with the former (the default) a different punctuation
-before the last item is allowed.
-2) \setlist is calc-savvy (eg, for use in loops), and you can set
-diferent lists and levels at once.
-3) All lengths related to labels can take the value * (and not only
-labelsep and leftmargin). Its behaviour has been made consistent and
-there is new value ! which does not compute the widest label.
-4) With \restartlist{list-name}, list counters can be restarted (in
-case you are using `resume').
-5) `resume*' can be combined with other keys.
-6) Lists can be gathered globally using series, so that they are
-considered a single list. To start a series just use
-series=<series-name> and then resume it with resume=<series-name> or
-resume*=<series-name>.
-7) The ``experimental'' fullwidth has been replaced by a new key
-`wide'.
-8) \SetLabelAlign defines new align values.
-9) You can define ``abstract'' values (eg, label=numeric) and
-new keys.
-
-Bug fixes (3.0)
-~~~~~~~~~~~~~~~
-
-- Star values (eg, leftmargin=*) could not be overriden
-and new values were ignored.
-- nolistsep as the first of several keys was not always
-recognized and therefore treated like a short label
-(ie, nol\roman*stsep).
-- labelwidth didn't always work (when there was a prior
-`widest' and *)
-- With align=right the label and the following text could
-overlap.
-- description didn't get the correct list level.
-- At some point (2.x?) \value* stopped working.
-
-3.1
-~~~
-- Fixed incompatibility with xkeyval
-
-3.2
-~~~
-- start and widest* are calc-savvy.
-- \value can be used with widest*
-- Some internal restrictions in \arabic and the like has been removed.
-It is more flexible at the cost of having a more ``relaxed'' error
-checking.
-
-3.3
-~~~
-- Using *-values with itemize and description didn't work.
-
-3.4
-~~~
-- New key nosep, replacing nolistsep, which didn't work as
-documented.
-- Fixed spacing in inline boxed lists.
-- Fixed (hopefully) the bug with noitemsep and shorlabels.
-
-3.5.0
-~~~~~
-- Fixed the fix related to inline lists (spacefactor).
-- Fixed some problems in nested boxed inline lists.
-(- And sub-sub-versions are introduced.)
-
-3.5.1
-~~~~~
-- resume* only worked once, and subsequent ones
-behaved like resume.
-
-3.5.2
-~~~~~
-- \setlist* didn't work.
-
-_________________________________________________________________
-Javier Bezos | http://www.tex-tipografia.com
-.................................................................
-2011-09-28
-
-
-
Added: trunk/Master/texmf-dist/doc/latex/enumitem/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/enumitem/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/README.md 2018-11-30 21:48:04 UTC (rev 49282)
@@ -0,0 +1,30 @@
+## Enumitem 3.6
+
+This package provides most of the flexibility you may want to customize
+the three basic list environments (`enumerate`, `itemize` and
+`description`) and to design your own lists, with a `<key>=<value>`
+syntax.
+
+### Latest changes
+
+```
+3.6 2018-11-30
+ - New key 'left', for fast, tab-like positioning of the label.
+ - The key 'widest' now works with 'itemize' and 'description'.
+ - New key 'first', for code at the beginning of the list body.
+ - \DrawEnumitemLabel, for visual debugging of the label position.
+ - Extended settings for trivlist, with a new package option
+ 'includedisplayed'.
+ - Size dependent lengths (first steps).
+ - Fix - 'format'/'font' was not taken into account when computing
+ 'widest'.
+```
+
+License: MIT
+
+Repository: https://github.com/jbezos/enumitem
+
+________
+Javier Bezos --- http://www.texnia.com
+
+2018/11/30
Property changes on: trunk/Master/texmf-dist/doc/latex/enumitem/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex 2018-11-30 20:26:40 UTC (rev 49281)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex 2018-11-30 21:48:04 UTC (rev 49282)
@@ -1,27 +1,25 @@
-% +--------------------------------------------------+
-% | Typeset this file to document enumitem.sty |
-% +--------------------------------------------------+
%
-% Copyright (c) 2003-2011 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 2003-2018 Javier Bezos http://www.texnia.com
%
-% This file is part of the enumitem distribution release 3.5.2
-% ------------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+% Repository: https://github.com/jbezos/enumitem
+%
\documentclass[a4paper]{ltxguide}
+\raggedright
+\parskip=.8ex
+\advance\oddsidemargin-.5cm
+\advance\textwidth1cm
+\addtolength{\textheight}{2cm}
+\addtolength{\topmargin}{-1.5cm}
+
+\usepackage{xcolor,bera}
+
+\definecolor{notes}{rgb}{.75, .3, .3}%
+
\makeatletter
\newenvironment{desc}
{\if at nobreak
@@ -30,25 +28,35 @@
\fi
\decl}
{\enddecl}
+\def\@begintheorem#1#2{%
+ \list{}{}%
+ \global\advance\@listdepth\m at ne
+ \item[{\sffamily\bfseries\color{notes}\MakeUppercase{#1}}]}%
\makeatother
+\newtheorem{warning}{Warning}
+\newtheorem{note}{Note}
+\newtheorem{example}{Example}
+\makeatother
-\newcommand\3{\unskip\enspace\fbox{\fontsize{4}{4}\selectfont NEW 3.0}}
+\usepackage{framed}
+\definecolor{shadecolor}{rgb}{0.96,0.96,0.93}
+\let\bblxv\verbatim
+\let\bblexv\endverbatim
+\def\verbatim{\begin{shaded*}\bblxv\vskip-\baselineskip\vskip2.5\parsep}
+\def\endverbatim{\bblexv\vskip-2\baselineskip\end{shaded*}}
+\newcommand\New[1]{%
+ \colorbox[rgb]{.87, .9, .83}{New #1}\enspace\ignorespaces}
+
\usepackage{hyperref}
-%\usepackage{pslatex}
-
\title{Customizing lists\\with the\\\textsf{enumitem} package}
\author{Javier Bezos\footnote{For bug reports, comments and
-suggestions go to \href{http://www.tex-tipografia.com/enumitem.html}%
-{\texttt{http://www.tex-tipografia.com/enumitem.html}}.
-English is not my strong point, so contact me when you
-find mistakes in the manual. Other packages by the same author:
-\textsf{gloss} (with Jos\'e Luis D\'{\i}az), \textsf{accents,
-tensind, esindex, dotlessi, titlesec, titletoc}.}}
+suggestions go to \href{http://www.texnia.com/enumitem.html}%
+{\texttt{http://www.texnia.com/enumitem.html}}.}}
-\date{Version 3.5.2\\2011-09-28}
+\date{Version 3.6\\2018/11/30}
\IfFileExists{enumitem.sty}{\usepackage{enumitem}}{}
@@ -64,54 +72,50 @@
\begin{document}
\maketitle
+\tableofcontents
\section{Introduction}
-When I began to use \LaTeX{} several year ago, two particular points
-annoyed me because I found customizing them was very complicated
----headlines/footlines and lists. A new way to redefine the former is
-accomplished in my own \textsf{titlesec} package, but none was
-available to customize the latter except:
+This package provides most of the flexibility you may want to customize
+the three basic list environments (|enumerate|, |itemize| and
+|description|) and to design your own lists, with a |<key>=<value>|
+syntax:
\begin{itemize}
-\item \textsf{enumerate}, which just allows to change the label and
-it does it pretty well.
+\item Fancy labels and fancy refs, including a syntax similar to that
+in the \textsf{enumerate} package.
-\item \textsf{mdwlist}, which only ``provides some vaguely useful
-list-related commands and environments,'' as its manual states,
-and not a coherent way of handling lists.
+\item Alternative ways for positioning the label, with a new
+ parameter (|labelindent|) and a tab-like setting (|left|).
-\item \textsf{paralist}, which provides lists within a paragraph (the
-original purpose of this package), a few other hard-wired
-specific changes and the optional argument of \textsf{enumerate}.
-\end{itemize}
+\item Settings applied globally or only in one of the three types or
+even in a single list (including |\topsep|).
-One of the main drawbacks of the standard |list| is its weird
-parameters, whose meaning is not always obvious. In order to provide
-a cleaner interface two approaches were possible: either defining new
-lists, or introducing a new syntax making the standard lists easier to
-customize. For marks I took the first approach in titlesec, just
-because I did not manage to find a satisfactory solution with the
-\LaTeX{} internal macros, but since lists are in some sense more
-``complete'' than sections and marks, I have taken here the second
-approach.
+\item Inline lists.
-In the interface a sort of ``inheritance'' is used. You can
-set globally the behaviour of lists and then override several
-parameters of, say, enumerate and then in turn override
-a few paremeters of a particular instance. The values will
-be searched in the hierarchy.
+\item Several description styles (which fix some bad spacing, too).
-\section{The package}
+\item |trivlist|s properly formatted.
-This package is intended to ease customizing the three
-basic list environments: |enumerate|, |itemize| and
-|description|. It extends their syntax to allow
-an optional argument where a set of parameters in the
-form |key=value| are available:
+\item Gathering of lists to be treated like a unit, as well as counter
+resuming.
+
+\end{itemize}
+
+In the interface a sort of ``inheritance'' is used. You can set
+globally the behaviour of lists and then override several parameters
+of, say, |enumerate| and then in turn override a few paremeters of a
+particular instance. The values will be searched in the hierarchy.
+
+The package extends the syntax of the lists to allow an optional
+argument where a set of parameters in the form |key=value| are
+available. These keys are equivalent to the well known list parameters
+-- please, see a \LaTeX{} manual for a description of them. Next
+sections explains the extensions provided by |enumitem|.
\begin{itemize}
\item
Vertical spacing:
\begin{itemize}
+\setlength{\itemsep}{0pt}
\item |topsep|
\item |partopsep|
\item |parsep|
@@ -120,6 +124,7 @@
\item
Horizontal spacing:
\begin{itemize}
+\setlength{\itemsep}{0pt}
\item |leftmargin|
\item |rightmargin|
\item |listparindent|
@@ -129,19 +134,64 @@
\end{itemize}
\end{itemize}
-For example:
+\begin{example}
+ A straighforward example is:
\begin{verbatim}
\begin{itemize}[itemsep=1ex,leftmargin=1cm]
\end{verbatim}
+\end{example}
-The keys above are equivalent to the well known list parameters---see a
-\LaTeX{} manual for a description of them. Next sections explains the
-extensions provided by |enumitem|.
+\begin{note}
+ A way to see how these parameters work is with the |layout| package
+ (the manual is named |layman.pdf|).
+\end{note}
+\section{Quick reference}
+
+Some common settings. See the manual below for details.
+
+\begin{itemize}
+\def\verbatim{\begin{shaded*}\bblxv}
+\def\endverbatim{\bblexv\vskip-1.6\baselineskip\end{shaded*}}
+
+\item To remove the vertical space altogether in a list:
+\begin{verbatim}
+\begin{enumerate}[nosep]
+\end{verbatim}
+
+\item To remove the vertical space altogether in \textit{all} lists:
+\begin{verbatim}
+\setlist{nosep}
+\end{verbatim}
+
+\item To start the label at the margin and the item text at the
+ current parindent:
+\begin{verbatim}
+\begin{enumerate}[left=0pt .. \parindent]
+\end{verbatim}
+
+\item To configure the labels like in \textsf{enumerate}: include the
+package option |shortlabels| and then, as a first element, write your
+label:
+\begin{verbatim}
+\begin{enumerate}[(1)]
+\end{verbatim}
+
+\item To continue the previous list, after a ``pause'':
+\begin{verbatim}
+\begin{enumerate}[resume*]
+\end{verbatim}
+
+\item To use the three basic list in line: just add the package option
+|inline| and then the environments |enumerate*|, |itemize*| and
+|description*|.
+
+\end{itemize}
+
\section{Keys}
-This section describes the keys in displayed lists. Most of them are
-available in inline lists, where further keys are available (see
+This section describes the keys in displayed lists. Most of them are
+available in inline lists, where further keys are available (see
\ref{s.inline}).
\subsection{Label and cross references format}
@@ -150,47 +200,55 @@
|label=<commands>|
\end{desc}
-Sets the label to be used in the current level.
-A set of starred versions of |\alph|, |\Alph|,
-|\arabic|, |\roman| and |\Roman|, without argument
-stand for the current counter in |enumerate|.\footnote{Actually,
-the asterisk is currently the argument but things may change.
-Consider them as starred variants and follow the corresponding
-syntax.} Thus
+Sets the label to be used in the current level. A set of starred
+versions of |\alph|, |\Alph|, |\arabic|, |\roman| and |\Roman|, without
+argument stand for the current counter in
+|enumerate|.\footnote{Actually, the asterisk is currently the argument
+but things may change. Consider them as starred variants and follow the
+corresponding syntax.} It works with |\value|, too (provided the widest
+label is not to be computed or |widest*| is used, see below).
+
+\begin{note}
+ If you prefer setting labels like the \textsf{enumerate} package, use
+ ``short labels'' (see section \ref{s.short}).
+\end{note}
+
+\begin{example}
+ The following prints \textit{a}), \textit{b}), and so on (this is a
+ standard style in Spanish, and formerly used by Chicago, too).
\begin{verbatim}
\begin{enumerate}[label=\emph{\alph*})]
\end{verbatim}
-prints \textit{a}), \textit{b}), and so on (this is a
-standard style in Spanish, and formerly used by Chicago, too).
+\end{example}
-It works with |\value|, too (provided the widest label is not to be
-computed or \verb|widest*| is used, see below). A fancier example
-(which looks ugly, but it is intended only to illustrate what is
-possible; requires \textsf{color} and \textsf{pifont}):
+\begin{warning}
+ The value of |label| is a moving argument, and fragile commands must
+ be protected \textit{except} the counters. Because of that, use of
+ |\value| is somewhat tricky, because |\the| or |\ifnum|
+ expects an actual value, which is not the case when |label| is
+ being processed to replace internally the |*| by the form with
+ the counter argument. The best solution is usually encapsulating the
+ logic inside a new ``counter'' with the help of
+ |\AddEnumerateCounter|.\footnote{Which is admittedly somewhat
+ convoluted. A better way to accomplish this is on the way.}
+\end{warning}
+
+\begin{example}
+ A fancier example
+ (which looks ugly, but it is intended only to illustrate what is
+ possible; requires \textsf{color} and \textsf{pifont}):
\begin{verbatim}
-\begin{enumerate}[label=\protect\fcolorbox{blue}{yellow}{\protect\ding{\value*}},
- start=172]
+\begin{enumerate}[label=\protect\fcolorbox{blue}{yellow}{\protect\ding{\value*}}]
\end{verbatim}
+\end{example}
-The value of |label| is a moving argument, and fragile commands must
-be protected \textit{except} the counters. Because of that, use of
-\verb|\value| is somewhat tricky, because \verb|\the| or \verb|\ifnum|
-expects an actual value, which is not the case when \verb|label| is
-being processed to replace internally the \verb|*| by the form with
-the counter argument. The best solution is usually encapsulating the
-logic inside a new ``counter'' with the help of
-\verb|\AddEnumerateCounter|.\footnote{Which is admittedly somewhat
-convoluted. A better way to accomplish this is on the way.}
-
-If you prefer setting labels like the \textsf{enumerate} package, use
-``short labels'' (see section \ref{s.short}).
-
\begin{desc}
|label*=<commands>|
\end{desc}
-Like |label| but its value is appended to the parent label. For example, the follollowing defines a |legal| list (1.,
-1.1., 1.1.1., and so on):
+Like |label| but its value is appended to the parent label. For
+example, the following defines a |legal| list (1., 1.1., 1.1.1., and so
+on):
\begin{verbatim}
\newlist{legal}{enumerate}{10}
\setlist[legal]{label*=\arabic*.}
@@ -201,46 +259,51 @@
\end{desc}
By default, |label| sets also the form of cross references and
-|\the...| (overriding the settings in previous hierarchical
+|\the...| (overriding the settings in parent hierarchical
levels), but you can define a different format with this key. For
example, to remove the right parethesis:
\begin{verbatim}
\begin{enumerate}[label=\emph{\alph*}),ref=\emph{\alph*}]
\end{verbatim}
-In both |label| and |ref|, the counters can be
-used as usual:
+
+\begin{note}
+ In both |label| and |ref|, the counters can be used as usual. So, and
+ provided the current level is the second one:
\begin{verbatim}
\begin{enumerate}[label=\theenumi.\arabic*.]
\end{verbatim}
-or
+ or
\begin{verbatim}
\begin{enumerate}[label=\arabic{enumi}.\arabic*.]
-\end{verbatim}
-(provided the current level is the second one).
+\end{verbatim}
+\end{note}
-Note the |label|s are \textit{not} accumulated to form
-the reference. If you want, say, something like 1.\textit{a}
-from 1) as first level and \textit{a}) as second level,
-you must set it with |ref|. You may use
-|\ref{level1}.\ref{level2}| with appropiate |ref|
-settings, but as Robin Fairbairns points out in the \TeX{} FAQ
-\begin{quote}
-\dots{} [that] would be both tedious and error-prone. What is more, it
-would be undesirable, since you would be constructing a visual
-representation which is inflexible (you could not change all the
-references to elements of a list at one fell swoop).
-\end{quote}
-This is sensible and I recommend to follow the advice, but sometimes
-you might want something like:
+\begin{note}
+ The |label|s are \textit{not} accumulated to form the reference.
+ If you want, say, something like 1.\textit{a} from 1) as first level
+ and \textit{a}) as second level, you must set it with |ref|. You may
+ use |\ref{level1}.\ref{level2}| with appropiate |ref| settings, but as
+ Robin Fairbairns points out in the \TeX{} FAQ:
+ \begin{quote}
+ \dots{} [that] would be both tedious and error-prone. What is more, it
+ would be undesirable, since you would be constructing a visual
+ representation which is inflexible (you could not change all the
+ references to elements of a list at one fell swoop).
+ \end{quote}
+ This is sensible and I recommend to follow the advice, but sometimes
+ you might want something like:
\begin{verbatim}
... subitem \ref{level2} of item \ref{level1} ...
\end{verbatim}
+\end{note}
-The value of |ref| is a moving argument, and fragile
-commands must be protected \textit{except} the counters.
+\begin{warning}
+ The value of |ref| is a moving argument, and fragile commands must be
+ protected \textit{except} the counters.
+\end{warning}
\begin{desc}
-|font=<commands>|\qquad\verb|format=<commands>|
+|font=<commands>|\qquad|format=<commands>|
\end{desc}
Sets the label font. Useful when the label is changed with the
@@ -247,15 +310,15 @@
optional argument of |\item| and in \texttt{description}. The last
command in |<commands>| can take an argument with the item label. In
\texttt{description} class setting are in force, so you may want begin
-with \verb|\normalfont|. A synonymous is \texttt{format}.
+with |\normalfont|. A synonymous is \texttt{format}.
\begin{desc}
-|align=left|\qquad |align=right|\qquad |align=parleft|\3
+|align=left|\qquad |align=right|\qquad |align=parleft|
\end{desc}
How the label is aligned (with relation to the label box edges).
Three values are possible: |left|, the default |right| and
-\verb|parleft| (a parbox of width \verb|\labelwidth| with flush left
+|parleft| (a parbox of width |\labelwidth| with flush left
text). The parameters controlling the label spacing should be
properly set, either by hand or more conveniently with the |*|
settings (see below):
@@ -262,17 +325,16 @@
\begin{verbatim}
\begin{enumerate}[label=\Roman*., align=left, leftmargin=*]
\end{verbatim}
-(When the label box is supposed to have its natural width, use
-|left|.)
+When the label box is supposed to have its natural width, use
+|left|.
\begin{desc}
-|\SetLabelAlign{<value>}{<commands>}|\3
+|\SetLabelAlign{<value>}{<commands>}|
\end{desc}
New align types can be defined (or the existing ones redefined) with
|\SetLabelAlign|; the predefined values are equivalent
-to:\footnote{Prior to version 3.0 the left alignments was incorrectly
-defined and the label and the text could overlap.}
+to:
\begin{verbatim}
\SetLabelAlign{right}{\hss\llap{#1}}
\SetLabelAlign{left}{#1\hfil}
@@ -279,64 +341,147 @@
\SetLabelAlign{parleft}{\strut\smash{\parbox[t]\labelwidth{\raggedright##1}}}
\end{verbatim}
-If the last thing in the definition is a skip (typically \verb|\hfil|), it is
-removed sometimes by description. If for some reason you want to avoid
-this, just add \verb|\null| at the end.
-
-Although primarily intended for the alignment, this commands has other
-uses (as in the provided \verb|parleft|). For example, with the
-following all labels with |align=right| are set as superscripts:
+\begin{example}
+ Although primarily intended for the alignment, this commands has other
+ uses (an example is the provided |parleft|). For example, with the
+ following all labels with |align=right| are set as superscripts:
\begin{verbatim}
\SetLabelAlign{right}{\hss\llap{\textsuperscript{#1}}}
\end{verbatim}
-(A new name is also possible, of course.)
+ A new name is also possible, of course.
+\end{example}
-If you want the internal settings for \texttt{align} and \texttt{font}
-be ignored, you can override the \textsf{enumitem} definition of
-\verb|\makelabel| in \texttt{before}:
+\begin{note}
+ If the last thing in the definition is a skip (typically |\hfil|), it is
+ removed sometimes by |description|. If for some reason you want to avoid
+ this, just add |\null| at the end.
+\end{note}
+
+\begin{note}
+ If you want the internal settings for \texttt{align} and \texttt{font}
+ be ignored, you can override the \textsf{enumitem} definition of
+ |\makelabel| in \texttt{before}:
\begin{verbatim}
\begin{description}[before={\renewcommand\makelabel[1]{\ref{##1}}}]
\end{verbatim}
-(Alternatively, define a macro and use \verb|\let|.)
+ Alternatively, define a macro and use |\let|.
+\end{note}
\subsection{Horizontal spacing of labels}
+The horizontal space in the left margin of the current level is
+distributed in the following way:\footnote{Admittedly, these figures
+are not exactly the clearest possible, and I intend to improve them in
+a future release.}
+\begin{center}
+\begin{tabular}{cc}
+\fbox{\fbox{\strut \texttt{labelindent}}
+ \fbox{\strut \texttt{labelwidth}}
+ \fbox{\strut \texttt{labelsep} $-$ \texttt{itemintent}}}
+&
+\fbox{\strut\texttt{itemindent}}\\
+\texttt{leftmargin}
+\end{tabular}
+\end{center}
+Here |labelindent| is a new parameter introduced by \textit{enumitem},
+described below. The rest are those in standard \LaTeX.
+
+Actually, the layout is more complex because the label box (ie,
+|labelwidth|) could stick into the margin, which means |labelindent|
+takes a negative value.
+
+\begin{note}
+ Since |\parindent| is not used as such inside lists, but instead
+ is set internally to either |\itemindent| or |\listparindent|,
+ when used as the value of a parameter \textsf{enumitem} returns
+ the global value, i. e., the value it has outside the outermost
+ list.
+\end{note}
+
+\begin{note}
+\New{3.6} If you find these parameters baffling, you are not alone. You
+can visualize them by writing |\DrawEnumitemLabel| just before the
+first item (or in |first|), which draws 4 rules from top to bottom,
+|leftmargin| (thin), |labelindent| (thick if positive, thin if
+negative), |labelwidth| (thick) and |labelsep| (thick). If 0, a rule is
+not shown.
+\end{note}
+
\begin{desc}
|labelindent=<length>|\\
-\verb|\labelindent|
+|\labelindent|
\end{desc}
-This parameter is added in \textsf{enumitem} for the blank space from
-the margin of the enclosing list/text to the left edge of the label box. This
-means there is a redundancy because one of the parameters depends on
-the others, i.e., it has to be computed from the other values, as
-described below. There is a new counter length |\labelindent| which
-defaults to 0 pt. The five parameteres are related in the following
-way:
+This parameter is added in \textsf{enumitem} for the blank space from
+the margin of the enclosing list/text to the left edge of the label
+box. This means there is a redundancy because one of the parameters
+depends on the others, i.e., it has to be computed from the other
+values, as described below. By default, the computed value is
+|labelindent|, even if explicitly set with some value (it defaults to
+0~pt). So, if you are setting it to some value, very likely you want to
+set some other parameter to |!| or |*|, because otherwise it is
+ignored.
+
+There is a new counter length |\labelindent|.
+
+The five parameteres are related in the following way:
\[
-\verb|\leftmargin|+\verb|\itemindent| =
-\verb|\labelindent|+\verb|\labelwidth|+\verb|\labelsep|
+|\leftmargin|+|\itemindent| =
+|\labelindent|+|\labelwidth|+|\labelsep|
\]
\begin{desc}
+|left=<labelindent>|\\
+|left=<labelindent> .. <leftmargin>|
+\end{desc}
+
+\New{3.6} This is a convenience key to set quickly the most common
+layouts for the label. You may regard it as a sort or ``rule'' with two
+tab stops: the start of the label and the start of the text (both with
+relation to the normal side margin). With only |<labelindent>|, the
+left margin (the ``start of text'') is computed with the |labelsep|.
+
+\begin{example}
+ Typical settings would be:
+\begin{verbatim}
+\begin{enumerate}[left= 0pt]
+\begin{enumerate}[left= 0pt .. \parindent]
+\begin{enumerate}[left= \parindent]
+\begin{enumerate}[left= \parindent .. 2\parindent]
+\begin{enumerate}[left= -\parindent .. 0pt]
+\end{verbatim}
+\end{example}
+
+\begin{note}
+ The label width is set to the default widest one. If there are lists
+ with Arabic numerals $\ge 10$, you may want to set |widest|, too.
+\end{note}
+
+\begin{note}
+|left=<labelindent>| sets |leftmargin=*|;
+|left=<labelindent> .. <leftmargin>| sets |labelsep=*|.
+\end{note}
+
+\begin{desc}
|leftmargin=!|\qquad|itemindent=!|\qquad|labelsep=!|
-\qquad|labelwidth=!|\qquad|labelindent=!|\3
+\qquad|labelwidth=!|\qquad|labelindent=!|
\end{desc}
-Sets which value is to be computed from the others. This is done
-after \textit{all} keys has been read. Explicit values are not lost, and
-so with the following hierarchical settings:
-\begin{verbatim}
+Sets which value is to be computed from the others. The default is
+|labelindent=!|, but note some keys set another value (|wide| and
+description |style|s). Computations are done after \textit{all}
+keys has been read. Explicit values are not lost, and so with the
+following hierarchical settings: \begin{verbatim}
leftmargin=2em
labelindent=1em,leftmargin=!
labelindent=!
\end{verbatim}
|leftmargin| is again 2em and |labelindent| is the computed parameter.
-The default is |labelindent=!|, but note some keys sets another value
-(\verb|wide| and description \verb|style|s).
-With |align=right| (the default), |labelindent=!| and
-|labelwidth=!| behave similarly in practice.
+\begin{note}
+ With |align=right| (the default), |labelindent=!| and |labelwidth=!|
+ behave similarly in practice.
+\end{note}
\begin{desc}
|leftmargin=*|\qquad|itemindent=*|\qquad|labelsep=*|
@@ -343,11 +488,11 @@
\qquad|labelwidth=*|\qquad|labelindent=*|
\end{desc}
-Like before, but |labelwidth| is set to the width of the current
-label, using the default value of \textit{0} in |\arabic*|,
-\textit{viii} in |\roman*|, \textit{m} in |\alph*| and
-similarly in uppercase forms (these values can be changed with
-|widest|, see below). Examples are:
+Like before, but in addition |labelwidth| is first set to the width of
+the current label, using the default value of \textit{0} in |\arabic*|,
+\textit{viii} in |\roman*|, \textit{m} in |\alph*| and similarly in
+uppercase forms (these values can be changed with |widest|, see below).
+Examples are:
\begin{verbatim}
\begin{itemize}[label=\textbullet, leftmargin=*]
\begin{enumerate}[label=\roman*), leftmargin=*, widest=iii]
@@ -357,75 +502,60 @@
labelindent=\parindent, labelsep=*]
\end{verbatim}
-The most useful are |labelsep=*| and |leftmargin=*|.
-With the former the item body begins at a fixed place (namely,
-|leftmargin|), while with the latter begins at a variable place
-depending on the label (but always the same within a list, of course).
-Most of times, what you would want is |leftmargin=*|.
+The most useful are |labelsep=*| and |leftmargin=*|. With the former
+the item body begins at a fixed place (namely, |leftmargin|), while
+with the latter begins at a variable place depending on the label (but
+always the same within a list, of course).
-Unfortunately, \LaTeX{} does not define a default |labelsep| to
-be applied to all lists---simply the current value is used. With
-\textsf{enumitem} you can set default values for every list, as
-described below, and so, if you want to make sure |labelsep| is
-under your control, all you need is something like:
+\begin{note}
+ Unfortunately, \LaTeX{} does not define a default |labelsep| to
+ be applied to all lists---simply the current value is used. With
+ \textsf{enumitem} you can set default values for every list, as
+ described below, and so, if you want to make sure |labelsep| is
+ under your control, all you need is something like:
\begin{verbatim}
-\setlist{itemsep=.5em}
+\setlist{labelsep=.5em}
\end{verbatim}
+\end{note}
-|labelwidth=*| and |labelwidth=!| are synonymous.
+\begin{note}
+ |labelwidth=*| and |labelwidth=!| are synonymous.
+\end{note}
\begin{desc}
-|widest=<string>|\qquad|widest*=<integer>|\3\qquad|widest|
+|widest=<string>|\qquad|widest*=<integer>|\qquad|widest|
\end{desc}
-To be used in conjunction with the \texttt{*}-values, if
-desired. It overrides the default value for the widest
-printed counter. Sometimes, if lists are not very long, a value of
-|a| for |\alph| is more sensible than the default |m|:
+To be used in conjunction with the \texttt{*}-values, if desired. It
+overrides the default value for the widest printed counter. Sometimes,
+if lists are not very long, a value of |a| for |\alph| is more sensible
+than the default |m|:
\begin{verbatim}
\begin{enumerate}[leftmargin=*,widest=a] % Assume standard 2nd level
\end{verbatim}
With no value, the default is restored. With |widest*|, the string is
built using |<integer>| as the value of the counter (e.g., with
-\verb|\roman|,
-\verb|widest=viii| and \verb|widest*=8| are the same).
+|\roman|,
+|widest=viii| and |widest*=8| are the same).
-Since |\value| does not return a string but a number,
-|widest| and the \verb|*| values cannot be used with it.
-However, with \verb|widest*|, being a number, it is allowed.
+Since |\value| does not return a string but a number, |widest| and the
+|*| values cannot be used with it. However, with |widest*|,
+being a number, it is allowed.
-\subsection{More on horizontal spacing}
+\New{3.6} It can be used with |itemize| and |description|, too.
+However, since the latter does some tricky formatting inside the label
+you might need change the computed parameter (eg, |itemindent=*| with
+|align=left|).
-Since |\parindent| is not used as such inside lists, but instead
-is set internally to either |\itemindent| or |\listparindent|,
-when used as the value of a parameter \textsf{enumitem} returns the
-global value, i. e., the value it has outside the outermost list.
-
-The horizontal space in the left margin of the current level is
-distributed in the following way:\footnote{Admittedly, these figures
-are not exactly the clearest possible, and I intend to improve them in
-a future release}
-\begin{center}
-\begin{tabular}{cc}
-\fbox{\fbox{\strut \texttt{labelindent}}
- \fbox{\strut \texttt{labelwidth}}
- \fbox{\strut \texttt{labelsep} $-$ \texttt{itemintent}}}
-&
-\fbox{\strut\texttt{itemindent}}\\
-\texttt{leftmargin}
-\end{tabular}
-\end{center}
-
\begin{desc}
-\verb|labelsep*=<length>|\3
+|labelsep*=<length>|
\end{desc}
-Remember |labelsep| spans part of |leftmargin| and
-|itemindent| if the latter is not zero. This is often somewhat
-confusing, so a new key is provided---with \texttt{labelsep*} the
-value is reckoned from the left margin (it just sets |\labelsep|
-and then adds |\itemindent| to it, but in addition later changes to
-|itemindent| are taken into account):
+Remember |labelsep| spans part of |leftmargin| and |itemindent| if the
+latter is not zero. This is often somewhat confusing, so a new key is
+provided---with \texttt{labelsep*} the value is reckoned from the left
+margin (it just sets |\labelsep| and then adds |\itemindent| to it, but
+in addition later changes to |itemindent| are taken into account):
\begin{center}
\begin{tabular}{cc}
\fbox{\fbox{\strut \texttt{labelindent}}
@@ -438,12 +568,59 @@
\end{center}
\begin{desc}
-|labelindent*=<length>|\3
+|labelindent*=<length>|
\end{desc}
Like |labelindent|, but it is reckoned from the left margin in
the current list and not from that in the enclosing list/text.
+\begin{example}
+ A first pattern aligns the label with the surrounding |\parindent|
+ while the item body is indented depending on the label and a fixed
+ |labelsep|:
+\begin{verbatim}
+labelindent=\parindent,
+leftmargin=*
+\end{verbatim}
+ A fairly frequent variant is aligning the label with the surrounding
+ text (remember |labelindent| is |0pt| by default if it is not the
+ computed parameter):
+\begin{verbatim}
+leftmargin=*
+\end{verbatim}
+ The former looks better in the first level while the latter seems
+ preferable in subsequent ones. That can be easily set with
+\begin{verbatim}
+\setlist{leftmargin=*}
+\setlist[1]{labelindent=\parindent} % Only the level 1
+\end{verbatim}
+\end{example}
+
+\begin{example}
+ A second pattern aligns the item body with the surrounding
+ |\parindent|. In this case (remember |labelindent| is the computed
+ parameter if not set):
+\begin{verbatim}
+leftmargin=\parindent
+\end{verbatim}
+\end{example}
+
+\begin{example}
+ A third pattern would be the label aligned with |\parindent|,
+ and the item body with |2\parindent|:
+\begin{verbatim}
+labelindent=\parindent,
+leftmargin=2\parindent,
+itemsep=*
+\end{verbatim}
+ Again, a variant would be the label aligned with the surrounding
+ text, and the itembody with |\parindent|:
+\begin{verbatim}
+leftmargin=\parindent,
+itemsep=*
+\end{verbatim}
+\end{example}
+
\subsection{Numbering, stopping, and resuming}
\begin{desc}
@@ -480,30 +657,34 @@
be used sparingly---if you are using it often, then very likely you
want to define a new list (see \ref{s.clone}). Further keys are allowed, and
in this case the saved options are overriden by those in the current
-list (i.e., the position of \texttt{resume*} does not matters). For
-example:
+list (i.e., the position of \texttt{resume*} does not matters).
+If there is a series of a certain list with
+\texttt{resume*}, options are taken from the list previous to the
+first one, except for \texttt{start}.
+
+\begin{example}
+ For example:
\begin{verbatim}
\begin{enumerate}[resume*,start=1] % or [start=1,resume*]
\end{verbatim}
-uses the keys in the previuos \texttt{enumerate}, but restarts the
-counter. If there is a series of a certain list with
-\texttt{resume*}, options are taken from the list previous to the
-first one, except for \texttt{start}.
+ uses the keys in the previuos \texttt{enumerate}, but restarts the
+ counter.
+\end{example}
\subsection{Series}
\begin{desc}
-|series=<series-name>|\3\\
+|series=<series-name>|\\
|<series-name>|\qquad|resume*=<series-name>|
-\qquad|resume=<series-name>|\3
+\qquad|resume=<series-name>|
\end{desc}
-A new method (3.0) of continuing lists is by means of the key
-\texttt{series}, so that they behave like a unit. A list with key
+Another method to continue lists is by means of the key
+\texttt{series}, so that they behave like a unit. A list with key
\texttt{series} is considered the starting list and its settings are
stored \textit{globally}, so that they can be used later with
-\texttt{resume}/\texttt{resume*}. All these keys take a value with
-the series name (which must be different from existing keys):
+\texttt{resume}/\texttt{resume*}. All these keys take a value with the
+series name (which must be different from existing keys):
\begin{itemize}
\item |resume=<series-name>| just continue numbering items in the
series,
@@ -512,7 +693,9 @@
\item |<series>|, i.e., the series name used as a key, is an
alternative to |resume*=<series>|.
\end{itemize}
-For example:
+
+\begin{example}
+ Consider:
\begin{verbatim}
\begin{enumerate}[label=\arabic*(a),leftmargin=1cm,series=lafter]
\item A
@@ -519,7 +702,7 @@
\item B
\end{enumerate}
\end{verbatim}
-You get: 1(a) 2(a). You can continue with:
+ You get: 1(a) 2(a). You can continue with:
\begin{verbatim}
\begin{enumerate}[label=\arabic*(b),resume*=lafter]
% or [label=\arabic*(b),lafter]
@@ -527,7 +710,8 @@
\item B
\end{enumerate}
\end{verbatim}
-You get: 3(b) 4(b). (But you can use |start=1|, if you like.)
+ You get: 3(b) 4(b). (But you can use |start=1|, if you like.)
+\end{example}
Note you can add further arguments, which are executed after those
saved at the starting list and therefore take precedence over them --
@@ -534,11 +718,12 @@
in particular, |resume*| itself takes precedence over a
|start| (e.g., |start=1|) in the the starting list.
-Every time a series is started, several commands are defined
-internally, so to avoid wasting resources and use the same name for
-non-overlapping series.
+\begin{note}
+ Every time a series is started, several commands are defined
+ internally. Thus, to avoid wasting resources use the same name for
+ non-overlapping series.
+\end{note}
-
\subsection{Penalties}
\begin{desc}
@@ -562,11 +747,14 @@
the setting hierarchy, see below, \textit{not} with relation to the
enclosing list/text). It can contain, say, rules and text, but this
has not been extensively tested. All calculations have been finished,
-and you can access and manipulate the list parameters. For example,
-to have both margins (left and right) set to the widest label:
+and you can access and manipulate the list parameters.
+
+\begin{example}
+ To have both margins (left and right) set to the widest label:
\begin{verbatim}
\setlist{leftmargin=*,before=\setlength{\rightmargin}{\leftmargin}}
\end{verbatim}
+\end{example}
\begin{desc}
|after=<code>|\qquad|after*=<code>|
@@ -574,6 +762,21 @@
Same, but just before the list ends.
+\begin{desc}
+|first=<code>|\qquad|first*=<code>|
+\end{desc}
+
+Same, but as the very first thing in the list body, so that
+\begin{verbatim}
+\begin{itemize}[first=<code>]
+\end{verbatim}
+is the same as
+\begin{verbatim}
+\begin{itemize}
+<code>
+\end{verbatim}
+With it you may insert, for example, an |\item|.
+
\subsection{Description styles}
A key available in |description|.
@@ -583,40 +786,41 @@
Sets the description \textit{style}. |<name>| can be any of the
following:
-\begin{itemize}
-
-\item |standard|: like |description| in standard classes, although
+\begin{description}
+\item[|standard|] Like |description| in standard classes, although
with other classes it could be somewhat different. The label is
-boxed. Sets \verb|itemindent=!|.
+boxed. Sets |itemindent=!|.
-\item |unboxed|: much like the standard |description|, but
+\item[|unboxed|] Much like the standard |description|, but
the label is not boxed to avoid uneven spacing and unbroken labels if
-they are long. Sets \verb|itemindent=!|.
+they are long. Sets |itemindent=!|.
-\item |nextline|: if the label does not fit in the margin, the text
+\item [|nextline|] If the label does not fit in the margin, the text
continues in the next line, otherwise it is placed in a box of width
|\leftmargin| $-$ |\labelsep|, i.e., the item body never sticks into
-the left margin. Sets \verb|labelwidth=!|.
+the left margin. Sets |labelwidth=!|.
-\item |sameline|: like |nextline| but if the label does not
+\item[|sameline|] Like |nextline| but if the label does not
fit in the margin the text continues in the same line. Same as
-\verb|style=unboxed,labelwidth=!|.
+|style=unboxed,labelwidth=!|.
-\item |multiline|: the label is placed in a parbox whose width is
+\item[|multiline|] The label is placed in a parbox whose width is
|leftmargin|, with several lines if
-necessary. Same as \verb|style=standard,align=parleft,labelwidth=!|.
+necessary. Same as |style=standard,align=parleft,labelwidth=!|.
-Three caveats: (1) mixing boxed and unboxed labels has not a
-well-defined behaviour, (2) when nesting list all combinations are
-allowed but not all make sense, and (3) nesting \verb|nextline| lists
-is not supported (it works, but its behaviour might change in the
-future, because the current one is not what one could expect).
+\end{description}
+\begin{warning}
+\begin{enumerate}
+\item Mixing boxed and unboxed labels has not a well-defined behaviour.
+\item When nesting list all combinations are allowed but not all make
+ sense.
+\item Nesting |nextline| lists is not supported (it works, but its
+ behaviour might change in the future, because the current one is not
+ what one could expect).
+\end{enumerate}
+\end{warning}
-
-\end{itemize}
-
-
\subsection{Compact lists}
\begin{desc}
@@ -632,8 +836,8 @@
\subsection{``Wide'' lists}
\begin{desc}
-\verb|wide|\3\\
-\verb|wide=<parindent>|
+|wide|\\
+|wide=<parindent>|
\end{desc}
With this convenience key, the leftmargin is null and the label is
@@ -647,26 +851,147 @@
\end{verbatim}
With |wide=<parindent>| you may set at once another value instead of
|\parindent|. Of course, these keys can be overriden after
-\verb|wide|, too; for example, remembering that with left-aligned labels
+|wide|, too; for example, remembering that with left-aligned labels
the text is pushed if the they are wider than |labelwidth|, you
can set |labelwidth=1.5em| for a minimal width, or instead of
|itemindent=!| you may prefer |itemindent=*|, which sets the
minimal width to that of widest label. In level 2 you may prefer
|labelindent=2\parindent|, and so on. You may also want to
-combine it with |noitemsep| or |nolistsep|.
+combine it with |noitemsep| or |nosep|.
+\subsection{\textsf{enumerate}-like labels}
+\label{s.short}
+
+\begin{desc}
+|shortlabels| (package option)
+\end{desc}
+
+With the package option \texttt{shortlabels} you can use an
+\textsf{enumerate}-like syntax, where |A|, |a|, |I|,
+|i| and |1| stand for |\Alph*|, |\alph*|,
+|\Roman*|, |\roman*| and |\arabic*|. This is intended
+mainly as a sort of compatibility mode with the \textsf{enumerate}
+package, and therefore the following special rule applies: if the very
+first option (at any level) is not recognized as a valid key, then it
+will be considered a label with the \textsf{enumerate}-like syntax. For
+example:
+\begin{verbatim}
+\begin{enumerate}[i), labelindent=\parindent, labelsep=*]
+...
+\end{enumerate}
+\end{verbatim}
+Although perhaps not so useful, you can omit |label=| in the
+itemize environment under similar conditions, too:
+\begin{verbatim}
+\begin{itemize}[\textbullet]
+...
+\end{itemize}
+\end{verbatim}
+
+\begin{desc}
+|\SetEnumerateShortLabel{<key>}{<replacement>}|
+\end{desc}
+
+With this command, you can define new keys (or redefine them), which is
+particularly useful for enumerate to be adapted to especific
+typographical rules or to extend it for non-Latin scrips. Here
+|<replacement>| contains one of the starred versions of
+counters.
+
+\begin{example}
+ For example:
+\begin{verbatim}
+\SetEnumerateShortLabel{i}{\textsc{\roman*}}
+\end{verbatim}
+ redefines |i| so that items using this key are numbered with
+ small caps roman numerals.
+\end{example}
+
+\begin{note}
+ The key has to be a single character.
+\end{note}
+
+\subsection{Generic keys and values}
+
+\begin{desc}
+|\SetEnumitemKey{<key>}{<replacement>}|
+\end{desc}
+
+With this command you can create your own (valueless) keys. Keys so
+defined can then be used like the others.
+
+\begin{example}
+ With
+\begin{verbatim}
+\SetEnumitemKey{midsep}{topsep=3pt,partopsep=0pt}
+\end{verbatim}
+ you may write
+\begin{verbatim}
+\begin{enumerate}[midsep]
+\end{verbatim}
+\end{example}
+
+\begin{example}
+ Another example is multicolumn lists, with \textsf{multicol}:
+\begin{verbatim}
+\SetEnumitemKey{twocol}{
+ itemsep=1\itemsep,
+ parsep=1\parsep,
+ before=\raggedcolumns\begin{multicols}{2},
+ after=\end{multicols}}
+\end{verbatim}
+ Here, the settings for \texttt{itemsep} and \texttt{parsep} kill the
+ stretch and shrink parts. Of course, you may want to define a
+ new list.
+\end{example}
+
+\begin{warning}
+ The package may introduce new keys in the future, so
+ |\SetEnumitemKey| is a potential source of forward
+ incompatibilities. However, it's safe using a non-letter character
+ other than hyphen or star in the key name (e.g., |:name| or
+ |2_col|), because \textsf{enumitem} will not use them.
+\end{warning}
+
+\begin{desc}
+|\SetEnumitemValue{<key>}{<string-value>}{<replacement>}|
+\end{desc}
+
+This commands provides a further abstraction layer for the
+|<key>=<value>| pairs. With it you can define logical names which
+are translated to the actual value. For example, with:
+\begin{verbatim}
+\SetEnumitemValue{label}{numeric}{\arabic*.}
+\SetEnumitemValue{leftmargin}{standard}{\parindent}
+\end{verbatim}
+you might say:
+\begin{verbatim}
+\begin{enumerate}[label=numeric,leftmargin=standard]
+\end{verbatim}
+So, you can left to the final design what |label=numeric| means.
+
\section{Inline lists}
\label{s.inline}
-\3
-
Inline lists are ``horizontal'' lists set as ordinary text inside a
paragraph. With this package you can create inline lists, as
-explained below, with \verb|\newlist|, which have their own labels and
-counters. However, in most cases inline versions of standard lists,
+explained below, with |\newlist|, which have their own labels and
+counters. However, very often inline versions of standard lists,
with the same labelling schema, will be enough -- the package option
-\verb|inline| does that.
+|inline| does that.
+\begin{warning}
+ Items are boxed, so floats are lost and nested lists are not allowed
+ (remember many displayed elements are defined as lists). Display math
+ is forbidden too, and due to an optimization done by \TeX{} when
+ bulding lists, explicit hyphenation may be wrong.\footnote{A Knuthian
+ ``premature optimization''? Who knows, but anyway Lua\TeX{} has
+ removed it, so hyphenation with this engine should be correct.} There
+ was a reason for this default setting, namely, this feature was
+ mainly devised for short items (a few words), and the parameter
+ |itemjoin*| could be useful for logical markup. To overcome these
+ limitations, you may set |mode=unboxed|, described below.
+\end{warning}
\begin{desc}
|inline| \qquad(package option)\\
@@ -678,14 +1003,27 @@
lists are defined: \texttt{enumerate*}, \texttt{itemize*}, and
\texttt{description*}. They emulate the behaviour of
\textsf{paralist} and \textsf{shortlst} in that labels and settings
-are shared with the displayed (ie, ``normal'') lists \texttt{enumerate},
-\texttt{itemize} and \texttt{description}, respectively (however,
-remember resuming is based on environment names, not on list types). This applies
-only to those created with \texttt{inline} -- inline lists created
-with |\newlist| as described below are independent and use their
-own labels and settings. Note as well \verb|inline| is not required
-if you needn't inline versions of standard lists.
+are shared with the displayed (ie, ``normal'') lists
+\texttt{enumerate}, \texttt{itemize} and \texttt{description},
+respectively (however, remember resuming is based on environment
+names, not on list types). This applies only to those created with
+\texttt{inline} -- inline lists created with |\newlist| as described
+below are independent and use their own labels and settings.
+\begin{note}
+ Note |inline| is not required if you do not need the inline
+ versions of standard lists, but instead you define your own
+ standalone inline lists with |\newlist|.
+\end{note}
+
+\begin{warning}
+ Settings for these three environments as defined by |inline| are
+ shared with the displayed variants, so they cannot be redefined
+ directly with |\newlist|. Trying to do it raises a cryptic error. If
+ you need separate setting, define them with |\newlist| and not with
+ |inline|.
+\end{warning}
+
\begin{desc}
|itemjoin=<string>|\qquad|itemjoin*=<string>|
\qquad|afterlabel=<string>|
@@ -694,27 +1032,29 @@
Format is set with keys \texttt{itemjoin} (default is a space), and
\texttt{afterlabel} (default is |\nobreakspace|, ie, |~|).
An additional key is \texttt{itemjoin*}, which, if set, is used
-instead of \texttt{itemjoin} before the last item. So, with
+instead of \texttt{itemjoin} before the last item.
+
+|itemjoin| is ignored in vertical mode (i.e., in mode unboxed
+and just after a quote, a displayed list and the like).
+
+\begin{example}
+ With
\begin{verbatim}
before=\unskip{: }, itemjoin={{; }}, itemjoin*={{, and }}
\end{verbatim}
-the following punctuation between items is used:
-\begin{quote}
-Blah blah: (a) one; (b) two; (c) three, and (d) four. Blah blah
-\end{quote}
+ the following punctuation between items is used:
+ \begin{quote}
+ Blah blah: (a) one; (b) two; (c) three, and (d) four. Blah blah
+ \end{quote}
+\end{example}
-\verb|itemjoin| is ignored in vertical mode (i.e., in mode unboxed
-and just after a quote, a displayed list and the like).
-
\begin{desc}
|mode=unboxed|\qquad|mode=boxed|
\end{desc}
-Items are boxed, so floats are lost and nested lists are not allowed
-(remember many displayed elements are defined as lists). If using
-floats or lists inside inline lists is important, use an alternative
-``mode'', which you can activate with
-\texttt{mode=unboxed} (the default is \texttt{mode=boxes}). With it
+If using floats, lists or displayed math inside inline lists is
+important, use an alternative ``mode'', which you can activate with
+\texttt{mode=unboxed} (the default is \texttt{mode=boxed}). With it,
floats may be used freely, but misplaced |\item|s are not catched and
\texttt{itemjoin*} is ignored (a warning is written to the log about
this fact).
@@ -730,17 +1070,16 @@
|\setlist[<levels>]{<format>}|
\end{desc}
Where |<level>| is the list level (one or more) in |list|, and the
-corresponding levels in |enumerate| and
-|itemize|.\footnote{\verb|\string\setenumerate|,
-\verb|\string\setitemize| and \verb|\string\setdescription| are
-deprecated.} With no
-|<levels>|, the format applies to all of them. Here list does not
-mean any list but only the three ones handled by this package and
-those redefined by this package or defined with |\newlist| (see
-below). For example:
+corresponding levels in |enumerate| and
+|itemize|.\footnote{|\string\setenumerate|,
+|\string\setitemize| and |\string\setdescription| are
+deprecated.} With no |<levels>|, the format applies to all of them.
+Here `list' does not mean any list but only the three ones handled by
+this package, and those redefined by this package or defined with
+|\newlist| (see below). For example:
\begin{verbatim}
\setlist{noitemsep}
-\setlist[1]{\labelindent=\parindent} % << Usually a good idea
+\setlist[1]{labelindent=\parindent} % << Usually a good idea
\setlist[itemize]{leftmargin=*}
\setlist[itemize,1]{label=$\triangleleft$}
\setlist[enumerate]{labelsep=*, leftmargin=1.5pc}
@@ -771,55 +1110,60 @@
\newcommand{\mylistname}{enumerate}
\setlist[\mylistname,\value{toplist}+1]{labelsep=\itemindent+2em]
\end{verbatim}
-This allows defining lists within loops.
+This allows defining lists with the help of loops.
-Currently, a way to discriminate the font size is not provided
-(|\normalsize|, |\small|\dots).
+\begin{warning}
+ It seems there is no way to catch a misspelled name in |\setlist| or
+ |\newlist|, and a meaningless error ``Missing number, treated as
+ zero'' is raised.
+\end{warning}
-\section{\textsf{enumerate}-like labels}
-\label{s.short}
+\section{Size dependent settings}
+\New{3.6} The following package option is requrired for making use of
+this feature.
+
\begin{desc}
-|shortlabels| (package option)
+|sizes| (package option)
\end{desc}
-With the package option \texttt{shortlabels} you can use an
-\textsf{enumerate}-like syntax, where |A|, |a|, |I|,
-|i| and |1| stand for |\Alph*|, |\alph*|,
-|\Roman*|, |\roman*| and |\arabic*|. This is intended
-mainly as a sort of compatibility mode with the \textsf{enumerate}
-package, and therefore the following special rule applies: if the very
-first option (at any level) is not recognized as a valid key, then it
-will be considered a label with the \textsf{enumerate}-like syntax. For
-example:
+Lengths can contain size-based settings as follows (the value before
+the first $<$ is a default).% TODO -- An alternative |\setlist<size>|.
+\begingroup
+\makeatletter
+\renewcommand\verbatim at font{\normalfont\ttfamily}
\begin{verbatim}
-\begin{enumerate}[i), labelindent=\parindent]
-...
-\end{enumerate}
+\setlist{
+ topsep= 20pt <-10> 6pt <10-> 40pt,
+ leftmargin= <-10> 0cm <10> 1cm <10-> 2cm ,
+ rightmargin= <-10> 0cm <10> 1cm <10-> 2cm ,
+ }
\end{verbatim}
-Although perhaps not so useful, you can omit |label=| in the
-itemize environment under similar conditions, too:
+\endgroup
+
+Names are accepted, too: |script|, |tiny|, |footnote|, |small|,
+|normal|, |large|, |Large|, |LARGE|, |huge|, |Huge| (ie, remove `size'
+from the \LaTeX{} name if necessary). For example:
+% TODO - |\SetEnumitemSizes| to configure it.
+\begingroup
+\makeatletter
+\renewcommand\verbatim at font{\normalfont\ttfamily}
\begin{verbatim}
-\begin{itemize}[\textbullet]
-...
-\end{itemize}
+\setlist{
+ topsep= 20pt <-normal> 6pt <normal-> 40pt,
+ leftmargin= <-normal> 0cm <normal> 1cm <normal-> 2cm ,
+ rightmargin= <-normal> 0cm <normal> 1cm <normal-> 2cm ,
+ }
\end{verbatim}
+\endgroup
-\begin{desc}
-|\SetEnumerateShortLabel{<key>}{<replacement>}|
-\end{desc}
+Single values take precedence over ranges. In ranges, the last match
+wins. The range |a-b| is $a \le \mbox{size} < b$ (the lower bound is
+included, but not the upper one). These rules allow in the examples
+above the setting for |10| or |normal| in the logical place. Remember
+nominal sizes are not always the real sizes -- for example, with option
+|11pt|, |\normalsize| (and |normal|) is 10.95.
-With this command, you can define new keys (or redefine them), which is
-particularly useful for enumerate to be adapted to especific
-typographical rules or to extend it for non-Latin scrips. Here
-|<replacement>| contains one of the starred versions of
-counters. For example:
-\begin{verbatim}
-\SetEnumerateShortLabel{i}{\textsc{\roman*}}
-\end{verbatim}
-redefines |i| so that items using this key are numbered with
-small caps roman numerals. The key has to be a single letter.
-
\section{Cloning the basic lists}
\label{s.clone}
@@ -829,23 +1173,46 @@
\end{desc}
The three lists can be cloned so that you can define ``logical''
-environments behaving like them. To define a new lists (or redefine a
+environments behaving like them. To define a new lists (or redefine a
existing one), use |\newlist| (or |\renewlist|), where |<type>| is
-|enumerate|, |itemize| or |description|.
+|enumerate|, |itemize| or |description|. Inline lists have types
+\texttt{enumerate*}, \texttt{itemize*}, and \texttt{description*}.
-If <type> is |enumerate|, a set of counters with names |<name>i|,
-|<name>ii|, |<name>iii|, |<name>iv|, etc. (depending on <max-depth>)
-is defined. Don't use an arbitrarily large number for <max-depth>, to
-avoid creating too many counters. Then you can use those counters in
-labels; e. g., if you have defined a list named \texttt{steps}, you
-can define a label with:
+\begin{note}
+ The inline |<type>|s are available always, even without the package
+ option |inline|, which just defines three environments of the
+ corresponding types with those names.
+\end{note}
+
+If |<type>| is |enumerate|, a set of counters with names |<name>i|,
+|<name>ii|, |<name>iii|, |<name>iv|, etc. (depending on |<max-depth>|)
+is defined.
+
+Then you can use those counters in labels; e. g., if you have defined a
+list named \texttt{steps}, you can define a label with:
\begin{verbatim}
label=\arabic{stepsii}.\arabic{stepsi}
\end{verbatim}
+\begin{warning}
+ Don't use an arbitrarily large number for |<max-depth>|, to avoid
+ creating too many counters and related macros.
+\end{warning}
+
+\begin{warning}
+ For consistency with the counter naming schema in \LaTeX, list levels
+ are also named internally with a roman numeral, ie, |<list>|i,
+ |<list>|ii, |<list>|iii, etc. For this reason (both counter and list
+ names), defining two lists as, say, |books| and |booksi| leads to
+ unexpected results (currently without any warning, which should be
+ fixed).
+ % TODO - Perhaps I must change the internal names, so that
+ % this restriction doesn't apply to itemize and description.]
+\end{warning}
+
\begin{desc}
-\verb|\setlist[<names>,<levels>]{<keys/values>}|\\
-\verb|\setlist*[<names>,<levels>]{<keys/values>}|
+|\setlist[<names>,<levels>]{<keys/values>}|\\
+|\setlist*[<names>,<levels>]{<keys/values>}|
\end{desc}
After creating a list, you can (in fact you
@@ -857,7 +1224,7 @@
\setlist[steps,1,2]{label=(\arabic*)}
\end{verbatim}
Names in the optional argument of |\setlist| say which lists applies the
-settings to, and numbers say the level (it is calc-savvy). Several
+settings to, and numbers say the level (it is |calc|-savvy). Several
lists and/or several levels can be given, and all combinations are
set; e.g.:
\begin{verbatim}
@@ -867,21 +1234,16 @@
No number (or 0) means ``all levels'' and no name means ``all lists''; no
optional argument means ``all lists at all levels''.
-The three inline lists have types \texttt{enumerate*},
-\texttt{itemize*}, and \texttt{description*}, which are available
-always, even without the package option |inline| (which just defines
-three environments with these names).
+The starred form |\setlist*| adds the settings to the previous ones.
-The starred form \verb|\setlist*| adds the settings to previous ones.
-
\begin{desc}
-\verb|\setlistdepth{<integer>|\3
+|\setlistdepth{<integer>}|
\end{desc}
By default, \LaTeX{} has a limit of 5 nesting levels, but when
-cloning list this value may be too short, and therefore you may want
+cloning lists this value may be too short, and therefore you may want
to set a new value. In levels below the 5th (or the deepest defined by a
-class), the settings of the last are used (i.e., \verb|\@listvi|).
+class), the settings of the last are used (i.e., |\@listvi|).
\section{More about counters}
@@ -888,12 +1250,15 @@
\subsection{New counter representation}
\begin{desc}
-\verb|\AddEnumerateCounter{<LaTeX command>}{<internal command>}{<widest label>}|
+|\AddEnumerateCounter{<LaTeX command>}{<internal command>}{<widest label>}|
\end{desc}
``Registers'' a counter representation so that \textsf{enumitem}
recognizes it. Intended mainly for non Latin scripts, but also useful
-in Latin scripts. For example:
+in Latin scripts.
+
+\begin{example}
+The following example defines a new counter with named ordinals:
\begin{verbatim}
\makeatletter
\def\ctext#1{\expandafter\@ctext\csname c@#1\endcsname}
@@ -902,92 +1267,62 @@
\makeatother
\AddEnumerateCounter{\ctext}{\@ctext}{Second}
\end{verbatim}
+\end{example}
+
+\begin{note}
+ The counter names can contain |@| even if not a letter without
+ raising an error, as shown in the example above.
+\end{note}
+
A starred variant allows to give a number instead of a string as the
-widest label; for example, if the widest label is that corresponding
-to the value 2:\3
+widest label.
+
+\begin{example}
+ If the widest label is that corresponding to the value 2:
\begin{verbatim}
\AddEnumerateCounter*{\ctext}{\@ctmoreext}{2}
\end{verbatim}
+\end{example}
+
This variant is to be preferred if the representation is not a plain
-string but it is styled, e.g.,
-with small caps. (The counter names can contain |@| even if not a letter.)
+string but it is styled, e.g., with small caps.
-\subsection{Restarting \texttt{enumerate}s}
-
-\begin{desc}
-|\restartlist{<list-name>}|\3
-\end{desc}
-
-Currently, with
+\begin{example}
+ An example for Russian is:
\begin{verbatim}
-\setlist[enumerate]{resume}
+\AddEnumerateCounter*{\asbuk}{\c at asbuk}{7}
\end{verbatim}
-you can get a continuous numbering through a document. A new command has
-been added for restarting the counter in the middle of the document:
-\begin{verbatim}
-\restartlist{<list-name>}
-\end{verbatim}
+\end{example}
-It is based solely in the list name, not the list type, which means
-\texttt{enumerate*} as defined with the package option \texttt{inline}
-is not the same as \texttt{enumerate}, because its name is different.
+\subsection{Restarting \texttt{enumerate}s}
-\section{Generic keys and values}
-
\begin{desc}
-|\SetEnumitemKey{<key>}{<replacement>}|\3
+|\restartlist{<list-name>}|
\end{desc}
-With this command you can create your own (valueless) keys. For
-example:
+Currently you can get a continuous numbering through a document with:
\begin{verbatim}
-\SetEnumitemKey{midsep}{topsep=3pt,partopsep=0pt}
+\setlist[enumerate]{resume}
\end{verbatim}
+|\restartlist| has been added for restarting the counter in the middle
+of the document. For example, you could emit a |\restartlist| when
+chapters start, so that there is a continuous numbering through every
+chapter.
-Keys so defined can then be used like the others. Another example is
-multicolumn lists, with \textsf{multicol}:
-\begin{verbatim}
-\SetEnumitemKey{twocol}{
- itemsep=1\itemsep,
- parsep=1\parsep,
- before=\raggedcolumns\begin{multicols}{2},
- after=\end{multicols}}
-\end{verbatim}
+\begin{warning}
+It is based solely in the list \textit{name}, \textit{not} the list
+\textit{type}, which means \texttt{enumerate*} as defined with the
+package option \texttt{inline} is not the same as \texttt{enumerate},
+because its name is different.
+\end{warning}
-(The settings for \texttt{itemsep} and \texttt{parsep} kill the
-stretch and shrink parts. Of course, you may want to define a
-new list.)
-
-Note the package may introduce new keys in the future, so
-\verb|\SetEnumitemKey| is a potential source of forward
-incompatibilities. However, it's safe using a non-letter character
-other than hyphen or star in the key name (e.g., \verb|:name| or
-\verb|2_col|).
-
-\begin{desc}
-|\SetEnumitemValue{<key>}{<string-value>}{<replacement>}|\3
-\end{desc}
-
-This commands provides a further abstraction layer for the
-|<key>=<value>| pairs. With it you can define logical names which
-are translated to the actual value. For example, with:
-\begin{verbatim}
-\SetEnumitemValue{label}{numeric}{\arabic*.}
-\SetEnumitemValue{leftmargin}{standard}{\parindent}
-\end{verbatim}
-you might say:
-\begin{verbatim}
-\begin{enumerate}[label=numeric,leftmargin=standard]
-\end{verbatim}
-So, you can left to the final design what |label=numeric| means.
-
\section{Package options}
-Besides \verb|inline|, \verb|ignoredisplayed|, and \verb|shortlabels|,
-the following option is available.
+Besides |inline|, |ignoredisplayed|, |sizes| and
+|shortlabels|, the following option is available.
\begin{desc}
-\verb|loadonly|
+|loadonly|
\end{desc}
With this package option the package is loaded but the three
@@ -994,61 +1329,11 @@
lists are not redefined. You can create your own lists, yet, or
even redefine the existing ones.
-\section{Three patterns}
-
-Three list layouts could be considered very
-frequent. Let us apply the parameters above to define them. (Below
-are samples.)
-
-The first pattern aligns the label with the surrounding
-|\parindent| while the item body is indented depending
-on the label and a fixed |labelsep|:
-\begin{verbatim}
-labelindent=\parindent,
-leftmargin=*
-\end{verbatim}
-A fairly frequent variant is aligning the label with the
-surrounding text (rememeber |labelindent| is |0pt| by
-default):
-\begin{verbatim}
-leftmargin=*
-\end{verbatim}
-The former looks better in the first level while the latter
-seems preferable in subsequent ones. That can be easily
-set with
-\begin{verbatim}
-\setlist{leftmargin=*}
-\setlist[1]{labelindent=\parindent} % Only the level 1
-\end{verbatim}
-
-The second pattern aligns the item body with the surrounding
-|\parindent|. In this case:
-\begin{verbatim}
-leftmargin=\parindent
-\end{verbatim}
-
-A third pattern would be to align the label with |\parindent|
-and the item body with |2\parindent|:
-\begin{verbatim}
-labelindent=\parindent,
-leftmargin=2\parindent,
-itemsep=*
-\end{verbatim}
-Again, a variant would be to align the label with the surrounding
-text and the itembody with |\parindent|:
-\begin{verbatim}
-leftmargin=\parindent,
-itemsep=*
-\end{verbatim}
-
-Note here |\parindent| means the global value applied
-to normal paragraphs.
-
\section{The trivlist issue}
\LaTeX{} uses a simplified version of |list| named |trivlist| to set
-displayed material, like |center|, |verbatim|, \verb|tabbing|,
-\verb|theorem|, etc., even if conceptually they are not lists.
+displayed material, like |center|, |verbatim|, |tabbing|,
+|theorem|, etc., even if conceptually they are not lists.
Unfortunately, |trivlist| uses the current list settings, which has
the odd side effect that changing the vertical spacing of lists also
changes sometimes the spacing in these environments.
@@ -1057,28 +1342,32 @@
the current level (ie, those set by the corresponding |clo|
files) are set again. In standard \LaTeX{} that is usually redundand,
but if we want to fine tune lists, not resetting the default values
-could be a real issue (particularly if you use the |nolistsep|
+could be a real issue (particularly if you use the |nosep|
option).
A minimal control of vertical spacing has been made possible
-with\footnote{\verb|\string\setdisplayed| is deprecated.}
+with\footnote{|\string\setdisplayed| is deprecated.}
\begin{itemize}
\item |\setlist[trivlist,<level>]{<keys/values>}|
\end{itemize}
-but |trivlist| itself, which is not used directly very
-often, does not accept an optional argument. This feature
-is not intended as a full-fledge |trivlist| formatter.
+but |trivlist| itself, which is not used directly very often, does not
+accept an optional argument. This feature is not intended as a
+full-fledge |trivlist| formatter.
-If for some reason you do not want to change |trivlist|
-and preserve the original definition, you can use the
-package option |ignoredisplayed|.
+If for some reason you do not want to change |trivlist| and preserve
+the original definition, you can use the package option
+|ignoredisplayed|.
+% TODO - Document it may be applied to quote, tabbing, etc.
+
+\New{3.6} If, on the other hand, you want to also apply the changes for
+all lists to trivlists, just set the package option |includedisplayed|.
+
\section{Samples}
\expandafter\ifx\csname setenumerate\endcsname\relax
-Please, install first the package and then typeset this
-document again.
+Please, install first the package and then typeset this document again.
\else
@@ -1109,7 +1398,7 @@
noches, duelos y quebrantos los s\'{a}bados...
\end{verbatim}
-The rule shows \verb|labelindent|.
+The rule shows |labelindent|.
\samplesep
@@ -1128,7 +1417,7 @@
With |\begin{enumerate}[leftmargin=*] % labelindent=0pt by default|.
-The rule shows \verb|labelindent|.
+The rule shows |labelindent|.
\samplesep
@@ -1147,7 +1436,7 @@
With |\begin{enumerate}[leftmargin=\parindent]|.
-The rule shows \verb|leftmargin|.
+The rule shows |leftmargin|.
\samplesep
@@ -1166,9 +1455,9 @@
With |\begin{enumerate}[labelindent=\parindent,|\allowbreak
| leftmargin=*,|\allowbreak| label=\Roman*.,|\allowbreak
-| widest=IV,|\allowbreak| align=left]|.
+| widest=III,|\allowbreak| align=left]|.
-The rule shows \verb|labelindent|.
+The rule shows |labelindent|. Note
\samplesep
@@ -1175,7 +1464,7 @@
\showsep En un lugar de la Mancha, de cuyo nombre no quiero acordarme,
no ha mucho tiempo que viv\'{\i}a un hidalgo de los de
\begin{enumerate}[labelindent=\parindent, leftmargin=*,
- label=\Roman*., widest=IV, align=left]
+ label=\Roman*., widest=III, align=left]
\item lanza en astillero,
\item adarna antigua,
\item roc\'{\i}n flaco, y
@@ -1292,8 +1581,8 @@
\newsample
-Same, but with |multiline|. Note the text overlaps if
-the item body is too short.
+Same, but with |multiline|. Note the text overlaps if the item body is
+too short.
\samplesep
@@ -1304,7 +1593,7 @@
\item[Lo primero que ten\'{\i}a el Quijote] lanza en astillero,
\item[Lo segundo] adarna antigua,
\item[Lo tercero] roc\'{\i}n flaco, y
-\item[Y por \'{u}ltimo, lo cuar] galgo corredor.
+\item[Y por \'{u}ltimo, lo cuarto] galgo corredor.
\end{description}
Una olla de algo m\'{a}s vaca que carnero, salpic\'{o}n las m\'{a}s
noches, duelos y quebrantos los s\'{a}bados...
@@ -1364,24 +1653,23 @@
\item
List resuming is based on environment names, and when a
-|\newenvironment| contains a list you may want to use |\begin| and
-|\end|. Using the corresponding commands, however, is not an error,
-but it is your responsability to make sure the result is correct.
+|\newenvironment| contains a list you may want to use |\begin{<list>}|
+and |\end{<list>}|. Using the corresponding low-level commands (ie,
+|\<list>| and |\end<list>|) is not an error, but it is your
+responsability to make sure the result is correct.
-\item
-It seems there is no way to catch a misspelled name in |\setlist|
-and a meaningless error ``Missing number, treated as zero'' is raised.
-
\item The behaviour of mixed boxed labels (including enumerate and
itemize) and unboxed labels is not well-defined. The same applies to
boxed and unboxed inline lists (which could even raise an error).
+
+\item
Similarly, resuming a series and a list at the same time is allowed,
too, but again its behaviour is not well-defined.
\item (3.5.2) An incompatibility with 2.x has popped up -- if you were
-using the optional argument to pass a value to a \verb|\ref| or other
+using the optional argument to pass a value to a |\ref| or other
macro requiring expandable macros, an error is raised. A quick fix
-is letting \verb|\makelabel| to |\descriptionlabel| in \texttt{before}.
+is letting |\makelabel| to |\descriptionlabel| in \texttt{before}.
\end{itemize}
@@ -1389,20 +1677,20 @@
\begin{itemize}
\item Inline lists, with keys to set how items are joined (ie, the
-punctuation between items). Two modes are provided: \verb|boxed| and
-\verb|unboxed|.
+punctuation between items). Two modes are provided: |boxed| and
+|unboxed|.
-\item \verb|\setlist| is \textsf{calc}-savvy (eg, for use in loops),
+\item |\setlist| is \textsf{calc}-savvy (eg, for use in loops),
and you can set diferent lists and levels at once. \item All lengths
-related to labels can take the value \verb|*| (and not only
-\verb|labelsep| and \verb|leftmargin|). Its behaviour has been made
-consistent and there is new value \verb|!| which does not compute the
+related to labels can take the value |*| (and not only
+|labelsep| and |leftmargin|). Its behaviour has been made
+consistent and there is new value |!| which does not compute the
widest label.
-\item With \verb|\restartlist{<list-name>}|, list counters can be restarted (in
-case you are using \verb|resume|).
+\item With |\restartlist{<list-name>}|, list counters can be restarted (in
+case you are using |resume|).
-\item \verb|resume*| can be combined with other keys.
+\item |resume*| can be combined with other keys.
\item Lists can be gathered globally using series, so that they are
considered a single list. To start a series just use
@@ -1409,19 +1697,19 @@
|series=<series-name>| and then resume it with |resume=<series-name>| or
|resume*=<series-name>|.
-\item The ``experimental'' \verb|fullwidth| has been replaced by a new key
-\verb|wide|.
+\item The ``experimental'' |fullwidth| has been replaced by a new key
+|wide|.
\item|\SetLabelAlign| defines new align values.
-\item You can define ``abstract'' values (eg, \verb|label=numeric|) and
+\item You can define ``abstract'' values (eg, |label=numeric|) and
new keys.
\end{itemize}
\begin{itemize}
-\item (3.2) \verb|start| and \verb|widest*| are \textsf{calc}-savvy.
-\item (3.2) \verb|\value| can be used with \verb|widest*|.
-\item (3.2) Some internal restrictions in \verb|\arabic| and the like
+\item (3.2) |start| and |widest*| are \textsf{calc}-savvy.
+\item (3.2) |\value| can be used with |widest*|.
+\item (3.2) Some internal restrictions in |\arabic| and the like
has been removed. It is more flexible at the cost of having a more
``relaxed'' error checking.
\end{itemize}
@@ -1428,28 +1716,28 @@
\subsection{Bug fixes}
\begin{itemize}
-\item Star values (eg, \verb|leftmargin=*|) could not be overriden
+\item Star values (eg, |leftmargin=*|) could not be overriden
and new values were ignored.
-\item \verb|nolistsep| as the first of several keys was not always
+\item |nolistsep| as the first of several keys was not always
recognized and therefore treated like a short label
-(i.e., \verb|nol\roman*stsep|).
-\item \verb|labelwidth| did not always work (when there was a prior
-\verb|widest| and \verb|*|)
-\item With \verb|align=right| the label and the following text could
+(i.e., |nol\roman*stsep|).
+\item |labelwidth| did not always work (when there was a prior
+|widest| and |*|)
+\item With |align=right| the label and the following text could
overlap.
-\item \verb|description| did not get the correct list level.
-\item At some point (2.x?) \verb|\value*| stopped working.
+\item |description| did not get the correct list level.
+\item At some point (2.x?) |\value*| stopped working.
\item (3.1) Unfortunately, \textsf{xkeyval} ``kills''
\textsf{keyval}, so the lattest has been replicated in
\textsf{enumitem}.
-\item (3.3) Fixes a serious bug -- with \verb|*| neither
-\verb|itemize| nor \verb|description| worked.
-\item (3.4) Fixes bad spacing in mode boxed (misplaced \verb|\unskip|
+\item (3.3) Fixes a serious bug -- with |*| neither
+|itemize| nor |description| worked.
+\item (3.4) Fixes bad spacing in mode boxed (misplaced |\unskip|
before the first item and wrong spacefactor between items).
-\item (3.4) \verb|nolistsep| did not work as intended, but since the
-error has been there for several years, a new key \verb|nosep| is
+\item (3.4) |nolistsep| did not work as intended, but since the
+error has been there for several years, a new key |nosep| is
provided.
-\item (3.4) The issue with \verb|nolistsep| with \verb|shortlabels|
+\item (3.4) The issue with |nolistsep| with |shortlabels|
(see above) was not fixed in all cases. Hopefully now it is.
\item (3.5.0) Fixed the fix related to the spacefactor between items.
\item (3.5.0) Fixed a problem with nested boxed inline lists.
@@ -1458,7 +1746,6 @@
\item (3.5.2) Fixed |\setlist*|, which didn't work.
\end{itemize}
-
\subsection{Acknowledgements}
I wish to thank particularly the comments and suggestions from Lars
@@ -1465,3 +1752,25 @@
Madsen, who has found some bugs, too.
\end{document}
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Modified: trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty 2018-11-30 20:26:40 UTC (rev 49281)
+++ trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty 2018-11-30 21:48:04 UTC (rev 49282)
@@ -1,25 +1,17 @@
-% +--------------------------------------------------+
-% | Typeset enumitem.tex to get the documentation. |
-% +--------------------------------------------------+
%
-% Copyright (c) 2003-2011 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 2003-2018 Javier Bezos http://www.texnia.com
%
-% This file is part of the enumitem distribution release 3.5.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
%
+% Repository: https://github.com/jbezos/enumitem
+%
+% Release
+% ~~~~~~~
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{enumitem}[2018/11/30 v3.6 Customized lists]
+
% Notes
% ~~~~~
%
@@ -40,23 +32,19 @@
% - Define keys with values
% - Revise @nobreak
%
-% Release
-% ~~~~~~~
-
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{enumitem}[2011/09/28 v3.5.2 Customized lists]
-
% +=============================+
% | EMULATING KEYVAL |
% +=============================+
%
-% "Thanks" to xkeyval, which use the same macros names as
+% "Thanks" to xkeyval, which uses the same macro names as
% keyval :-(, the latter has to be replicated in full here
-% to ensure it works as intended. The original work if by
+% to ensure it works as intended. The original work is by
% David Carlisle, under license LPPL. Once the code is here,
-% it could be optimized by adpting it to the specific needs
-% of titlesec (to do).
+% it could be optimized by adapting it to the specific needs
+% of enumitem (to do).
+% TODO - Update to the latest changes in keyval
+
\def\enitkv at setkeys#1#2{%
\def\enitkv at prefix{enitkv@#1@}%
\let\@tempc\relax
@@ -63,9 +51,9 @@
\enitkv at do#2,\relax,}
\def\enitkv at do#1,{%
- \ifx\relax#1\empty\else
- \enitkv at split#1==\relax
- \expandafter\enitkv at do\fi}
+ \ifx\relax#1\empty\else
+ \enitkv at split#1==\relax
+ \expandafter\enitkv at do\fi}
\def\enitkv at split#1=#2=#3\relax{%
\enitkv@@sp at def\@tempa{#1}%
@@ -124,23 +112,25 @@
{\csname enitkv@#1@#2\endcsname{#3}}%
\@namedef{enitkv@#1@#2}##1}
+% This ends the code copied from keyval (under LPPL).
+
% +=============================+
% | DEFINITIONS |
% +=============================+
%
% (1) The package uses a token register very often. To be on the
-% safe side, instead of \toks@, etc., a new one is declared.
+% safe side, instead of \toks@, etc., a new one is declared.
% (2) \enit at inbox is the box storing the items in boxed inline
-% lists.
+% lists.
% (3) \enit at outerparindent is used to save the outer parindent
-% so that it can be used in the key parindent
+% so that it can be used in the key parindent
% (4) \enit at type has three values: 0 = enum, 1 = item, 2 = desc.
% (5) \enit at calc stores which dimen is to be computed:
-% 0=labelindent, 1=labelwidth, 2=labelsep, 3=leftmargin,
-% 4=itemindent
+% 0=labelindent, 1=labelwidth, 2=labelsep, 3=leftmargin,
+% 4=itemindent
% (6) \enit at resuming has four values: 0 = none, 1 = series,
-% 2 = resume* series (computed in group enumitem-resume),
-% 3 = resume* list (ie, with no value).
+% 2 = resume* series (computed in group enumitem-resume),
+% 3 = resume* list (ie, with no value).
\chardef \enit at iv=4
\newlength\labelindent
@@ -162,11 +152,32 @@
\def\enit at meaning{\expandafter\strip at prefix\meaning}
\def\enit at noexcs#1{\expandafter\noexpand\csname#1\endcsname}
+\long\def\enit at afterelse#1\else#2\fi{\fi#1}
+\long\def\enit at afterfi#1\fi{\fi#1}
+\def\enit at ifunset#1{%
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\enit at ifunset{ifcsname}%
+ {}%
+ {\def\enit at ifunset#1{%
+ \ifcsname#1\endcsname
+ \expandafter\ifx\csname#1\endcsname\relax
+ \enit at afterelse\expandafter\@firstoftwo
+ \else
+ \enit at afterfi\expandafter\@secondoftwo
+ \fi
+ \else
+ \expandafter\@firstoftwo
+ \fi}}
+
% Miscelaneous errors
% ===================
\def\enit at error{\PackageError{enumitem}}
-
+
\def\enit at checkerror#1#2{%
\enit at error{Unknown value `#2' for key `#1'}%
{See the manual for valid values}}
@@ -203,13 +214,12 @@
\else
\count@\@listdepth
\global\advance\@listdepth\@ne
- \@ifundefined{@list\romannumeral\the\@listdepth}%
+ \enit at ifunset{@list\romannumeral\the\@listdepth}%
{\expandafter\let
\csname @list\romannumeral\the\@listdepth\expandafter\endcsname
\csname @list\romannumeral\the\count@\endcsname}{}%
\fi}
-
% +=============================+
% | KEYS |
% +=============================+
@@ -230,16 +240,19 @@
% ================
\enitkv at key{enumitem}{topsep}{%
- \setlength\topsep{#1}}
+ \enit at setlength\topsep{#1}}
+% \enitkv at key{enumitem}{bottomsep}{%
+ % \def\enit at bottomsep{#1}}
+
\enitkv at key{enumitem}{itemsep}{%
- \setlength\itemsep{#1}}
+ \enit at setlength\itemsep{#1}}
\enitkv at key{enumitem}{parsep}{%
- \setlength\parsep{#1}}
+ \enit at setlength\parsep{#1}}
\enitkv at key{enumitem}{partopsep}{%
- \setlength\partopsep{#1}}
+ \enit at setlength\partopsep{#1}}
% Horizontal spacing
% ==================
@@ -261,7 +274,7 @@
\enit at calcwidestfalse
\let\enit at calc\z@
\fi
- \setlength#1{#3}%
+ \enit at setlength#1{#3}%
\fi\fi}
\def\enitkv at enumitem@widest#1{%
@@ -268,6 +281,14 @@
\expandafter\let\csname enit at cw@\@enumctr\endcsname\relax
\@namedef{enit at widest@\@enumctr}##1{#1}}
+\def\enitkv at enumitem@widest#1{%
+ \ifcase\enit at type % enumerate
+ \expandafter\let\csname enit at cw@\@enumctr\endcsname\relax
+ \@namedef{enit at widest@\@enumctr}##1{\enit at format{#1}}%
+ \else % itemize / description
+ \def\enit at widest@{\enit at format{#1}}%
+ \fi}
+
\def\enitkv at enumitem@widest at default{%
\expandafter\let\csname enit at cw@\@enumctr\endcsname\relax
\expandafter\let\csname enit at widest@\@enumctr\endcsname\relax}
@@ -284,7 +305,7 @@
\ifnum\enit at calc=\z@
\enit at calcwidestfalse
\fi
- \setlength\labelindent{#1}%
+ \enit at setlength\labelindent{#1}%
\advance\labelindent\leftmargin}
\enitkv at key{enumitem}{labelindent}{%
@@ -311,10 +332,10 @@
\fi}
\enitkv at key{enumitem}{listparindent}{%
- \setlength\listparindent{#1}}
+ \enit at setlength\listparindent{#1}}
\enitkv at key{enumitem}{rightmargin}{%
- \setlength\rightmargin{#1}}
+ \enit at setlength\rightmargin{#1}}
% labelsep, from itemindent; labelsep*, from leftmargin
@@ -324,7 +345,7 @@
\enit at calcwidestfalse
\let\enit at calc\z@
\fi
- \setlength\labelsep{#1}%
+ \enit at setlength\labelsep{#1}%
\advance\labelsep\itemindent}
\enitkv at key{enumitem}{labelsep}{%
@@ -331,6 +352,19 @@
\enit at sepfrommarginfalse
\enit at calcset\labelsep\tw@{#1}}
+\enitkv at key{enumitem}{left}{%
+ \enit at setleft#1..\@empty..\@@}
+
+\def\enit at setleft#1..#2..#3\@@{%
+ \enit at setlength\labelindent{#1}%
+ \edef\enit at a{#3}%
+ \ifx\enit at a\@empty
+ \enit at calcset\leftmargin\thr@@*%
+ \else
+ \enit at setlength\leftmargin{#2}%
+ \enit at calcset\labelsep\tw@*%
+ \fi}
+
% Series, resume and start
% ========================
@@ -337,7 +371,7 @@
\enitkv at key{enumitem-resume}{series}{%
\enit at checkseries@m
\let\enit at resuming\@ne
- \@ifundefined{enitkv at enumitem@#1}{}%
+ \enit at ifunset{enitkv at enumitem@#1}{}%
{\enit at error{Invalid series name `#1'}%
{Do not name a series with an existing key}}%
\def\enit at series{#1}}
@@ -351,12 +385,12 @@
\def\enitkv at enumitem@resume at default{%
\@nameuse{enit at resume@\@currenvir}\relax}
-
+
\@namedef{enitkv at enumitem-resume@resume*}#1{%
\enit at checkseries@m
\let\enit at resuming\tw@
\edef\enit at series{#1}%
- \@ifundefined{enit at resumekeys@series@#1}%
+ \enit at ifunset{enit at resumekeys@series@#1}%
{\enit at noserieserror{#1}}%
{\expandafter\let\expandafter\enit at resumekeys
\csname enit at resumekeys@series@#1\endcsname}}
@@ -371,7 +405,7 @@
\enit at checkseries{resume*}}
\newcommand\restartlist[1]{%
- \@ifundefined{end#1}%
+ \enit at ifunset{end#1}%
{\enit at error{Undefined list `#1'}%
{No list has been defined with that name.}}%
{\expandafter\let
@@ -383,16 +417,16 @@
% Penalties
% =========
-
+
\enitkv at key{enumitem}{beginpenalty}{%
\@beginparpenalty#1\relax}
-
+
\enitkv at key{enumitem}{midpenalty}{%
\@itempenalty#1\relax}
\enitkv at key{enumitem}{endpenalty}{%
\@endparpenalty#1\relax}
-
+
% Font/Format
% ===========
@@ -406,7 +440,7 @@
% ==================
\enitkv at key{enumitem}{style}[normal]{%
- \@ifundefined{enit at style@#1}%
+ \enit at ifunset{enit at style@#1}%
{\enit at checkerror{style}{#1}}%
{\enit at nextlinefalse
\enit at boxdescfalse
@@ -440,7 +474,7 @@
% --------
\enitkv at key{enumitem}{align}{%
- \@ifundefined{enit at align@#1}%
+ \enit at ifunset{enit at align@#1}%
{\enit at checkerror{align}{#1}}%
{\csname enit at align@#1\endcsname}}
@@ -489,7 +523,7 @@
% in the same hierarchy level. Explicit refs above the
% current hierarchy level are overriden by label (besides ref),
% too. Since an explicit ref has preference, it's delayed.
-
+
\enitkv at key{enumitem}{ref}{%
\g at addto@macro\enit at delayedkeys{,ref=#1}}
@@ -540,6 +574,8 @@
\def\enit at addcounter@s#1#2#3{%
\enit at addcounter{#1}{#2}%
{\@nameuse{enit at sc@\expandafter\@gobble\string#2}{#3}}}
+
+% TODO - \SetEnumerateCounter
% The 5 basic counters:
@@ -568,7 +604,7 @@
% ----
\enitkv at key{enumitem}{mode}{%
- \@ifundefined{enit at mode#1}%
+ \enit at ifunset{enit at mode#1}%
{\enit at checkerror{mode}{#1}}%
{\csname enit at mode#1\endcsname}}
@@ -613,7 +649,7 @@
\in@{=}{#1}% Quick test, if contains =, it's key=value
\ifin@\else
\enitkv@@sp at def\enit at a{#1}%
- \@ifundefined{enitkv at enumitem@\enit at meaning\enit at a}%
+ \enit at ifunset{enitkv at enumitem@\enit at meaning\enit at a}%
{\ifnum\enit at type=\z@
\def\enit at elt{\enit at replace\enit at a}%
\enit at marklist % Returns \enit at toks
@@ -657,20 +693,27 @@
\enitkv at key{enumitem}{before}{%
\def\enit at before{#1}}
-\enitkv at key{enumitem}{after}{%
- \def\enit at after{#1}}
-
\enitkv at key{enumitem}{before*}{%
\expandafter\def\expandafter\enit at before\expandafter
{\enit at before#1}}
+\enitkv at key{enumitem}{after}{%
+ \def\enit at after{#1}}
+
\enitkv at key{enumitem}{after*}{%
\expandafter\def\expandafter\enit at after\expandafter
{\enit at after#1}}
+\enitkv at key{enumitem}{first}{%
+ \def\enit at keyfirst{#1}}
+
+\enitkv at key{enumitem}{first*}{%
+ \expandafter\def\expandafter\enit at keyfirst\expandafter
+ {\enit at keyfirst#1}}
+
% Miscelaneous keys
% ================
-
+
\enitkv at key{enumitem}{nolistsep}[true]{%
\partopsep=\z at skip
\topsep=\z@ plus .1pt
@@ -683,7 +726,6 @@
\itemsep=\z at skip
\parsep=\z at skip}
-
\enitkv at key{enumitem}{noitemsep}[true]{%
\itemsep=\z at skip
\parsep=\z at skip}
@@ -692,7 +734,7 @@
\enit at align@left
\leftmargin\z@
\labelwidth\z@
- \setlength\labelindent{#1}%
+ \enit at setlength\labelindent{#1}%
\listparindent\labelindent
\enit at calcset\itemindent\enit at iv!}
@@ -710,8 +752,8 @@
% ------------
\newcommand\SetEnumitemValue[2]{% Implicit #3
- \@ifundefined{enit at enitkv@#1}%
- {\@ifundefined{enitkv at enumitem@#1}%
+ \enit at ifunset{enit at enitkv@#1}%
+ {\enit at ifunset{enitkv at enumitem@#1}%
{\enit at error{Wrong key `#1' in \string\SetEnumitemValue}%
{Perhaps you have misspelled it}}{}%
\expandafter\let\csname enit at enitkv@#1\expandafter\endcsname
@@ -718,7 +760,7 @@
\csname enitkv at enumitem@#1\endcsname}{}%
\@namedef{enitkv at enumitem@#1}##1{%
\def\enit at a{##1}%
- \@ifundefined{enit at enitkv@#1@\enit at meaning\enit at a}%
+ \enit at ifunset{enit at enitkv@#1@\enit at meaning\enit at a}%
{\@nameuse{enit at enitkv@#1}{##1}}%
{\@nameuse{enit at enitkv@#1\expandafter\expandafter\expandafter}%
\expandafter\expandafter\expandafter
@@ -729,7 +771,7 @@
% -------------
\newcommand\SetEnumitemKey[2]{%
- \@ifundefined{enitkv at enumitem@#1}%
+ \enit at ifunset{enitkv at enumitem@#1}%
{\enitkv at key{enumitem}{#1}[]{\enitkv at setkeys{enumitem}{#2}}}%
{\enit at error{Duplicated key `#1' in \string\SetEnumitemKey}%
{There already exists a key with that name}}}
@@ -742,7 +784,7 @@
% ========
\def\enit at setkeys#1{%
- \@ifundefined{enit@@#1}{}%
+ \enit at ifunset{enit@@#1}{}%
{\expandafter\expandafter\expandafter
\enit at setkeys@i\csname enit@@#1\endcsname\@@}}
@@ -768,7 +810,7 @@
\def\enit at getwidth#1#2#3#4{%
\let#4#3%
\def#3##1{%
- \@ifundefined{enit at widest\expandafter\@gobbletwo\string##1}% if no widest=key
+ \enit at ifunset{enit at widest\expandafter\@gobbletwo\string##1}% if no widest=key
{#1}%
{\csname enit at widest\expandafter\@gobbletwo\string##1\endcsname{#4}}}}
@@ -780,8 +822,8 @@
\def\enit at calcwidth{%
\ifenit at calcwidest
- \ifnum\enit at type=\z@ % ie, enum
- \@ifundefined{enit at cw@\@enumctr}%
+ \ifcase\enit at type% ie, enum
+ \enit at ifunset{enit at cw@\@enumctr}%
{\@namedef{enit at cv@\@enumctr}{\enit at valueerror\@enumctr}}%
{\edef\enit at values{%
\enit at values
@@ -789,16 +831,29 @@
\expandafter
\edef\csname enit at cv@\@enumctr\endcsname
{\@nameuse{c@\@enumctr}}}%
+ \begingroup
+ \enit at values
+ \def\value##1{\csname enit at cv@##1\endcsname}%
+ \let\enit at elt\enit at getwidth
+ \enit at labellist
+ \settowidth\labelwidth{\@itemlabel}%
+ \xdef\enit at a{\labelwidth\the\labelwidth\relax}%
+ \endgroup
+ \enit at a
+ \or
+ \ifx\enit at widest@\relax
+ \settowidth\labelwidth{\@itemlabel}%
+ \else
+ \settowidth\labelwidth{\enit at widest@}%
+ \fi
+ \else
+ \ifx\enit at widest@\relax
+ \settowidth\labelwidth{\@itemlabel}%
+ \else
+ \settowidth\labelwidth{\makelabel{\enit at widest@}}%
+ \fi
+ \advance\labelwidth-\labelsep
\fi
- \begingroup
- \enit at values
- \def\value##1{\csname enit at cv@##1\endcsname}%
- \let\enit at elt\enit at getwidth
- \enit at labellist
- \settowidth\labelwidth{\@itemlabel}%
- \xdef\enit at a{\labelwidth\the\labelwidth\relax}%
- \endgroup
- \enit at a
\fi
\advance\dimen at -\labelwidth}
@@ -859,10 +914,11 @@
\def\enit at depth{#2}%
\edef\enit at prevlabel{#3\romannumeral#2}%
\advance#2\@ne}
-
+
\def\enit at preset#1#2#3{%
\enit at sepfrommarginfalse
\enit at calcwidestfalse
+ \let\enit at widest@\relax
\let\enit at resuming\z@
\let\enit at series\relax
\enit at boxmodetrue
@@ -871,6 +927,7 @@
\let\enit at afterlabel\nobreakspace
\let\enit at before\@empty
\let\enit at after\@empty
+ \let\enit at keyfirst\@empty
\let\enit at format\@firstofone % and NOT empty
\let\enit at ref\relax
\labelindent\z at skip
@@ -890,16 +947,16 @@
% resume*=<series>
\def\enitkv at err@a#1{%
- \@ifundefined{enit at resumekeys@series@\@tempa}{}%
+ \enit at ifunset{enit at resumekeys@series@\@tempa}{}%
{\@nameuse{enitkv at enumitem-resume@resume*\expandafter}%
\expandafter{\@tempa}}}
% keyval "error" in the optional argument: all undefined keys are
% passed to the keyval error, but <series> is ignored (already
-% processed in enumitem-resume
+% processed in enumitem-resume)
\def\enitkv at err@b#1{%
- \@ifundefined{enit at resumekeys@series@\@tempa}%
+ \enit at ifunset{enit at resumekeys@series@\@tempa}%
{\enit at savekverr{#1}}%
{}}
@@ -924,6 +981,101 @@
\expandafter\enit at setkeys@i\enit at savekeys\@@
\let\enitkv at errx\enit at savekverr}
+% Handling <> sytax for font sizes
+% ================================
+% The following code is based on LaTeX (\DeclareFontShape). Only the
+% code for <> is preserved (no functions), and a default value can be
+% set before the first <>. In addition, here single values take
+% precedende over ranges. The original work is by the LaTeX Team,
+% under license LPPL.
+
+\def\enit at ifnot@nil#1{%
+ \def\enit at a{#1}%
+ \ifx\enit at a\@nnil
+ \expandafter\@gobble
+ \else
+ \expandafter\@firstofone
+ \fi}
+
+\def\enit at remove@to at nnil#1\@nnil{}
+\def\enit at remove@angles#1>{\enit at simple@size}
+
+\def\enit at simple@size#1<{%
+ \if<#1<%
+ \expandafter\enit at remove@angles
+ \else
+ \def\enit at c{#1}%
+ \expandafter\enit at remove@to at nnil
+ \fi}
+
+\def\enit at extractrange#1<#2>{%
+ \ifx\enit at c\relax
+ \def\enit at c{#1}%
+ \fi
+ \enit at isrange#2->\@nil#2>}
+
+\def\enit at isrange#1-#2\@nil{%
+ \if>#2%
+ \expandafter\enit at check@single
+ \else
+ \expandafter\enit at check@range
+ \fi}
+
+\def\enit at check@range#1-#2>#3<#4\@nnil{%
+ \enit at ifnot@nil{#3}{%
+ \def\enit at b{\enit at extractrange<#4\@nnil}%
+ \upper at bound=%
+ \enit at ifunset{enit at sizefor@#2}{0#2\p@}{\@nameuse{enit at sizefor@#2}\p@}%
+ %%% usar count@
+ \ifdim\upper at bound=\z@ \upper at bound\maxdimen \fi
+ \ifdim\f at size\p@<\upper at bound
+ \lower at bound=%
+ \enit at ifunset{enit at sizefor@#1}{0#1\p@}{\@nameuse{enit at sizefor@#1}\p@}%
+ \ifdim\f at size\p@<\lower at bound
+ \else
+ \enit at simple@size#3<#4\@nnil
+ \fi
+ \fi
+ \enit at b}}
+
+\def\enit at check@single#1>#2<#3\@nnil{%
+ \def\enit at b{\enit at extractrange<#3\@nnil}%
+ \ifdim\f at size\p@=
+ \enit at ifunset{enit at sizefor@#1}{0#1\p@}{\@nameuse{enit at sizefor@#1}\p@}%
+ \enit at simple@size#2<#3\@nnil
+ \let\enit at d\enit at c
+ \fi
+ \enit at b}
+
+\def\enit at try@size at range#1{%
+ \def\enit at a{#1}%
+ \let\enit at c\relax % last in range
+ \let\enit at d\relax % single
+ \expandafter\enit at extractrange\enit at a <-*>\@nil<\@nnil}
+
+% \enit at setlength is defined in the options section
+
+% This ends the code adapted from latex (under LPPL).
+
+% TODO - \SetEnumitemSizes
+% TODO - \setlist<size>[opt]{..}
+
+\def\enit at getsizefor#1#2{%
+ {\let\selectfont\relax
+ #2%
+ \expandafter\xdef\csname enit at sizefor@#1\endcsname{\f at size}}}
+
+\enit at getsizefor{script}\scriptsize
+\enit at getsizefor{tiny}\tiny
+\enit at getsizefor{footnote}\footnotesize
+\enit at getsizefor{small}\small
+\enit at getsizefor{normal}\normalsize
+\enit at getsizefor{large}\large
+\enit at getsizefor{Large}\Large
+\enit at getsizefor{LARGE}\LARGE
+\enit at getsizefor{huge}\huge
+\enit at getsizefor{Huge}\Huge
+
% +=============================+
% | LIST TYPES |
% +=============================+
@@ -1047,7 +1199,7 @@
\else
\ifenit at noinitem\else
\ifhmode\unskip\fi
- \@ifundefined{enit at itemjoin@s}%
+ \enit at ifunset{enit at itemjoin@s}%
{\enit at itemjoin}%
{\enit at itemjoin@s}%
\fi
@@ -1209,6 +1361,7 @@
\enit at ref
\enit at calcleft
\enit at before}%
+ \enit at keyfirst
\fi}
\let\enit at endenumerate\enit at endlist
@@ -1229,7 +1382,7 @@
\@namedef{enit at itemize*}{%
\let\enit at list\enit at inlist
\enit at itemize@i}
-
+
\def\enit at itemize@i#1#2#3#4{%
\ifnum#1>#3\relax
\enit at toodeep
@@ -1244,6 +1397,7 @@
\enit at preset{#2}{#1}{#4}%
\enit at calcleft
\enit at before}%
+ \enit at keyfirst
\fi}
\let\enit at enditemize\enit at endlist
@@ -1290,6 +1444,7 @@
\aftergroup\enit at postlabel
\fi}%
\enit at before}%
+ \enit at keyfirst
\fi}
\let\enit at enddescription\enit at endlist
@@ -1303,8 +1458,11 @@
\parsep\parskip
\csname @list\romannumeral\the\@listdepth\endcsname
\@nmbrlistfalse
+ \enit at setglobalkeys % ie, list and list<num>
\enit at setkeys{trivlist}%
\enit at setkeys{trivlist\romannumeral\@listdepth}%
+ \enit at setkeys{\@currenvir}%
+ \enit at setkeys{\@currenvir\romannumeral\@listdepth}%
\@trivlist
\labelwidth\z@
\leftmargin\z@
@@ -1312,6 +1470,17 @@
\let\@itemlabel\@empty
\def\makelabel##1{##1}}
+% Let's recognize also the standard trivlists (except theorems)
+
+\let\enitdp at quote\@empty
+\let\enitdp at quotation\@empty
+\let\enitdp at verse\@empty
+\let\enitdp at thebibliography\@empty
+\let\enitdp at center\@empty
+\let\enitdp at flushleft\@empty
+\let\enitdp at flushright\@empty
+\let\enitdp at tabbing\@empty
+
% Description styles
% ==================
%
@@ -1444,9 +1613,9 @@
\let\enit at c\@empty
\protected at edef\enit at a{#2}%
\@for\enit at a:=\enit at a\do{% the 2nd enit at a is first expanded
- \@ifundefined{enitdp@\enit at meaning\enit at a}%
+ \enit at ifunset{enitdp@\enit at meaning\enit at a}%
{\edef\enit at c{\enit at c\enit at eltlevels{\enit at a}}}%
- {\@ifundefined{enit at short\enit at meaning\enit at a}%
+ {\enit at ifunset{enit at short\enit at meaning\enit at a}%
\@empty
{\edef\enit at a{\@nameuse{enit at short\enit at a}}}%
\edef\enit at b{\enit at b\enit at eltnames{\enit at a}}}}%
@@ -1487,7 +1656,7 @@
\def\enit at xset@enumerate{%
\enit at xset@itemize
- \@ifundefined{c@\enit at c\romannumeral\count@}%
+ \enit at ifunset{c@\enit at c\romannumeral\count@}%
{\@definecounter{\enit at c\romannumeral\count@}}{}}
\@namedef{enit at xset@enumerate*}{\enit at xset@enumerate}
@@ -1500,15 +1669,15 @@
% <new/renew>, <name>, <type>, <max-depth>
\def\enit at newlist#1#2#3#4{%
- \@ifundefined{enit at xset@#3}%
+ \enit at ifunset{enit at xset@#3}%
{\enit at error{Unknown list type `#3')}%
{Valid types are:
- enumerate, itemize, description,\messageBreak
+ enumerate, itemize, description,\MessageBreak
enumerate*, itemize*, description*}}%
{}%
\setcounter{enit at cnt}{#4}%
\count@\@ne
- \@ifundefined{enit at short#2}%
+ \enit at ifunset{enit at short#2}%
{\def\enit at c{#2}}%
{\edef\enit at c{\csname enit at short#2\endcsname}}%
\loop
@@ -1516,7 +1685,7 @@
\ifnum\count@<\c at enit@cnt
\advance\count@\@ne
\repeat
- \@ifundefined{enitdp@#2}%
+ \enit at ifunset{enitdp@#2}%
{\expandafter\newcount\csname enitdp@#2\endcsname}{}%
\csname enitdp@#2\endcsname\z@
\advance\c at enit@cnt\m at ne
@@ -1543,6 +1712,11 @@
\newif\ifenit at loadonly
\DeclareOption{ignoredisplayed}{\let\enit at trivlist\trivlist}
+\DeclareOption{includedisplayed}{%
+ \def\enit at setglobalkeys{%
+ \enit at setkeys{list}%
+ \enit at setkeys{list\romannumeral\@listdepth}}}
+\let\enit at setglobalkeys\relax
\DeclareOption{loadonly}{\enit at loadonlytrue}
\DeclareOption{shortlabels}
{\def\enit at shl#1{%
@@ -1563,6 +1737,13 @@
{\@nameuse{enit at description*}\enitdp at description{description}\@M{#1}}
{\@nameuse{enit at enddescription*}}}
+\let\enit at setlength\setlength
+\DeclareOption{sizes}
+ {\def\enit at setlength#1#2{%
+ \enit at try@size at range{#2}% Returns \enit at c and or enit at d
+ \ifx\enit at d\relax\else\let\enit at c\enit at d\fi
+ \setlength#1{\enit at c}}}
+
\let\enit at shl\enit at toks
\ProcessOptions
@@ -1590,4 +1771,63 @@
\fi
+% +=============================+
+% | TOOLS |
+% +=============================+
+
+\def\DrawEnumitemLabel{%
+ \ifvmode
+ \hbox{\hskip\@totalleftmargin
+ \hskip-\leftmargin
+ \vrule width \leftmargin height 8pt depth -7pt
+ \hskip\itemindent
+ \ifdim\labelindent<\z@
+ \hskip-\leftmargin
+ \hskip\labelindent
+ \vrule width -\labelindent height 6pt depth -5pt
+ \hskip\labelindent
+ \else
+ \hskip-\labelsep
+ \hskip-\labelwidth
+ \hskip-\labelindent
+ \vrule width \labelindent height 6pt depth -4pt
+ \fi
+ \vrule width \labelwidth height 4pt depth -2pt
+ \vrule width \labelsep height 2pt}%
+ \else
+ \enit at error
+ {\string\DrawEnumitemLabel\space must be used in vertical mode}%
+ {Very likely, just inserting a blank line before will fix it}}
+
+% TODO - option 'verbose'
+
+% +=============================+
+% | TWO-PASS TOOLS |
+% +=============================+
+
+% TODO - downstep
+% TODO - autowidest
+
\endinput
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2018-11-30 20:26:40 UTC (rev 49281)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2018-11-30 21:48:04 UTC (rev 49282)
@@ -560,6 +560,7 @@
'hyph-utf8', "&MAKEcopy",
'hyphen-german',"die 'skipping, part of hyph-utf8'",
'ibygrk', "&MAKEflatten",
+ 'icon-appr', "die 'skipping, per author (dps) request'",
'ieeeconf', "die 'skipping, use IEEEconf'",
'ieeetran', "die 'skipping, use IEEEtran'",
'ifacmtg', "die 'skipping, nonfree license'",
More information about the tex-live-commits
mailing list