summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/enumitem/enumitem.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/enumitem/enumitem.tex')
-rw-r--r--macros/latex/contrib/enumitem/enumitem.tex62
1 files changed, 34 insertions, 28 deletions
diff --git a/macros/latex/contrib/enumitem/enumitem.tex b/macros/latex/contrib/enumitem/enumitem.tex
index 9484acd5fa..35a290b3c5 100644
--- a/macros/latex/contrib/enumitem/enumitem.tex
+++ b/macros/latex/contrib/enumitem/enumitem.tex
@@ -1,5 +1,5 @@
%
-% Copyright (C) 2003-2019 Javier Bezos http://www.texnia.com
+% Copyright (C) 2003-2025 Javier Bezos http://www.texnia.com
%
% 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.
@@ -56,7 +56,7 @@
suggestions go to \href{http://www.texnia.com/enumitem.html}%
{\texttt{http://www.texnia.com/enumitem.html}}.}}
-\date{Version 3.9\\2019/06/20}
+\date{Version 3.10\\2025/01/19}
\IfFileExists{enumitem.sty}{\usepackage{enumitem}}{}
\IfFileExists{layouts.sty}{\usepackage{layouts}}{}
@@ -130,7 +130,7 @@ 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|.
+explain the extensions provided by \textsf{enumitem}.
\begin{itemize}
\item
Vertical spacing:
@@ -210,7 +210,7 @@ label:
\begin{enumerate}[resume*]
\end{verbatim}
-\item To use the three basic list in line: just add the package option
+\item To use the three basic lists in line: just add the package option
|inline| and then the environments |enumerate*|, |itemize*| and
|description*|.
@@ -349,8 +349,8 @@ example, to remove the right parenthesis:
Sets the label font. Useful when the label is changed with the 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 |\normalfont|. A synonymous is \texttt{format}. Actually, this key
+\texttt{description} class setting are in force, so you may want to begin
+with |\normalfont|. A synonym is \texttt{format}. Actually, this key
may be used for any stuff to be executed at each |\item|, just before the
label.
@@ -425,7 +425,7 @@ a future release.}
\texttt{leftmargin}
\end{tabular}
\end{center}
-Here |labelindent| is a new parameter introduced by \textit{enumitem},
+Here |labelindent| is a new parameter introduced by \textsf{enumitem},
described below. The rest are those in standard \LaTeX.
Actually, the layout is more complex because the label box (ie,
@@ -514,7 +514,7 @@ computed parameter (eg, |itemindent=*| with |align=left|).
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
+have been read. Explicit values are not lost, and so with the following
hierarchical settings:
\begin{verbatim}
leftmargin=2em
@@ -881,23 +881,26 @@ Then just use the key |widestlabel|.
some ``external'' help. Here is a possible solution, but not the
only one (and very likely not even the best -- for example, |start|
is in fact no-op).
-
\begin{verbatim}
-\usepackage{calc,cleveref,crossreftools}
-\crtrefundefinedtext{0}
+\newcounter{rev-enumi} \newcounter{rev-enumii}
+\newcounter{rev-enumiii} \newcounter{rev-enumiv}
-\newcounter{revcount}
\newcommand\revcounter[1]{%
- \setcounter{revcount}{1+\crtcrefnumber{enum-\EnumitemId}-\value{#1}}}
+ \setcounter{#1}{\value{#1}-2}%
+ \stepcounter{rev-#1}%
+ \gdef\afterrev{%
+ \refstepcounter{rev-#1}%
+ \setcounter{rev-#1}{0}}}
+
\AddEnumerateCounter\revcounter\revcounter{} % the 2nd is dummy
-\SetEnumitemKey{revarabic}
- {label = \revcounter*(\arabic{revcount}),
- ref = (\arabic{revcount}),
- after = \label{enum-\EnumitemId}}
+\SetEnumitemKey{revRoman}
+ {start = \getrefnumber{enum-\EnumitemId}-1,
+ label = (\Roman*)\revcounter*,
+ ref = (\Roman*),
+ after = \afterrev
+ \label{enum-\EnumitemId}}
\end{verbatim}
- Note |ref| must be set separately, because |\revcounter|
- is not expandable.
\end{example}
\subsection{Description styles}
@@ -928,8 +931,11 @@ fit in the margin the text continues in the same line. Same as
|style=unboxed,labelwidth=!|.
\item[|multiline|] The label is placed in a parbox whose width is
-|leftmargin|, with several lines if
-necessary. Same as |style=standard,align=parleft,labelwidth=!|.
+|leftmargin|, with several lines if necessary. Same as
+|style=standard,align=parleft,labelwidth=!|. If you modify it, bear in
+mind |align| cannot be set freely (for an internal optimization; in
+particular, a horizontal box doesn’t make sense and can raise an
+error).
\end{description}
@@ -1019,7 +1025,7 @@ itemize environment under similar conditions, too:
With this command, you can define new keys (or redefine them), which is
particularly useful for enumerate to be adapted to specific
-typographical rules or to extend it for non-Latin scrips. Here
+typographical rules or to extend it for non-Latin scripts. Here
|<replacement>| contains one of the starred versions of
counters.
@@ -1107,11 +1113,11 @@ 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
- building 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.}
+ (remember many displayed elements are defined as lists). Links may
+ point to a wrong place, display math is forbidden, and due to an
+ optimization done by \TeX{} when building lists explicit hyphenation
+ may be wrong.\footnote{A Knuthian ``premature optimization''? Who
+ knows, but anyway with Lua\TeX{} hyphenation 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
@@ -1910,7 +1916,7 @@ overlap.
\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{keyval}, so the latest has been replicated in
\textsf{enumitem}.
\item (3.3) Fixes a serious bug -- with |*| neither
|itemize| nor |description| worked.