diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-27 03:01:57 +0000 |
commit | cef58753eba8ad7e2071195dbd92454febe82d32 (patch) | |
tree | df909696e42fb25ce108e30258c7f935ded86079 /macros/latex/contrib/macrolist | |
parent | 84465d50d746dfed1bfbe7bb5065279665fa87de (diff) |
CTAN sync 202107270301
Diffstat (limited to 'macros/latex/contrib/macrolist')
-rw-r--r-- | macros/latex/contrib/macrolist/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/macrolist/macrolist.dtx | 31 | ||||
-rw-r--r-- | macros/latex/contrib/macrolist/macrolist.pdf | bin | 192607 -> 192674 bytes |
3 files changed, 19 insertions, 14 deletions
diff --git a/macros/latex/contrib/macrolist/README.md b/macros/latex/contrib/macrolist/README.md index ea16d986ea..01a19cad01 100644 --- a/macros/latex/contrib/macrolist/README.md +++ b/macros/latex/contrib/macrolist/README.md @@ -1,4 +1,4 @@ -# The LaTeX package macrolist - version 1.2.0 (2021/07/23) +# The LaTeX package macrolist - version 1.2.1 (2021/07/25) > Copyright (C) 2021 Dennis Chen <proofprogram@gmail.com> > diff --git a/macros/latex/contrib/macrolist/macrolist.dtx b/macros/latex/contrib/macrolist/macrolist.dtx index 382faf2930..59d3041f3f 100644 --- a/macros/latex/contrib/macrolist/macrolist.dtx +++ b/macros/latex/contrib/macrolist/macrolist.dtx @@ -16,7 +16,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{macrolist}[2021/07/23 v1.2.0 Create lists of macros and perform operations on them] +\ProvidesPackage{macrolist}[2021/07/25 v1.2.1 Create lists of macros and perform operations on them] \RequirePackage{pgffor} %</package> @@ -94,6 +94,7 @@ \csname macrolist@list@#1\the\numexpr #2\relax\endcsname% } % \fi +% \changes{v1.2.1}{2021/07/25}{Fix behavior of listindexof and listcontains for empty lists} % \changes{v1.2.0}{2021/07/23}{Add listindexof and listcontains} % \DescribeMacro{\listindexof} % @@ -106,12 +107,14 @@ \newcommand{\listindexof}[2]{% \def\macrolist@listindex{0}% \macrolist@exists{#1}% - \def\macrolist@el{#2}% - \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{% - \ifx\macrolist@el\macrolist@listindexel - \xdef\macrolist@listindex{\macrolist@index}% - \fi - }% + \ifnum\listsize{#1}>0\relax + \def\macrolist@el{#2}% + \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{% + \ifx\macrolist@el\macrolist@listindexel + \xdef\macrolist@listindex{\macrolist@index}% + \fi + }% + \fi \macrolist@listindex% \let\macrolist@listindex\relax% } @@ -125,12 +128,14 @@ \newcommand{\listcontains}[4]{% \def\macrolist@listindex{0}% \macrolist@exists{#1}% - \def\macrolist@el{#2}% - \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{% - \ifx\macrolist@el\macrolist@listindexel - \xdef\macrolist@listindex{\macrolist@index}% - \fi - }% + \ifnum\listsize{#1}>0\relax + \def\macrolist@el{#2}% + \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{% + \ifx\macrolist@el\macrolist@listindexel + \xdef\macrolist@listindex{\macrolist@index}% + \fi + }% + \fi \ifnum\macrolist@listindex>0\relax #3% \else diff --git a/macros/latex/contrib/macrolist/macrolist.pdf b/macros/latex/contrib/macrolist/macrolist.pdf Binary files differindex 2ee450e2bc..204fa35c1c 100644 --- a/macros/latex/contrib/macrolist/macrolist.pdf +++ b/macros/latex/contrib/macrolist/macrolist.pdf |