texlive[59980] Master/texmf-dist: macrolist (18jul21)
commits+karl at tug.org
commits+karl at tug.org
Sun Jul 18 22:25:03 CEST 2021
Revision: 59980
http://tug.org/svn/texlive?view=revision&revision=59980
Author: karl
Date: 2021-07-18 22:25:02 +0200 (Sun, 18 Jul 2021)
Log Message:
-----------
macrolist (18jul21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/macrolist/README.md
trunk/Master/texmf-dist/doc/latex/macrolist/macrolist.pdf
trunk/Master/texmf-dist/source/latex/macrolist/macrolist.dtx
trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty
Modified: trunk/Master/texmf-dist/doc/latex/macrolist/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/macrolist/README.md 2021-07-18 20:24:49 UTC (rev 59979)
+++ trunk/Master/texmf-dist/doc/latex/macrolist/README.md 2021-07-18 20:25:02 UTC (rev 59980)
@@ -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 at gmail.com>
>
Modified: trunk/Master/texmf-dist/doc/latex/macrolist/macrolist.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/macrolist/macrolist.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/macrolist/macrolist.dtx 2021-07-18 20:24:49 UTC (rev 59979)
+++ trunk/Master/texmf-dist/source/latex/macrolist/macrolist.dtx 2021-07-18 20:25:02 UTC (rev 59980)
@@ -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 at foreachstart{0} % Reset
+{%
+ \def\macrolist at foreachstart{0}% Reset
% This is used to make optional arguments line up correctly
-
- \def\macrolist at start{1}
- \def\macrolist at end{\listsize{#1}}
- \def\macrolist at listname{#1}
- \def\macrolist at element{#2}
+%
+ \def\macrolist at start{1}%
+ \def\macrolist at end{\listsize{#1}}%
+ \def\macrolist at listname{#1}%
+ \def\macrolist at element{#2}%
\macrolist at listforeachi
}
-\newcommand{\macrolist at listforeachi}[1][]{
+\newcommand{\macrolist at listforeachi}[1][]{%
\if\relax\detokenize{#1}\relax
\else
- \def\macrolist at start{#1}
- \def\macrolist at foreachstart{1}
+ \def\macrolist at start{#1}%
+ \def\macrolist at foreachstart{1}%
\fi
\macrolist at listforeachii
}
-\newcommand{\macrolist at listforeachii}[1][]{
+\newcommand{\macrolist at listforeachii}[1][]{%
\if\relax\detokenize{#1}\relax
\ifnum\macrolist at foreachstart=1
\PackageError{macrolist}{You must either pass in both a starting and ending position or neither}{}
\fi
\else
- \def\macrolist at end{#1}
+ \def\macrolist at end{#1}%
\fi
\macrolist at listforeachaction
}
-\newcommand{\macrolist at listforeachaction}[1]{
-
- \macrolist at exists{\macrolist at listname}
-
+\newcommand{\macrolist at listforeachaction}[1]{%
+%
+ \macrolist at exists{\macrolist at listname}%
+%
\ifnum\numexpr\macrolist at start\relax>\listsize{\macrolist at listname}%
\PackageError{macrolist}{The starting index of the loop is out of the bounds of list '\macrolist at listname'}{}
\fi
-
+%
\ifnum\numexpr\macrolist at end\relax>\listsize{\macrolist at listname}
\PackageError{macrolist}{The ending index of the loop is out of the bounds of list '\macrolist at listname'}{}
\fi
-
+%
\foreach \macrolist at index in {\the\numexpr\macrolist at start\relax, ..., \the\numexpr\macrolist at end\relax} {%
\expandafter\expandafter\expandafter\let\expandafter\expandafter\macrolist at element\csname macrolist at list@\macrolist at listname\macrolist at index\endcsname
#1%
Modified: trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty 2021-07-18 20:24:49 UTC (rev 59979)
+++ trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty 2021-07-18 20:25:02 UTC (rev 59980)
@@ -86,49 +86,44 @@
\csname themacrolist at list@#1\endcsname
}
\newcommand{\listforeach}[2]
-{
- \def\macrolist at foreachstart{0} % Reset
+{%
+ \def\macrolist at foreachstart{0}% Reset
% This is used to make optional arguments line up correctly
-
- \def\macrolist at start{1}
- \def\macrolist at end{\listsize{#1}}
- \def\macrolist at listname{#1}
- \def\macrolist at element{#2}
+ \def\macrolist at start{1}%
+ \def\macrolist at end{\listsize{#1}}%
+ \def\macrolist at listname{#1}%
+ \def\macrolist at element{#2}%
\macrolist at listforeachi
}
-\newcommand{\macrolist at listforeachi}[1][]{
+\newcommand{\macrolist at listforeachi}[1][]{%
\if\relax\detokenize{#1}\relax
\else
- \def\macrolist at start{#1}
- \def\macrolist at foreachstart{1}
+ \def\macrolist at start{#1}%
+ \def\macrolist at foreachstart{1}%
\fi
\macrolist at listforeachii
}
-\newcommand{\macrolist at listforeachii}[1][]{
+\newcommand{\macrolist at listforeachii}[1][]{%
\if\relax\detokenize{#1}\relax
\ifnum\macrolist at foreachstart=1
\PackageError{macrolist}{You must either pass in both a starting and ending position or neither}{}
\fi
\else
- \def\macrolist at end{#1}
+ \def\macrolist at end{#1}%
\fi
\macrolist at listforeachaction
}
-\newcommand{\macrolist at listforeachaction}[1]{
-
- \macrolist at exists{\macrolist at listname}
-
+\newcommand{\macrolist at listforeachaction}[1]{%
+ \macrolist at exists{\macrolist at listname}%
\ifnum\numexpr\macrolist at start\relax>\listsize{\macrolist at listname}%
\PackageError{macrolist}{The starting index of the loop is out of the bounds of list '\macrolist at listname'}{}
\fi
-
\ifnum\numexpr\macrolist at end\relax>\listsize{\macrolist at listname}
\PackageError{macrolist}{The ending index of the loop is out of the bounds of list '\macrolist at listname'}{}
\fi
-
\foreach \macrolist at index in {\the\numexpr\macrolist at start\relax, ..., \the\numexpr\macrolist at end\relax} {%
\expandafter\expandafter\expandafter\let\expandafter\expandafter\macrolist at element\csname macrolist at list@\macrolist at listname\macrolist at index\endcsname
#1%
More information about the tex-live-commits
mailing list.