diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-18 20:25:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-18 20:25:02 +0000 |
commit | c4a74847d2193721779800f07394a4bc67f3cbe2 (patch) | |
tree | cc49f3e8687d59606c67bcd907734f7cd6c7805a | |
parent | 0ab1a48fc36a3cae860b6320503fd78bf46a9d6b (diff) |
macrolist (18jul21)
git-svn-id: svn://tug.org/texlive/trunk@59980 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/macrolist/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/macrolist/macrolist.pdf | bin | 183816 -> 188569 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/macrolist/macrolist.dtx | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/macrolist/macrolist.sty | 31 |
4 files changed, 36 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/latex/macrolist/README.md b/Master/texmf-dist/doc/latex/macrolist/README.md index 4386d5896f9..61ac3d679d7 100644 --- a/Master/texmf-dist/doc/latex/macrolist/README.md +++ b/Master/texmf-dist/doc/latex/macrolist/README.md @@ -1,4 +1,4 @@ -# The LaTeX package macrolist - version 1.0.1 (2021/07/16) +# The LaTeX package macrolist - version 1.0.2 (2021/07/17) > Copyright (C) 2021 Dennis Chen <proofprogram@gmail.com> > diff --git a/Master/texmf-dist/doc/latex/macrolist/macrolist.pdf b/Master/texmf-dist/doc/latex/macrolist/macrolist.pdf Binary files differindex fbeaa30a7e7..1f5be69f8bf 100644 --- a/Master/texmf-dist/doc/latex/macrolist/macrolist.pdf +++ b/Master/texmf-dist/doc/latex/macrolist/macrolist.pdf diff --git a/Master/texmf-dist/source/latex/macrolist/macrolist.dtx b/Master/texmf-dist/source/latex/macrolist/macrolist.dtx index beaadec98dc..7a564fc4485 100644 --- a/Master/texmf-dist/source/latex/macrolist/macrolist.dtx +++ b/Master/texmf-dist/source/latex/macrolist/macrolist.dtx @@ -30,9 +30,13 @@ \begin{document} \DocInput{macrolist.dtx} \PrintIndex + \PrintChanges \end{document} %</driver> % \fi +% +% \changes{v1.0.2}{2021/07/17}{Print changelog in documentation} +% \changes{v1.0.2}{2021/07/17}{Added comment markers to remove pars and fix spacing in listforeach} % \changes{v1.0.1}{2021/07/16}{Make a couple of defs and lets global to prevent scoping issues} % \changes{v1.0.1}{2021/07/16}{Add ``scope is always global'' to documentation} % \changes{v1.0.1}{2021/07/16}{Fix date in initial version changes entry} @@ -185,49 +189,49 @@ % % \iffalse \newcommand{\listforeach}[2] -{ - \def\macrolist@foreachstart{0} % Reset +{% + \def\macrolist@foreachstart{0}% Reset % This is used to make optional arguments line up correctly - - \def\macrolist@start{1} - \def\macrolist@end{\listsize{#1}} - \def\macrolist@listname{#1} - \def\macrolist@element{#2} +% + \def\macrolist@start{1}% + \def\macrolist@end{\listsize{#1}}% + \def\macrolist@listname{#1}% + \def\macrolist@element{#2}% \macrolist@listforeachi } -\newcommand{\macrolist@listforeachi}[1][]{ +\newcommand{\macrolist@listforeachi}[1][]{% \if\relax\detokenize{#1}\relax \else - \def\macrolist@start{#1} - \def\macrolist@foreachstart{1} + \def\macrolist@start{#1}% + \def\macrolist@foreachstart{1}% \fi \macrolist@listforeachii } -\newcommand{\macrolist@listforeachii}[1][]{ +\newcommand{\macrolist@listforeachii}[1][]{% \if\relax\detokenize{#1}\relax \ifnum\macrolist@foreachstart=1 \PackageError{macrolist}{You must either pass in both a starting and ending position or neither}{} \fi \else - \def\macrolist@end{#1} + \def\macrolist@end{#1}% \fi \macrolist@listforeachaction } -\newcommand{\macrolist@listforeachaction}[1]{ - - \macrolist@exists{\macrolist@listname} - +\newcommand{\macrolist@listforeachaction}[1]{% +% + \macrolist@exists{\macrolist@listname}% +% \ifnum\numexpr\macrolist@start\relax>\listsize{\macrolist@listname}% \PackageError{macrolist}{The starting index of the loop is out of the bounds of list '\macrolist@listname'}{} \fi - +% \ifnum\numexpr\macrolist@end\relax>\listsize{\macrolist@listname} \PackageError{macrolist}{The ending index of the loop is out of the bounds of list '\macrolist@listname'}{} \fi - +% \foreach \macrolist@index in {\the\numexpr\macrolist@start\relax, ..., \the\numexpr\macrolist@end\relax} {% \expandafter\expandafter\expandafter\let\expandafter\expandafter\macrolist@element\csname macrolist@list@\macrolist@listname\macrolist@index\endcsname #1% diff --git a/Master/texmf-dist/tex/latex/macrolist/macrolist.sty b/Master/texmf-dist/tex/latex/macrolist/macrolist.sty index 5d15abe6634..03cf5a54166 100644 --- a/Master/texmf-dist/tex/latex/macrolist/macrolist.sty +++ b/Master/texmf-dist/tex/latex/macrolist/macrolist.sty @@ -86,49 +86,44 @@ \csname themacrolist@list@#1\endcsname } \newcommand{\listforeach}[2] -{ - \def\macrolist@foreachstart{0} % Reset +{% + \def\macrolist@foreachstart{0}% Reset % This is used to make optional arguments line up correctly - - \def\macrolist@start{1} - \def\macrolist@end{\listsize{#1}} - \def\macrolist@listname{#1} - \def\macrolist@element{#2} + \def\macrolist@start{1}% + \def\macrolist@end{\listsize{#1}}% + \def\macrolist@listname{#1}% + \def\macrolist@element{#2}% \macrolist@listforeachi } -\newcommand{\macrolist@listforeachi}[1][]{ +\newcommand{\macrolist@listforeachi}[1][]{% \if\relax\detokenize{#1}\relax \else - \def\macrolist@start{#1} - \def\macrolist@foreachstart{1} + \def\macrolist@start{#1}% + \def\macrolist@foreachstart{1}% \fi \macrolist@listforeachii } -\newcommand{\macrolist@listforeachii}[1][]{ +\newcommand{\macrolist@listforeachii}[1][]{% \if\relax\detokenize{#1}\relax \ifnum\macrolist@foreachstart=1 \PackageError{macrolist}{You must either pass in both a starting and ending position or neither}{} \fi \else - \def\macrolist@end{#1} + \def\macrolist@end{#1}% \fi \macrolist@listforeachaction } -\newcommand{\macrolist@listforeachaction}[1]{ - - \macrolist@exists{\macrolist@listname} - +\newcommand{\macrolist@listforeachaction}[1]{% + \macrolist@exists{\macrolist@listname}% \ifnum\numexpr\macrolist@start\relax>\listsize{\macrolist@listname}% \PackageError{macrolist}{The starting index of the loop is out of the bounds of list '\macrolist@listname'}{} \fi - \ifnum\numexpr\macrolist@end\relax>\listsize{\macrolist@listname} \PackageError{macrolist}{The ending index of the loop is out of the bounds of list '\macrolist@listname'}{} \fi - \foreach \macrolist@index in {\the\numexpr\macrolist@start\relax, ..., \the\numexpr\macrolist@end\relax} {% \expandafter\expandafter\expandafter\let\expandafter\expandafter\macrolist@element\csname macrolist@list@\macrolist@listname\macrolist@index\endcsname #1% |