texlive[59960] Master/texmf-dist: macrolist (17jul21)

commits+karl at tug.org commits+karl at tug.org
Sat Jul 17 22:43:19 CEST 2021


Revision: 59960
          http://tug.org/svn/texlive?view=revision&revision=59960
Author:   karl
Date:     2021-07-17 22:43:19 +0200 (Sat, 17 Jul 2021)
Log Message:
-----------
macrolist (17jul21)

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-17 20:43:04 UTC (rev 59959)
+++ trunk/Master/texmf-dist/doc/latex/macrolist/README.md	2021-07-17 20:43:19 UTC (rev 59960)
@@ -1,4 +1,4 @@
-# The LaTeX package macrolist - version 1.0.0 (2021/07/12)
+# The LaTeX package macrolist - version 1.0.1 (2021/07/16)
 
 > 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-17 20:43:04 UTC (rev 59959)
+++ trunk/Master/texmf-dist/source/latex/macrolist/macrolist.dtx	2021-07-17 20:43:19 UTC (rev 59960)
@@ -16,7 +16,7 @@
 %<*package>
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{macrolist}[2021/07/09 v1.0.0 Create lists of macros and perform operations on them]
+\ProvidesPackage{macrolist}[2021/07/16 v1.0.1 Create lists of macros and perform operations on them]
 
 \RequirePackage{pgffor}
 %</package>
@@ -33,13 +33,17 @@
 \end{document}
 %</driver>
 % \fi
-% \changes{v1.0.0}{2021/07/01}{Initial version}
+% \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}
+% \changes{v1.0.1}{2021/07/16}{Fix v. appearing in front of date in document title}
+% \changes{v1.0.0}{2021/07/12}{Initial version}
 %
 % \GetFileInfo{macrolist.sty}
 %
 % \title{\textsf{macrolist} -- Create lists of macros and manipulate them}
 % \author{Dennis Chen \\ proofprogram at gmail.com}
-% \date{\fileversion, v. \filedate\thanks{\url{https://github/com/chennisden/macrolist}}}
+% \date{\fileversion, \filedate\thanks{\url{https://github/com/chennisden/macrolist}}}
 %
 % \maketitle
 %
@@ -49,6 +53,8 @@
 %
 % \section{Usage}
 %
+% The scope of lists is always global. This seems to provide the most
+%
 % \DescribeMacro{\newlist}
 % To create a list, pass in |\newlist{listname}| to create a list with the name \textsf{listname}.
 %
@@ -93,16 +99,16 @@
     \stepcounter{macrolist at list@\macrolist at currlist}
 
     \if\relax\detokenize{#1}\relax
-        \expandafter\def\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
+        \expandafter\gdef\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
     \else
         \expandafter\ifnum\csname themacrolist at list@\macrolist at currlist\endcsname=#1
-            \expandafter\def\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
+            \expandafter\gdef\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
         \else
             \macrolist at inbounds{\macrolist at currlist}{#1}
             \foreach \macrolist at index in {\listsize{\macrolist at currlist}, ...,\the\numexpr #1+1\relax} {
                 \global\expandafter\let\csname macrolist at list@\macrolist at currlist\macrolist at index\expandafter\endcsname\csname macrolist at list@\macrolist at currlist\the\numexpr\macrolist at index-1\relax\endcsname
             }
-            \expandafter\def\csname macrolist at list@\macrolist at currlist#1\endcsname{#2}
+            \expandafter\gdef\csname macrolist at list@\macrolist at currlist#1\endcsname{#2}
         \fi
     \fi
 }
@@ -123,7 +129,7 @@
         }
     \fi
 
-    \expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
+    \global\expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
     \addtocounter{macrolist at list@#1}{-1}
 }
 % \fi
@@ -135,7 +141,7 @@
 % \iffalse
 \newcommand{\listremovelast}[1]{
     \macrolist at exists{#1}
-    \expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
+    \global\expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
     \addtocounter{macrolist at list@#1}{-1}
 }
 % \fi
@@ -149,7 +155,7 @@
     \macrolist at inbounds{#1}{#2}
 
     \foreach \macrolist at index in {1, ..., \listsize{#1}} {
-        \expandafter\let\csname \macrolist at list@#1\macrolist at index\endcsname\relax
+        \global\expandafter\let\csname \macrolist at list@#1\macrolist at index\endcsname\relax
     }
 
     \setcounter{macrolist at list@#1}{0}

Modified: trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty	2021-07-17 20:43:04 UTC (rev 59959)
+++ trunk/Master/texmf-dist/tex/latex/macrolist/macrolist.sty	2021-07-17 20:43:19 UTC (rev 59960)
@@ -15,7 +15,7 @@
 %% version 2005/12/01 or later.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{macrolist}[2021/07/09 v1.0.0 Create lists of macros and perform operations on them]
+\ProvidesPackage{macrolist}[2021/07/16 v1.0.1 Create lists of macros and perform operations on them]
 
 \RequirePackage{pgffor}
 
@@ -41,16 +41,16 @@
     \stepcounter{macrolist at list@\macrolist at currlist}
 
     \if\relax\detokenize{#1}\relax
-        \expandafter\def\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
+        \expandafter\gdef\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
     \else
         \expandafter\ifnum\csname themacrolist at list@\macrolist at currlist\endcsname=#1
-            \expandafter\def\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
+            \expandafter\gdef\csname macrolist at list@\macrolist at currlist\listsize{\macrolist at currlist}\endcsname{#2}
         \else
             \macrolist at inbounds{\macrolist at currlist}{#1}
             \foreach \macrolist at index in {\listsize{\macrolist at currlist}, ...,\the\numexpr #1+1\relax} {
                 \global\expandafter\let\csname macrolist at list@\macrolist at currlist\macrolist at index\expandafter\endcsname\csname macrolist at list@\macrolist at currlist\the\numexpr\macrolist at index-1\relax\endcsname
             }
-            \expandafter\def\csname macrolist at list@\macrolist at currlist#1\endcsname{#2}
+            \expandafter\gdef\csname macrolist at list@\macrolist at currlist#1\endcsname{#2}
         \fi
     \fi
 }
@@ -64,12 +64,12 @@
         }
     \fi
 
-    \expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
+    \global\expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
     \addtocounter{macrolist at list@#1}{-1}
 }
 \newcommand{\listremovelast}[1]{
     \macrolist at exists{#1}
-    \expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
+    \global\expandafter\let\csname macrolist at list@#1\listsize{#1}\endcsname\relax
     \addtocounter{macrolist at list@#1}{-1}
 }
 \newcommand{\listclear}[2]{
@@ -76,7 +76,7 @@
     \macrolist at inbounds{#1}{#2}
 
     \foreach \macrolist at index in {1, ..., \listsize{#1}} {
-        \expandafter\let\csname \macrolist at list@#1\macrolist at index\endcsname\relax
+        \global\expandafter\let\csname \macrolist at list@#1\macrolist at index\endcsname\relax
     }
 
     \setcounter{macrolist at list@#1}{0}



More information about the tex-live-commits mailing list.