texlive[73515] Master/texmf-dist: enumitem (19jan25)
commits+karl at tug.org
commits+karl at tug.org
Sun Jan 19 21:55:11 CET 2025
Revision: 73515
https://tug.org/svn/texlive?view=revision&revision=73515
Author: karl
Date: 2025-01-19 21:55:11 +0100 (Sun, 19 Jan 2025)
Log Message:
-----------
enumitem (19jan25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/enumitem/README.md
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
Modified: trunk/Master/texmf-dist/doc/latex/enumitem/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/enumitem/README.md 2025-01-19 20:55:02 UTC (rev 73514)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/README.md 2025-01-19 20:55:11 UTC (rev 73515)
@@ -1,4 +1,4 @@
-## Enumitem 3.9
+## Enumitem 3.10
This package provides most of the flexibility you may want to customize
the three basic list environments (`enumerate`, `itemize` and
@@ -8,6 +8,8 @@
### Latest changes
```
+3.10 2025-01-19
+ - A couple of fixes: \value* in ref=, a more robust resume*.
3.9 2019-06-20
- \DrawEnumitemLabel rewritten
3.8 2019-02-04
@@ -38,4 +40,4 @@
________
Javier Bezos --- http://www.texnia.com
-2019/06/20
+2025/01/19
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 2025-01-19 20:55:02 UTC (rev 73514)
+++ trunk/Master/texmf-dist/doc/latex/enumitem/enumitem.tex 2025-01-19 20:55:11 UTC (rev 73515)
@@ -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 @@
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 @@
\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 @@
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 @@
\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 @@
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 @@
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 @@
|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 @@
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 @@
\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 @@
\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.
Modified: trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty 2025-01-19 20:55:02 UTC (rev 73514)
+++ trunk/Master/texmf-dist/tex/latex/enumitem/enumitem.sty 2025-01-19 20:55:11 UTC (rev 73515)
@@ -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.
@@ -10,7 +10,7 @@
% ~~~~~~~
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{enumitem}[2019/06/20 v3.9 Customized lists]
+\ProvidesPackage{enumitem}[2025/01/19 v3.10 Customized lists]
% Notes
% ~~~~~
@@ -176,7 +176,7 @@
\expandafter\@firstoftwo
\fi}}
-% Miscelaneous errors
+% Miscellaneous errors
% ===================
\def\enit at error{\PackageError{enumitem}}
@@ -204,7 +204,7 @@
\def\enit at checkseries@m{%
\ifcase\enit at resuming\else
- \enit at error{Uncompatible series settings}%
+ \enit at error{Incompatible series settings}%
{'series' and 'resume*' must not be used\MessageBreak
at the same time}%
\fi}
@@ -222,6 +222,12 @@
\csname @list\romannumeral\the\@listdepth\expandafter\endcsname
\csname @list\romannumeral\the\count@\endcsname}{}%
\fi}
+
+\def\enit at nolabelenum#1#2{%
+ \enit at error{Label undefined}%
+ {The current class doesn't define some labels\MessageBreak
+ for 'enumerate'. You have to do it yourself, as\MessageBreak
+ explained in the manual.}}
% +=============================+
% | KEYS |
@@ -231,7 +237,7 @@
%
% There are 2 keyval groups: enumitem, and enumitem-delayed.
% The latter is used to make sure a prioritary key is the latest one;
-% eg, ref, so that the ref format set by label is overriden. So, when
+% eg, ref, so that the ref format set by label is overridden. So, when
% this key is found in enumitem, nothing is done, except the key/value
% is moved to enumitem-delayed.
%
@@ -374,7 +380,7 @@
\else % series=override
\global\@namedef{enitkv at enumitem@#1}% with value
{\enit at error
- {Key '#1' has been overriden by a series}%
+ {Key '#1' has been overridden by a series}%
{Change the series name and/or deactivate series=override}}%
\global\@namedef{enitkv at enumitem@#1 at default}{}%
\fi
@@ -404,6 +410,16 @@
\expandafter\let\expandafter\enit at resumekeys
\csname enit at resumekeys@\@currenvir\endcsname
\@nameuse{enit at resume@\@currenvir}\relax}
+
+\@namedef{enitkv at enumitem-resume@resume*@default}{%
+ \let\enit at resuming\thr@@
+ \enit at ifunset{enit at resumekeys@\@currenvir}%
+ {\PackageWarning{enumitem}{Nothing to resume,}%
+ \let\enit at resumekeys\@empty}
+ {\let\enit at resuming\thr@@
+ \expandafter\let\expandafter\enit at resumekeys
+ \csname enit at resumekeys@\@currenvir\endcsname
+ \@nameuse{enit at resume@\@currenvir}\relax}}
\enitkv at key{}{resume*}[]{%
\enit at checkseries{resume*}}
@@ -474,7 +490,7 @@
% Labels and refs
% ===============
-% Aligment
+% Alignment
% --------
\enitkv at key{}{align}{%
@@ -525,7 +541,7 @@
% ref is set by label, except if there is an explicit ref in the same
% hierarchy level. Explicit refs above the current hierarchy level are
-% overriden by label (besides ref), too. Since an explicit ref has
+% overridden by label (besides ref), too. Since an explicit ref has
% preference, it's delayed.
\enitkv at key{}{ref}{%
@@ -713,7 +729,7 @@
\expandafter\def\expandafter\enit at keyfirst\expandafter
{\enit at keyfirst#1}}
-% Miscelaneous keys
+% Miscellaneous keys
% ================
\enitkv at key{}{nolistsep}[true]{%
@@ -903,7 +919,16 @@
\else
\noexpand#1{#2}%
\fi}%
+
+% Suggested by @muzimuzhi, amended. See Gh36.
+\def\enit at refstar@ii#1#2{%
+ \if*#2\@empty
+ \noexpand\the\noexpand#1{\@enumctr}%
+ \else
+ \noexpand\the\noexpand#1{#2}%
+ \fi}
+
\def\enit at refstar#1#2#3#4{%
\def#2{\enit at refstar@i#2}%
\def#3{\enit at refstar@i#3}}
@@ -910,12 +935,13 @@
\def\enit at normlabel#1#2{%
\begingroup
- \def\value{\enit at refstar@i\value}%
+ \def\value{\enit at refstar@ii\value}%
\let\enit at elt\enit at refstar
\enit at labellist
- \protected at xdef\enit at a{{#2}}% Added braces as \ref is in the
+ % Added braces as \ref is in the global scope:
+ \protected at xdef\enit at a{{#2}}%
\endgroup
- \expandafter\let#1\enit at a} % global scope.
+ \expandafter\let#1\enit at a}
% Preliminary settings and default values
% =======================================
@@ -999,7 +1025,7 @@
\expandafter\enit at setkeys@i\enit at savekeys\@@
\let\enitkv at errx\enit at savekverr}
-% Handling <> sytax for font sizes
+% Handling <> syntax 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
@@ -1116,7 +1142,7 @@
\enit at afterlist
\fi
\ifnum\enit at resuming=\thr@@ % ie, resume* list (save count only)
- \enit at setresumekeys\@currenvir\@gobblefour\global
+ \enit at setresumekeys\@currenvir\@gobblefour\@empty
\else
\enit at setresumekeys\@currenvir\@empty\@empty
\fi
@@ -1246,7 +1272,7 @@
\enit at afterlist
\fi
\ifnum\enit at resuming=\thr@@ % ie, resume* list (save count only)
- \enit at setresumekeys\@currenvir\@gobblefour\global
+ \enit at setresumekeys\@currenvir\@gobblefour\@empty
\else
\enit at setresumekeys\@currenvir\@empty\@empty
\fi
@@ -1371,6 +1397,11 @@
\csname label\@enumctr\endcsname
{\usecounter\@enumctr
\let\enit at calc\z@
+ \expandafter\ifx\expandafter\@undefined\@itemlabel
+ \enit at nolabelenum
+ \else\expandafter\ifx\expandafter\relax\@itemlabel
+ \enit at nolabelenum
+ \fi\fi
\def\makelabel##1{\enit at align{\enit at format{##1}}}%
\enit at preset{#2}{#1}{#4}%
\enit at normlabel\@itemlabel\@itemlabel
@@ -1492,7 +1523,7 @@
% ==================
%
% the next definition is somewhat tricky because labels are boxed.
-% That's fine when the label is just placed at the begining of a line
+% That's fine when the label is just placed at the beginning of a line
% of text, but when the box is placed without horizontal material,
% leading is killed. So, we need change somehow \box to \unhbox, but
% I don't want to modify \@item. The code below presumes \@item has
@@ -1508,7 +1539,7 @@
% necessary to get proper line breaks (including a \nobreak at the
% beginning of \enit at align, ie, after the first whatsit, see above).
% To "pass" the inner group added by color to the box, \enit at postlabel
-% ckecks if the following is }. ie, \egroup -- if not, the box has
+% checks if the following is }. ie, \egroup -- if not, the box has
% not reached yet its end.
\def\enit at postlabel{%
More information about the tex-live-commits
mailing list.