texlive[70690] trunk: memoize (18mar24)

commits+karl at tug.org commits+karl at tug.org
Mon Mar 18 20:59:51 CET 2024


Revision: 70690
          https://tug.org/svn/texlive?view=revision&revision=70690
Author:   karl
Date:     2024-03-18 20:59:51 +0100 (Mon, 18 Mar 2024)
Log Message:
-----------
memoize (18mar24)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.pl
    trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.py
    trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.pl
    trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.py
    trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
    trunk/Master/texmf-dist/doc/generic/memoize/CHANGELOG.md
    trunk/Master/texmf-dist/doc/generic/memoize/FILES
    trunk/Master/texmf-dist/doc/generic/memoize/examples-src.zip
    trunk/Master/texmf-dist/doc/generic/memoize/examples.zip
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-clean.1.md
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-code.pdf
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-code.sty
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc-common.sty
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.pdf
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.sty
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.tex
    trunk/Master/texmf-dist/doc/generic/memoize/memoize-extract.1.md
    trunk/Master/texmf-dist/doc/man/man1/memoize-clean.1
    trunk/Master/texmf-dist/doc/man/man1/memoize-clean.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/memoize-clean.pl.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/memoize-clean.py.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/memoize-extract.1
    trunk/Master/texmf-dist/doc/man/man1/memoize-extract.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/memoize-extract.pl.man1.pdf
    trunk/Master/texmf-dist/doc/man/man1/memoize-extract.py.man1.pdf
    trunk/Master/texmf-dist/scripts/memoize/memoize-clean.pl
    trunk/Master/texmf-dist/scripts/memoize/memoize-clean.py
    trunk/Master/texmf-dist/scripts/memoize/memoize-extract.pl
    trunk/Master/texmf-dist/scripts/memoize/memoize-extract.py
    trunk/Master/texmf-dist/source/generic/memoize/Makefile
    trunk/Master/texmf-dist/source/generic/memoize/memoize.edtx
    trunk/Master/texmf-dist/source/generic/memoize/memoize.ins
    trunk/Master/texmf-dist/tex/context/third/memoize/t-memoizable.tex
    trunk/Master/texmf-dist/tex/context/third/memoize/t-memoize.tex
    trunk/Master/texmf-dist/tex/context/third/memoize/t-nomemoize.tex
    trunk/Master/texmf-dist/tex/latex/memoize/memoizable.sty
    trunk/Master/texmf-dist/tex/latex/memoize/memoize.sty
    trunk/Master/texmf-dist/tex/latex/memoize/nomemoize.sty
    trunk/Master/texmf-dist/tex/plain/memoize/memoizable.tex
    trunk/Master/texmf-dist/tex/plain/memoize/memoize.tex

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/memoize/memoize-biblatex.code.tex

Modified: trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.pl	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.pl	2024-03-18 19:59:51 UTC (rev 70690)
@@ -19,7 +19,7 @@
 # <texmf>/doc/generic/memoize/FILES.
 
 my $PROG = 'memoize-clean.pl';
-my $VERSION = '2024/01/21 v1.1.2';
+my $VERSION = '2024/03/15 v1.2.0';
 
 use strict;
 use Getopt::Long;

Modified: trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.py
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.py	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-clean.py	2024-03-18 19:59:51 UTC (rev 70690)
@@ -18,7 +18,7 @@
 # The files belonging to this work and covered by LPPL are listed in
 # <texmf>/doc/generic/memoize/FILES.
 
-__version__ = '2024/01/21 v1.1.2'
+__version__ = '2024/03/15 v1.2.0'
 
 import argparse, re, sys, pathlib, os
 

Modified: trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.pl	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.pl	2024-03-18 19:59:51 UTC (rev 70690)
@@ -19,7 +19,7 @@
 # <texmf>/doc/generic/memoize/FILES.
 
 my $PROG = 'memoize-extract.pl';
-my $VERSION = '2024/01/21 v1.1.2';
+my $VERSION = '2024/03/15 v1.2.0';
 
 use strict;
 use File::Basename qw/basename/;

Modified: trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.py
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.py	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Build/source/texk/texlive/linked_scripts/memoize/memoize-extract.py	2024-03-18 19:59:51 UTC (rev 70690)
@@ -18,7 +18,7 @@
 # The files belonging to this work and covered by LPPL are listed in
 # <texmf>/doc/generic/memoize/FILES.
 
-__version__ = '2024/01/21 v1.1.2'
+__version__ = '2024/03/15 v1.2.0'
 
 import argparse, re, sys, os, subprocess, itertools, traceback, platform
 from pathlib import Path, PurePath

Modified: trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl	2024-03-18 19:59:51 UTC (rev 70690)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-# $Id: tlmgr.pl 70080 2024-02-22 23:13:07Z karl $
+# $Id: tlmgr.pl 70671 2024-03-17 01:10:09Z karl $
 # Copyright 2008-2024 Norbert Preining
 # This file is licensed under the GNU General Public License version 2
 # or any later version.
@@ -8,8 +8,8 @@
 
 use strict; use warnings;
 
-my $svnrev = '$Revision: 70080 $';
-my $datrev = '$Date: 2024-02-23 00:13:07 +0100 (Fri, 23 Feb 2024) $';
+my $svnrev = '$Revision: 70671 $';
+my $datrev = '$Date: 2024-03-17 02:10:09 +0100 (Sun, 17 Mar 2024) $';
 my $tlmgrrevision;
 my $tlmgrversion;
 my $prg;
@@ -5044,10 +5044,10 @@
         print "    $a\n";
       }
     }
-    print "Already installed platforms are marked with (i)\n";
-    print "You can add new platforms with: tlmgr platform add PLAT1 PLAT2...\n";
-    print "You can remove platforms with: tlmgr platform remove PLAT1 PLAT2...\n";
-    print "You can set the active platform with: tlmgr platform set PLAT\n";
+    print "Already installed platforms are marked with (i).\n";
+    print "Add new platforms with: tlmgr platform add PLAT1 PLAT2...\n";
+    print "Remove platforms with:  tlmgr platform remove PLAT1 PLAT2...\n";
+    print "Set the active platform with: tlmgr platform set PLAT\n";
     return ($F_OK | $F_NOPOSTACTION);
 
   } elsif ($what =~ m/^add$/i) {
@@ -5082,7 +5082,8 @@
                 }
               }
             } else {
-              tlwarn("$prg: action platform add, cannot find package $pkg.$a\n");
+              tlwarn("$prg: action platform add: package $pkg does not exist",
+                     " for platform: $a\n");
               $ret |= $F_WARNING;
             }
           }
@@ -10552,7 +10553,7 @@
 distribution (L<https://tug.org/texlive>) and both are licensed under the
 GNU General Public License Version 2 or later.
 
-$Id: tlmgr.pl 70080 2024-02-22 23:13:07Z karl $
+$Id: tlmgr.pl 70671 2024-03-17 01:10:09Z karl $
 =cut
 
 # test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html

Modified: trunk/Master/texmf-dist/doc/generic/memoize/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/CHANGELOG.md	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/CHANGELOG.md	2024-03-18 19:59:51 UTC (rev 70690)
@@ -3,6 +3,28 @@
 For the development history, see [Memoize's GitHub
 repository](https://github.com/sasozivanovic/memoize).
 
+## 2024/03/15 v1.2.0
+
+* Biblatex support:
+  * Allow for entries containing verbatim material.
+  * Support `\volcite` commands.
+  * Implement `biblatex ccmemo cite`.
+  * Submit all known citation commands to `auto`-keys `(vol)cite(s)`.
+	* The support must be explicitly loaded by `\mmzset{biblatex}`.
+* Minor changes:
+	* Separate generic PGF support out of TikZ support.
+	* Support `latexmk`.
+	* Drop the obsolete workaround for package `morewrites`.
+	* Clear Memoize's `begindocument` hooks after executing them.
+* Documentation:
+  * Introduce section "Support for specific classes and packages".
+  * Improve the documentation of argument specification accepted by CollArgs'
+		command `\CollectArguments` and Advice's key `args`, in particular with
+		reference to the fact that since 2020, the functionality of package
+		`xparse` is mostly integrated into the LaTeX kernel.
+	* Add a note about `TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL`.
+	* Various minor changes.
+	
 ## 2024/01/21 v1.1.2
 
 * Fix a bug in Biblatex support.

Modified: trunk/Master/texmf-dist/doc/generic/memoize/FILES
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/FILES	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/FILES	2024-03-18 19:59:51 UTC (rev 70690)
@@ -29,6 +29,7 @@
 tex/latex/memoize/memoize.sty
 tex/latex/memoize/memoizable.sty
 tex/latex/memoize/nomemoize.sty
+tex/latex/memoize/memoize-biblatex.code.tex
 tex/context/third/memoize/t-nomemoize.tex
 tex/context/third/memoize/t-memoizable.tex
 tex/context/third/memoize/t-memoize.tex

Modified: trunk/Master/texmf-dist/doc/generic/memoize/examples-src.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/memoize/examples.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-clean.1.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/memoize-clean.1.md	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/memoize-clean.1.md	2024-03-18 19:59:51 UTC (rev 70690)
@@ -2,8 +2,8 @@
 title: memoize-clean
 section: 1
 header: User Manual
-footer: memoize-clean of Memoize v1.1.2
-date: January 21, 2024
+footer: memoize-clean of Memoize v1.2.0
+date: March 15, 2024
 hyphenate: false
 ---
 

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-code.sty
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/memoize-code.sty	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/memoize-code.sty	2024-03-18 19:59:51 UTC (rev 70690)
@@ -22,6 +22,9 @@
 \ProvidesPackage{memoize-code}
 \RequirePackage{memoize-doc-common}
 
+\def\TikZ;{{\upshape Ti\textit{k}Z}}
+\def\PGF;{PGF}
+
 % Typesetting the code & indentation
 %\MacroIndent=0pt
 \AddToHook{begindocument}{\MacroIndent=0pt }

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc-common.sty
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc-common.sty	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc-common.sty	2024-03-18 19:59:51 UTC (rev 70690)
@@ -144,8 +144,6 @@
 % various %
 
 \usepackage{hologo}
-\def\TikZ;{{\rm Ti\emph{k}Z}}
-\def\PGF;{PGF}
 \newcommand\PGFmanual[1]{%
   \href
     {http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf}

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.sty
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.sty	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.sty	2024-03-18 19:59:51 UTC (rev 70690)
@@ -391,6 +391,7 @@
 
 \newcommand\therefore{\ensuremath{\Rightarrow}}
 \newcommand\nohyphen{\discretionary{}{}{}}
+\hyphenation{Coll-Args}
 \let\gobble\@gobble
 
 \lstset{
@@ -506,7 +507,9 @@
 \newcommand\code[1]{\texttt{\spaceskip 0.5em plus 0.2em minus 0.2em #1}}
 \newcommand\Arg[1]{\texttt{\##1}}
 
-\def\TikZ{\href{https://ctan.org/pkg/pgf}{{\rm Ti\emph{k}Z}}\xspace}
+\NewDocumentCommand{\TikZ}{s}{%
+  \IfBooleanF{#1}{\href{https://ctan.org/pkg/pgf}}{{\upshape Ti\textit{k}Z}}\xspace
+}
 \def\PGF{\href{https://ctan.org/pkg/pgf}{PGF}\xspace}
 \def\Emacs{\href{https://www.gnu.org/software/emacs}{Emacs}\xspace}
 \def\AucTeX{\href{https://www.gnu.org/software/auctex}{AUC\hologo{TeX}}\xspace}
@@ -701,7 +704,14 @@
 \newcommand\noprint[1]{\setbox0=\hbox{#1}}
 \usepackage{wrapfig}
 
+\newcommand\footnoteagain[1]{%
+  \def\@thefnmark{\ref{#1}}%
+  \@footnotemark
+}%
 
+\usepackage{varioref}
+
+
 % \usepackage{caption}
 % \captionsetup{labelformat=empty}
 

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.tex	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/memoize-doc.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -32,7 +32,7 @@
 \usepackage{makeidx}
 \pdfsystem{makeindex -s memoize-doc.mst \jobname.idx}
 \makeindex
-\usepackage[hangindent=1em,justific=raggedright,font=small]{idxlayout}
+\usepackage[hangindent=1em,justific=raggedright,font=small,totoc]{idxlayout}
 \appto\indexfont{\def\pkgcolor{gray}}
 
 \AddToHook{begindocument}{% so that the region compilation takes these in
@@ -100,6 +100,10 @@
       cmd={name=tikzexternalize},
       cmd={name=pgfsys at getposition},
     },
+    scope={
+      pkg=beamer,
+      env={name=frame},
+    },
     file={name=texmf.cnf},
     env={name=tcblisting, pkg=tcolorbox},
     cmd={name=vref, pkg=varioref},
@@ -384,7 +388,7 @@
   Package Advice implements a generic framework for extending the functionality
   of selected commands and environments, while package CollArgs provides a
   command which can determine the argument scope of any command whose argument
-  structure conforms to \pkg{xparse}'s argument specification.
+  structure conforms to \hologo{LaTeX3} argument specification.
 \end{tcolorbox}
 
 \begin{tcolorbox}[
@@ -478,7 +482,8 @@
 already installed on your system.  On Windows, you might have to install it. I
 tested Memoize with Strawberry Perl, available
 at \url(https://){strawberryperl.com}; see \url(https://){www.perl.org} for
-other options.
+other options.  On \hologo{TeX}Live on Windows, you should also set
+\code{TEXLIVE\_WINDOWS\_TRY\_EXTERNAL\_PERL=1}.
 
 \begin{wrapfigure}[2]{r}{0.25\linewidth}
   \raisebox{0.5mm}[\dimexpr\height-0.5mm][\depth]{%
@@ -895,18 +900,17 @@
 their argument structure, which we achieve using key \refmmzauto{args} in the
 second argument of key \refmmz{auto}:
 \EmphTT{\refmmz{auto}=\meta{command}\braces{\refmmzauto{memoize},
-    \refmmzauto{args}=\marg{argument specification}}}.  We can only leave out
-\refmmzauto{args} if the command was defined by \refcmd{NewDocumentCommand} or
-similar; in this case, Memoize can retrieve the argument specification on its
-own.
+    \refmmzauto{args}=\marg{argument specification}}}.
 
 And how does the \meta{argument specification} look like?  It is a sequence of
 letters, each letter determining an argument type.  Memoize recognizes the same
-argument types and their letters as package \pkg{xparse} (which defines
-\refcmd{NewDocumentCommand} and friends), so you should look at (section 1 of)
-the documentation of that package for details, if and when you need them.
-Here, we focus on the two most commonly used types, \docref{xparse:m} and \docref{xparse:o}, and add the
-optional star for good measure:
+argument types as \refcmd{NewDocumentCommand}, the \hologo{LaTeX3} command for
+defining new commands, available in core \hologo{LaTeX} since 2020.  For
+the complete story, see the reference for \refmmzauto{args} in
+section~\ref{sec:ref:advice} and the frame on page~\pageref{tab:argspec} in
+section~\ref{sec:ref:collargs}; here, we focus on the two most commonly used
+types, \docref{xparse:m} and \docref{xparse:o}, and add the optional star for
+good measure:
 \begin{center}
   \begin{tabular}{lll}
     \toprule
@@ -935,14 +939,18 @@
   },
 }
 
+If the command we're submitting to automemoization was defined by
+\refcmd{NewDocumentCommand} or similar, \refmmzauto{args} may be omitted, as in
+this case, Memoize can retrieve the argument specification on its own.
+
 This should get you started with automemoization.  We'll provide some further
 basic information in sections~\ref{sec:tut:working-on-a-picture}
 and~\ref{sec:tut:verbatim} of the tutorial, but only package writers will
 probably ever need the gory details from
 section~\ref{sec:tut:automemoization-details}.  It is my sincere hope that they
-will support Memoize in their packages, where necessary, so that you don't even
-have to write the \refmmz{auto} declarations, but there is one thing you should
-know if you encounter a package supporting Memoize: you should load it
+will support Memoize in their packages, where necessary, so that you don't ever
+have to write the \refmmz{auto} declarations.  However, there is one thing you
+should know if you encounter a package supporting Memoize: you should load it
 \emph{after} Memoize!
 
 
@@ -4332,7 +4340,8 @@
 package Advice, which provides a generic framework for extending the
 functionality of selected commands and environments, and package CollArgs,
 which provides a command for collection of the arguments conforming to the
-given (slightly extended) \pkg{xparse} argument specification.
+given (slightly extended) \hologo{LaTeX3}\slash \pkg{xparse} argument
+specification.
 
 This section lists the considerations which went into designing the system,
 followed by short tutorials on both auxiliary packages, which include several
@@ -4369,7 +4378,7 @@
 package writer) will need to tell Memoize about the argument structure of the
 command.  And as there is already a nice and general argument specification on
 the market --- I'm obviously referring to the argument specification of package
-\pkg{xparse}, which was recently even integrated into the core \hologo{LaTeX}
+\pkg{xparse}, which was recently integrated into the core \hologo{LaTeX}
 --- why not use that?  Memoize comes with an auxiliary package CollArgs, which
 (given the slightly extended \pkg{xparse}-style argument specification)
 collects the arguments of a command into a single entity.  All the user needs
@@ -4376,7 +4385,7 @@
 to write to enable automemoization for a command is thus
 \refmmz{auto}|=|\meta{command}\braces{\refmmzauto{memoize},
   \refmmzauto{args}|=|\braces{\meta{argument specification}}}.  Even simpler,
-when it comes to commands defined by \pkg{xparse}'s \refcmd{NewDocumentCommand}
+when it comes to commands defined by \hologo{LaTeX3}'s \refcmd{NewDocumentCommand}
 or friends, writing \refmmz{auto}|=|\meta{command}\braces{\refmmzauto{memoize}}
 will suffice, as the argument specification of these commands can be retrieved
 by \refcmd{GetDocumentCommandArgSpec}.
@@ -4685,8 +4694,7 @@
 example, Memoize submits \refcmd{tikz} to automemoization by loading
 \reffile{advice-tikz.code.tex}, which contains Advice's definition of the
 \cs{tikz} collector \refcmd{AdviceCollectTikZArguments}, and issuing the
-following declaration.\footnote{This is a simplification, see
-  \refmmzauto{memoize tikz} for the full story.}
+following declaration.
 
 \begin{tcblisting}{
     example title={Declaring automemoization of command \cs{tikz}},
@@ -4781,8 +4789,8 @@
 \paragraph{A simple collector}
 
 Let us implement a collector for a command which accepts one (standard
-\hologo{LaTeX}) optional argument and one mandatory argument; in \pkg{xparse}
-terms, a command with argument specification |om|.
+\hologo{LaTeX}) optional argument and one mandatory argument; in
+\hologo{LaTeX3} terms, a command with argument specification |om|.
 
 Using \cs{NewDocumentCommand}, such a collector is very easy to implement.  We
 simply define a command with signature |om| and distinguish two possibilities
@@ -4842,7 +4850,8 @@
 \refcmd{CollectArgumentsRaw}; we'll focus on the former first.
 \refcmd{CollectArguments} takes three arguments: optional \meta{options} in the
 form of a \pkg{pgfkeys} keylist; a mandatory \meta{argument specification} in a
-(slightly extended) \pkg{xparse} format; and the \meta{next-code}:
+(slightly extended) \hologo{LaTeX3}\slash\pkg{xparse} format; and the
+\meta{next-code}:
 \begin{center}
   \refcmd{CollectArguments}\oarg{options}\marg{argument specification}\marg{next-code}%
   \textcolor{gray}{\meta{tokens}}
@@ -4891,27 +4900,28 @@
 of |\PrintAndDo| that |\makebox| is ``reunited'' with its arguments, but note
 that the reunion is far from obligatory.
 
-CollArgs supports all the argument types (and modifiers) that \pkg{xparse}
-does, including the environment type \docref{xparse:b}, as exemplified below.
-Again, the code below might seem strange, as it features an |\end{minipage}|
-without the matching |\begin{minipage}|, but the logic is similar as for
-  commands: just as \refcmd{CollectArguments} occurs in front of the command
-  arguments, without the command itself, so it occurs in front of the
-  environment body, without the opening of that body.  However, while
-  \refcmd{CollectArguments} never needs to know the command name, we need to
-  inform it of the environment name, so that it can find the end of the
-  environment.  This can be achieved as shown below, using key
-  \refcollargs{environment} in the optional argument of the command, or by our
-  extension to the \pkg{xparse} argument specification, where the environment
-  argument type \docref{xparse:b} may be followed by a braced environment name.
-  In the example below, we could therefore also invoke argument collection by
-  \refcmd{CollectArguments}\braces
-  {\docref{xparse:+}\docref{xparse:b}\braces{\env{minipage}}} (we have preceded
-  \docref{xparse:b} with a \docref{xparse:+} to allow for an environment body
-  containing paragraph tokens).\footnote{CollArgs automatically adapts to the
-    format, i.e.\ it knows that environments are tagged by \cs{}\meta{name} and
-    \cs{end}\meta{name} in \hologo{plainTeX} and by \cs{start}\meta{name} and
-    \cs{stop}\meta{name} in \hologo{ConTeXt}.}
+CollArgs supports all the argument types (and modifiers) that \hologo{LaTeX3}
+does, complete with the uncommon\slash historical types only available upon
+loading package \pkg{xparse}.  Below, we provide an example of the environment
+type \docref{xparse:b}.  Again, the code might seem strange, as it features an
+|\end{minipage}| without the matching |\begin{minipage}|, but the logic is
+similar as for commands: just as \refcmd{CollectArguments} occurs in front of
+the command arguments, without the command itself, so it occurs in front of the
+environment body, without the opening of that body.  However, while
+\refcmd{CollectArguments} never needs to know the command name, we need to
+inform it of the environment name, so that it can find the end of the
+environment.  This can be achieved as shown below, using key
+\refcollargs{environment} in the optional argument of the command, or by our
+extension to the \hologo{LaTeX3}\slash\pkg{xparse} argument specification,
+where the environment argument type \docref{xparse:b} may be followed by a
+braced environment name.  In the example below, we could therefore also invoke
+argument collection by \refcmd{CollectArguments}\braces
+{\docref{xparse:+}\docref{xparse:b}\braces{\env{minipage}}} (we have preceded
+\docref{xparse:b} with a \docref{xparse:+} to allow for an environment body
+containing paragraph tokens).\footnote{CollArgs automatically adapts to the
+  format, i.e.\ it knows that environments are tagged by \cs{}\meta{name} and
+  \cs{end}\meta{name} in \hologo{plainTeX} and by \cs{start}\meta{name} and
+  \cs{stop}\meta{name} in \hologo{ConTeXt}.}
 
 \ExampleName{collargs-minipage}
 \makeexample{\examplename.tex.c1}
@@ -4927,7 +4937,7 @@
 grabbing the optional argument, maybe, then the mandatory argument, and finally
 the argument body.
 
-\refcmd{CollectArguments} not only supports \pkg{xparse}'s verbatim argument
+\refcmd{CollectArguments} not only supports the verbatim argument
 type \docref{xparse:v}, it can grab an argument of \emph{any} type in the
 verbatim mode, triggered by option \refcollargs{verbatim}.\footnote{We refer to
   the verbatim mode triggered by \refcollargs{verbatim} as the full verbatim
@@ -4948,12 +4958,12 @@
 \makeexample{\examplename.tex.c1}
 \tcbinputexample{listing and compile}
 
-Finally, CollArgs extends the \pkg{xparse} specification by modifier
-\docref{xparse:amp}, which allows the user to specify options which apply only
-to the following argument, as opposed to the options given as the optional
-argument of \refcmd{CollectArguments}, which apply to all the arguments.  A
-third way to invoke the environment body collection in the above example is
-thus \refcmd{CollectArguments}%
+Finally, CollArgs extends the \hologo{LaTeX3}\slash\pkg{xparse} specification
+by modifier \docref{xparse:amp}, which allows the user to specify options which
+apply only to the following argument, as opposed to the options given as the
+optional argument of \refcmd{CollectArguments}, which apply to all the
+arguments.  A third way to invoke the environment body collection in the above
+example is thus \refcmd{CollectArguments}%
 \bracestt{\docref{xparse:amp}\bracestt{\refcollargs{environment}=minipage}+b}.
 
 Both the single-argument and the common options can be given not only as
@@ -5585,12 +5595,6 @@
   likely have no need of these macros.
 \end{doc}
 
-\begin{doc}{easy, key={name=per overlay,desc=style}}
-  This style is only defined in the Beamer class.  When applied, the memoized
-  code will produce a cc-memo (and extern) for each overlay of the frame.  For
-  implementation, see section~\ref{sec:per-overlay}.
-\end{doc}
-
 \begin{doc}{
     key={name=capture, par=\docAux{of=key:/mmz/capture, value={name=hbox}, text=\alt,
       value={name=vbox,of=key:/mmz/capture}},
@@ -7447,7 +7451,7 @@
 
 \begin{doc}{
     key={name=outer handler,par=\meta{\hologo{TeX} code},
-      desc=initially and default: see below},
+      desc=initially and default: \refcmd{AdviceCollector}},
   }
 
   This key declares the \meta{\hologo{TeX} code} as the outer handler component
@@ -7484,7 +7488,7 @@
   \emph{not} collected before invoking the outer handler --- in fact, avoiding
   the argument collection is the raison d'être of the outer handler!  (In the case
   of an advised environment, the environment body can be seen as an argument of
-  \pkg{xparse} type \docref{xparse:+}\docref{xparse:b}.)
+  \hologo{LaTeX3} type \docref{xparse:+}\docref{xparse:b}.)
   
   The outer handler (and any other component of the advice it invokes) has
   access to the following auxiliary macros, defined by the framework:
@@ -7505,8 +7509,7 @@
     more practical.)
   \end{itemize}
 
-  This key is initially set to an internal control sequence which merely
-  invokes the collector by executing \refcmd{AdviceCollector}; in other words,
+  This key is initially set to \refcmd{AdviceCollector}; in other words,
   the initial outer handler leaves all the work to the collector and the inner
   handler.  There is no need to specifically set up the outer handler when
   using the inner handler. Executing this key without a value restores it to
@@ -7534,7 +7537,7 @@
   While this manual occasionally states that the initial argument collector is
   \refcmd{CollectArguments} of package CollArgs, this is, if we're precise,
   incorrect on two counts.  For one, the initial collector is not a CollArgs
-  command, but a macro which acts as the ``bridge'' between Advice
+  command, but an internal macro which acts as the ``bridge'' between Advice
   and CollArgs. Second, the initial collector does not really invoke
   \refcmd{CollectArguments}, but its cousin, \refcmd{CollectArgumentsRaw},
   which allows Advice (and Memoize) to fine tune its behaviour
@@ -7573,74 +7576,48 @@
 
   This key describes the \meta{argument specification} of the advised command.
 
-  Assuming that the initial value of \refmmzauto{collector} has not been
-  modified, the given \meta{argument specification} is eventually interpreted
-  by command \refcmd{CollectArguments} of package CollArgs, which expects an
-  argument specification in the format specified by package \pkg{xparse}; the
-  format is summarized in the frame below for convenience, for details, see the
-  \pkg{xparse} manual.  If the specification is not given, the initial collector
-  assumes that the advised command was defined using \refcmd{NewDocumentCommand}
-  (or similar) of package \pkg{xparse}, and will attempt to retrieve the argument
-  specification automatically via \refcmd{GetDocumentCommandArgSpec}.
+  The value of this key is intended to be interpreted by the
+  \refmmzauto{collector}.  Assuming this key retained its initial value, the
+  given \meta{argument specification} is eventually interpreted by command
+  \refcmd{CollectArguments} of package CollArgs, which expects an argument
+  specification in the format specified by \hologo{LaTeX3}, also allowing for
+  the uncommon\slash historical types only defined upon loading package
+  \pkg{xparse}, and several CollArgs-specific extensions.  For further
+  information, see the following sources:
+  \begin{itemize}
+  \item The \hologo{LaTeX3} version
+    of \href{https://www.latex-project.org/help/documentation/usrguide.pdf}
+    {``\LaTeX\ for authors''} documents the standard argument types.
+  \item The \pkg{xparse} manual additionally documents the uncommon\slash
+    historical types only available upon loading package \pkg{xparse}.
+  \item CollArgs extensions are documented in section~\ref{sec:ref:collargs}.
+  \item For convenience, the entire \hologo{LaTeX3} argument specification
+    format, complete with \pkg{xparse} and CollArgs extensions, is summarized
+    in the frame on page~\pageref{tab:argspec} in
+    section~\ref{sec:ref:collargs}.
+  \end{itemize}
+
+  If \meta{argument specification} is not provided, the initial collector
+  assumes that the advised command was defined using \hologo{LaTeX3}'s
+  \refcmd{NewDocumentCommand} (or similar), and will attempt to retrieve the
+  argument specification automatically.\footnote{The automatic retrieval
+    deploys command \refcmd{GetDocumentCommandArgSpec} of package \pkg{xparse},
+    which is the sole reason that Advice loads this package in \hologo{LaTeX}.}
   
-  \begin{tcolorbox}[float, before float=\hfill,
-      title={The {\pkg[white]{xparse}} argument specification
-        (as understood by \refcmd[link color=white]{CollectArguments})}]
-    \begin{tabularx}{\linewidth}{>{\tt}lX}
-      \multicolumn{2}{l}{\rm\textbf{Mandatory argument types}}\\
-      m&standard (a single token or multiple tokens in braces)\\
-      r\meta{token$_1$}\meta{token$_2$}&delimited by 
-                                         \meta{token$_1$} and \meta{token$_2$} \\
-      v&verbatim, in the style of \cs{verb}\\
-      b&the body of an environment\\
-      [1ex]\multicolumn{2}{l}{\rm\textbf{Optional argument types}}\\
-      o&in square brackets\\
-      d\meta{token$_1$}\meta{token$_2$}&delimited by
-                                         \meta{token$_1$} and \meta{token$_2$}\\
-      s&an optional star\\
-      t\meta{token}&an optional \meta{token}\\
-      e\marg{tokens}&a set of embellishments\\
-      [1ex]\multicolumn{2}{l}{\rm\textbf{Weird argument types}}\\
-      l&a mandatory argument until the first begin-group token\\
-      u\marg{tokens}&\hologo{TeX}'s delimited argument\\
-      g&an optional argument inside braces\\
-      [1ex]\multicolumn{2}{l}{\rm\textbf{Modifiers}}\\
-      +&allow the next argument to be long\\
-      !&disallow spaces before arguments of type \docref{xparse:d} and \docref{xparse:t}\\
-      >\marg{processor}&process the next argument\\
-      [1ex]\multicolumn{2}{l}{\rm\textbf{CollArgs extensions}}\\
-      \docref{xparse:b}\marg{name}&set the environment name for this environment\\
-      \docref{xparse:amp}\marg{options}&apply CollArgs options to the next argument\\
-      \docref{xparse:amp}\docref{xparse:amp}\marg{raw options}&apply raw CollArgs options to the next argument\\
-    \end{tabularx}
-
-    \smallskip
-    
-    \refcmd{CollectArguments} can grab an argument of any type in the
-    \refcollargs{verbatim} mode.
-    
-    As \refcmd{CollectArguments} does not use the arguments but only collects
-    them, it does not care about the default values of optional arguments.
-    Therefore, argument types with defaults (\docref{xparse:O},
-    \docref{xparse:D} and \docref{xparse:R}) may be substituted by their
-    \texttt{-NoValue-} counterparts (\docref{xparse:o}, \docref{xparse:d} and
-    \docref{xparse:r}) and are therefore not included in the above table.
-  \end{tcolorbox}
-
-  In general, however, an argument collector may this interpret this setting it
+  In general, however, an argument collector may this interpret this setting 
   in any way it sees fit --- or not at all.  For example, in Memoize the value
   of \refmmzauto{args} is ignored for command \refcmd{tikz}, which requires a special
   collector (\refcmd{mmzCollectTikZArguments}).
   
-  When setting up advice for a \emph{command}, this key is initially
-  ``unset,'' i.e.\ it holds a special value indicating that the argument
-  specification is not provided.  Note that this special value is not an empty
-  string --- \refmmzauto{args}|={}|, or simply \refmmzauto{args}|=|, indicates
-  a command which takes no arguments.  During the execution of the advice, one
-  may use the \hologo{LaTeX}-style conditional
-  \docaux{cmd}{AdviceIfArgs}\marg{true branch}\marg{false branch} to test
-  whether the argument specification was provided.  Executing this key without
-  a value restores it to the initial, unset value.
+  When setting up advice for a \emph{command}, this key is initially ``unset,''
+  i.e.\ it holds a special value indicating that the argument specification is
+  not provided.  Note that this special value is not an empty string;
+  \refmmzauto{args}|={}|, or simply \refmmzauto{args}|=|, indicates a command
+  which takes no arguments.  During the execution of the advice, one may use
+  the \hologo{LaTeX}-style conditional \docaux{cmd}{AdviceIfArgs}\marg{true
+    branch}\marg{false branch} to test whether the argument specification was
+  provided.  Executing this key without a value restores it to the initial,
+  unset value.
   
   When setting up the advice of an \emph{environment}, this key is
   initialized to \docref{xparse:+}\docref{xparse:b} (a long environment body),
@@ -8008,8 +7985,8 @@
     ``remembered''.\\
     \refcmd{ref}&\refmmzauto{ref}\\
     \refcmd[short]{savepos}&\refmmzauto{abort}&Available only in \hologo{LuaTeX}.\\
-    \refcmd{tikz}&\refmmzauto{memoize tikz}\\
-    \refenv{tikzpicture}&\refmmzauto{memoize tikz}\\
+    \refcmd{tikz}&\refmmzauto{memoize}\\
+    \refenv{tikzpicture}&\refmmzauto{memoize}\\
     \bottomrule
   \end{tabularx}
   \caption{Commands advised by Memoize}
@@ -8154,16 +8131,6 @@
   preferred.
 \end{doc}
 
-\begin{doc}{key={name=memoize tikz,desc=style}}
-  This key is used to declare memoization of \TikZ pictures; it may also be
-  used for PGF pictures.  Besides executing \refmmzauto{memoize}, it uses
-  \refmmz{at begin memoization} and \refmmz{at end memoization} to add the code
-  which measures the increase of the PGF picture ID during memoization of a
-  picture, and increases this ID for the measured amount upon the utilization
-  of the extern, thereby making sure that a utilized \TikZ\slash\PGF extern
-  advances the PGF picture ID as if the picture was compiled.
-\end{doc}
-
 \begin{doc}{easy, 
     key={name=ref,desc=style},
     key={name=force ref,desc=style},
@@ -8317,15 +8284,22 @@
   \docaux{key path}{collargs}.  The given options apply to all the arguments in
   \meta{argument specification}.  The recognized keys are listed in the rest of
   the section.
-  
-  The \meta{argument specification} should be given in the \pkg{xparse} format
-  (we summarize this format in the documentation for \refmmzauto{args} in
-  section~\ref{sec:ref:advice}), with several extensions:\footnote{Collargs
-    internally uses a dot (|.|) to delimit the argument specification from the
-    following argument tokens.  Therefore, the dot really counts as an extra
-    argument type, in the sense that Collargs will stop working if the dot
-    becomes an argument type or a modifier in some future release of
-    \pkg{xparse}.}
+
+  \refcmd{CollectArguments} expects the \meta{argument specification} to
+  conform to the \hologo{LaTeX3} argument specification format, i.e.\ it
+  accepts the same kind of \meta{argument specification} as
+  \refcmd{NewDocumentCommand} and friends, complete with extensions available
+  upon loading package \pkg{xparse}.\footnote{Note that CollArgs collects the
+    arguments by its own means.  It does \emph{not} require either
+    \hologo{LaTeX3} or \pkg{xparse} to do its job.  Specifically, it may be
+    used in \hologo{plainTeX} and \hologo{ConTeXt} as well.}  Furthermore,
+  CollArgs introduces several extensions to the
+  \hologo{LaTeX3}\slash\pkg{xparse} argument specification
+  format:\footnote{Collargs internally uses a dot (|.|) to delimit the argument
+    specification from the following argument tokens.  Therefore, the dot
+    really counts as an extra argument type, in the sense that CollArgs will
+    stop working if the dot becomes an argument type or a modifier in some
+    future release of \hologo{LaTeX}.}
   \begin{itemize}
   \item We introduce modifier \docAux{xparse modifier={name=\&,label=amp,index
         annotation/.prefix={additional\ }, index annotation/.append={\
@@ -8340,14 +8314,80 @@
   \item The number of collected ``arguments'' is unlimited.
   \end{itemize}
 
-  Also note that the effect of \docref{xparse:O}\marg{default} is the same as
-  the effect of \docref{xparse:o}, and similarly for other pairs of types with
-  and without defaults (\docref{xparse:R} and \docref{xparse:r},
-  \docref{xparse:D} and \docref{xparse:d}, and \docref{xparse:E} and
-  \docref{xparse:e}).  CollArgs is dedicated to collecting the argument tokens
-  precisely as they are given: if an optional argument is missing, its default
-  value is \emph{not} inserted among the collected arguments --- consequently,
-  \refcmd{CollectArguments} is utterly uninterested in the default value.
+  For convenience, the entire \hologo{LaTeX3} argument specification format,
+  complete with \pkg{xparse} and CollArgs extensions, is summarized in the
+  frame \vpageref{tab:argspec}.  For the official documentation of the format,
+  consult the following sources:
+  \begin{itemize}
+  \item The \hologo{LaTeX3} version
+    of \href{https://www.latex-project.org/help/documentation/usrguide.pdf}
+    {``\LaTeX\ for authors''} documents the standard argument types.
+  \item The \pkg{xparse} manual additionally documents the uncommon\slash
+    historical types only available upon loading package \pkg{xparse}.
+  \end{itemize}
+  
+  \begin{tcolorbox}[float, before float=\hfill, label=tab:argspec,
+      title={The \hologo{LaTeX3}\slash\pkg[white]{xparse} argument specification,
+        with CollArgs extensions}]
+    \begin{tabularx}{\linewidth}{>{\tt}lX}
+      \multicolumn{2}{l}{\rm\textbf{Mandatory argument types}}\\
+      m&standard (a single token or multiple tokens in braces)\\
+      r\meta{token$_1$}\meta{token$_2$}
+      &delimited by \meta{token$_1$} and \meta{token$_2$} \\
+      R\meta{token$_1$}\meta{token$_2$}\marg{default}\footnote{\label{fn:ODRE}As
+        \refcmd{CollectArguments} does not use the arguments but only collects
+        them, it does not care about the default values of optional arguments.
+        Therefore, while CollArgs recognizes argument types with defaults
+        (\docref{xparse:O}, \docref{xparse:D}, \docref{xparse:R}, and
+        \docref{xparse:E}), they may be safely substituted by their
+        \texttt{-NoValue-} counterparts (\docref{xparse:o}, \docref{xparse:d},
+        \docref{xparse:r} and \docref{xparse:e}).}
+      &delimited by \meta{token$_1$} and \meta{token$_2$}, with a default value\\
+      v&verbatim, in the style of \cs{verb}\footnote{\refcmd{CollectArguments}
+        can grab an argument of any type in the \refcollargs{verbatim} mode.}\\
+      b&the body of an environment\\
+      [1ex]\multicolumn{2}{l}{\rm\textbf{Optional argument types}}\\
+      o&in square brackets\\
+      O\marg{default}\footnoteagain{fn:ODRE}&in square brackets, with a default value\\
+      d\meta{token$_1$}\meta{token$_2$}
+      &delimited by \meta{token$_1$} and \meta{token$_2$}\\
+      D\meta{token$_1$}\meta{token$_2$}\marg{default}\footnoteagain{fn:ODRE}
+      &delimited by \meta{token$_1$} and \meta{token$_2$}, with a default value\\
+      s&an optional star\\
+      t\meta{token}&an optional \meta{token}\\
+      e\marg{tokens}&a set of embellishments\\
+      E\marg{tokens}\marg{defaults}\footnoteagain{fn:ODRE}
+      &a set of embellishments, with default values\\
+      [1ex]\multicolumn{2}{l}{\rm\textbf{Weird argument types}}\\
+      l\footnote{\label{fn:lug}Argument types \docref{xparse:l},
+        \docref{xparse:u} and \docref{xparse:g} are not defined by the core
+        \hologo{LaTeX3}; they are only available upon loading package
+        \pkg{xparse}.  As noted in the main text, CollArgs does not make any
+        difference between standard \hologo{LaTeX3} types and the \pkg{xparse}
+        extensions; it supports them all at all times, and even in
+        \hologo{plainTeX} and \hologo{ConTeXt}.}
+      &a mandatory argument until the first begin-group token\\
+      u\marg{tokens}\footnoteagain{fn:lug}&\hologo{TeX}'s delimited argument\\
+      g\footnoteagain{fn:lug}&an optional argument inside braces\\
+      [1ex]\multicolumn{2}{l}{\rm\textbf{Modifiers}}\\
+      +&allow the next argument to be long\\
+      !&disallow spaces before arguments of type \docref{xparse:d} and \docref{xparse:t}\\
+      >\marg{processor}&process the next argument\\
+      [1ex]\multicolumn{2}{l}{\rm\textbf{CollArgs extensions}}\\
+      \docref{xparse:b}\marg{name}&the body of an environment with the given \meta{name}\\
+      \docref{xparse:amp}\marg{options}&apply CollArgs options to the next argument\\
+      \docref{xparse:amp}\docref{xparse:amp}\marg{raw options}&apply raw CollArgs options to the next argument\\
+    \end{tabularx}
+  \end{tcolorbox}
+  
+  Note that in CollArgs, \docref{xparse:O}\marg{default} has the same effect as
+  \docref{xparse:o}, and similarly for other pairs of types with and without
+  defaults (\docref{xparse:R} and \docref{xparse:r}, \docref{xparse:D} and
+  \docref{xparse:d}, and \docref{xparse:E} and \docref{xparse:e}).  CollArgs is
+  dedicated to collecting the argument tokens precisely as they are given: if
+  an optional argument is missing, its default value is \emph{not} inserted
+  among the collected arguments --- consequently, \refcmd{CollectArguments} is
+  utterly uninterested in the default value.
 
   Collection of environments automatically adapts to the format, i.e.\ given
   environment body name |foo|, \refcmd{CollectArguments} knows to search for
@@ -8389,14 +8429,43 @@
   \end{tcblisting}
   
   Withing the option-setting code, the programmer may also deploy macro
-  \docaux{cmd}{collargsSet}, which processes the \meta{options} in the keylist
+  \refcmd{collargsSet}, which processes the \meta{options} in the keylist
   format.  One idea could be to execute this macro at the end of the low-level
   options; this would set the ``defaults'' using the fast programmer's
   interface, but still allow for user customization.
 \end{doc}
 
+\begin{doc}{
+    cmd={name=collargsSet, par=\meta{options}}
+  }
+  Locally update the CollArgs configuration.
 
+  The \meta{options} are a comma-separated list of \meta{key}|=|\meta{value}
+  pairs.  They are processed using the \pkg{pgfkeys} utility of PGF/\TikZ (see
+  \PGFmanual{87}), with the default path set to \docaux{key path}{collargs}.
+
+  This key may be used either outside an invocation of
+  \refcmd{CollectArguments}\slash \refcmd{CollectArgumentsRaw}, to set defaults
+  or define additional styles, or within the \meta{option-setting code} in the
+  invocation of \refcmd{CollectArgumentsRaw}.
+\end{doc}
+
 \begin{doc}[
+    pi={\docaux{cmd}{collargsAlias}},
+  ]{
+    key={name=alias, par=\marg{symbol}\marg{definition}, desc=style},
+  }
+  Define \meta{symbol} as an abbreviation of \marg{definition} within the
+  \meta{argument specification} passed to \refcmd{CollectArguments}.
+
+  For example, Memoize's \pkg{biblatex} support sets
+  \code{\refcollargs{alias}=%
+    \braces{*}\braces{\&\&\braces{\cs{mmz at biblatex@mark at citation@key}}}}, with
+  \cs{mmz at biblatex@mark at citation@key} an internal macro which stores the
+  contents of \refcmd{collargsArg} into another internal macro.
+\end{doc}
+
+\begin{doc}[
     pi={\docaux{cmd}{collargsCaller}},
   ]{
     key={name=caller, par=\meta{control sequence (name)},
@@ -8554,6 +8623,9 @@
   }
   These keys declare processors which will transform the collected argument
   before appending it to the argument list.
+
+  A processor should be a macro taking no arguments, (locally) transforming the
+  contents of token register \docaux{cmd}{collargsArg} as it sees fit.
   
   A collected argument undergoes the following transformations:
   \begin{itemize}
@@ -8567,28 +8639,22 @@
     |prepend|.
   \end{itemize}
 
-  \meta{code} will typically consist of a single control sequence pointing to a
-  one-argument macro, which will receive the collected argument (possibly
-  modified by the processors already applied).  In general, however, the value
-  of this key may be any code; Collargs will execute \meta{code}\marg{collected
-    argument}.
-
-  The processed argument should be returned by storing it into token register
-  \docaux{cmd}{collargsArg}.
-
   The following example illustrates how one could go about reimplementing Bruno
-  Le Floch ingenious package \pkg{cprotect}.\footnote{This example is merely a
+  Le Floch ingenious package \pkg{cprotect},\footnote{This example is merely a
     proof of concept.  For the bells and whistles which would make it useful in
-    real life, see the documentation of \pkg{cprotect}.} We define processor
-  |\writetofile| which dumps the argument into a file, replacing it with the
-  |\input| statement.  (Of course, to allow for verbatim content in the
-  footnote, we also have to mark the argument as \refcollargs{verbatim}.
-  And we use \refcollargs{no delimiters} to get rid of the braces around the
-  footnote text.)
+    real life, see the documentation of \pkg{cprotect}.} which allows the
+  author to use verbatim text in arguments.  Below, we will end up with with
+  \cs{footnote}\braces{\meta{footnote text}} replaced by |\footnote{\input
+    _fn.tex}|, with \meta{footnote text} waiting in file |_fn.tex|.  To achieve
+  this, we define processor |\writetofile| which dumps the argument into a
+  file, replacing it with the |\input| statement.  (Of course, to allow for
+  verbatim content in the footnote, we also have to mark the argument as
+  \refcollargs{verbatim}.  And we use \refcollargs{no delimiters} to get rid of
+  the braces around the footnote text.)
   
   \ExampleName{collargs-processor}
   \makeexample{\examplename.tex.c1}
-  \tcbinputexample{listing and text, listing file=\examplepath.tex.c1}
+  \tcbinputexample{comment=\input{\examplepath.tex.c1}}
 \end{doc}
 
 \begin{doc}[
@@ -8613,47 +8679,51 @@
     key={name=append expandable postprocessor, par=\meta{code}, desc={style, no default}},
     key={name=prepend expandable postprocessor, par=\meta{code}, desc={style, no default}},
   }
-  These keys may be used to add fully expandable processors.  A processor added
-  with one of these keys will end up among the processors declared by
-  \refcollargs{append preprocessor} et al.
+  These keys may be used to simplify the definition of processors which can
+  arrive at the result by means of full expansion.  A processor declared by one
+  of these keys assigns the full expansion of \meta{code} to
+  \refcmd{collargsArg}, i.e.\ it is defined as
+  \code{\refcmd{collargsArg}\cs{expandafter}\braces{%
+      \cs{expanded}\braces{\meta{code}}}}.
 
-  A processor declared by one of these keys will define the processed argument
-  as the full expansion (|\edef|) of \meta{code}\marg{collected argument}.
-  \meta{code} will typically consist of a single control sequence pointing to a
-  fully expandable one-argument macro.
+  A processor added with one of these keys will end up among the processors
+  declared by \refcollargs{append preprocessor} et al.
 
-  For example, |\trim at spaces@noexp| from package \pkg{trimspaces} could be used
-  as an expandable processor of environment body to remove the spaces around
-  the grabbed environment body.
-\end{doc}
+  \meta{code} will typically contain \code{\cs{the}\refcmd{collargsArg}} to
+  refer to the input state of the argument.  For example, to add quotes around
+  the collected argument: \code{\refcollargs{append expandable preprocessor}=%
+    \nohyphen``\cs{the}\refcmd{collargsArg}''}.  Or, to trim spaces from an
+  argument using |\trim at spaces@noexp| from package \pkg{trimspaces}:
+  \code{\refcollargs{append expandable preprocessor}=%
+    \cs{expandafter}\cs{trim at spaces@noexp}\cs{expandafter}\braces{%
+      \cs{the}\refcmd{collargsArg}}}.  A pre-processor is the right choice in
+  both these cases because we want to modify the argument before it is dressed
+  up in the original delimiters.
 
-\begin{doc}[
-    pi={\docaux{cmd}{collargsAppendPrewrap},
-      \docaux{cmd}{collargsPrependPrewrap},
-      \docaux{cmd}{collargsAppendPostwrap},
-      \docaux{cmd}{collargsPrependPostwrap}},
-  ]{
-    key={name=append prewrap, par=\meta{macro definition}, desc={style, no default}},
-    key={name=prepend prewrap, par=\meta{macro definition}, desc={style, no default}},
-    key={name=append postwrap, par=\meta{macro definition}, desc={style, no default}},
-    key={name=prepend postwrap, par=\meta{macro definition}, desc={style, no default}},
+  Let us consider another, more involved example.  As the example for
+  \refcollargs{append preprocessor} above, it is inspired by \pkg{cprotect},
+  but instead of writing the argument into a file and then reading it back, we
+  rescan it using |\scantokens|.  Remarks:
+  \begin{enumerate*}[(a)]
+  \item rescanning only happens when processing |\fbox|; \refcollargs{append
+      expandable preprocessor} merely inserts |\ScanMultilineTokens| in front
+    of the argument.
+  \item |\ScanMultilineTokens| below temporarily changes the |\newlinechar| to
+    13 to allow for linebreaks in (the source code of) the argument;
+  \item |\endinput| is added to prevent the extra end-of-file space creeping
+    in;
+  \item we have used \refmmz{verb} instead of \refmmz{verbatim} so that the
+    argument is eventually dressed up in a pair of real, category code 1 and 2,
+    braces.
+  \end{enumerate*}
+  
+  \ExampleName{collargs-expandable-processor}
+  \makeexample{\examplename.tex.c1}
+  \tcbinputexample{comment=\input{\examplepath.tex.c1},
+    %listing options app={numbers=left, numberstyle=\tiny, numbersep=0.5em},
   }
-  These keys add processors which transform the collected argument in a single
-  expansion.
-
-  The declared processor will use \meta{macro definition} to define a temporary
-  one-argument \meta{macro}, and then set the \meta{processed argument} to be
-  the single expansion of \meta{macro}\marg{collected argument}.
-
-  For example, to add quotes around the collected argument, write
-  \refcollargs{append prewrap}|={``#1''}| (doubling the hash when executing
-  \refcmd{CollectArguments} from a macro, of course).  Or, perhaps more
-  usefully, \refcollargs{append prewrap}|={\scantokens{#1}}| can be used to
-  retokenize a verbatim argument (during the execution of the
-  \meta{next-code}).
 \end{doc}
 
-
 \begin{doc}[
     pi=\docaux{cmd}{ifcollargsNoDelimiters}
   ]{
@@ -8661,24 +8731,99 @@
   }
   When this key is in effect, the collected argument will not be dressed up
   into delimiters that it was dressed up in \meta{argument tokens}.  For
-  example, an optional argument, encountered as [\meta{argument}] inside
-  \meta{argument tokens}, will be spit out simply as \meta{argument}.
+  example, an optional argument, encountered as \code{[\meta{argument}]}, will
+  be spit out simply as \meta{argument}.
 
-  Any user-specified pre- or post-processing will still be applied.
+  Any user-specified pre- or post-processing will still be applied (and usually
+  is, when this key is used).
+  
   \ExampleName{collargs-nodelimiters}
   \makeexample{\examplename.tex.c1}
-  \tcbinputexample{comment=\input{\examplepath.tex.c1}}
+  \tcbinputexample{comment=\small\input{\examplepath.tex.c1}}
 \end{doc}
 
+\begin{doc}[%
+    pi=\docaux{cmd}{collargsReturn}
+  ]{
+    key={name=return,
+      par=\docAux{
+        of=key:/collargs/return,
+        value={name=braced},
+        text=\Alt,
+        value={name=plain},
+        text=\Alt,
+        value={name=no},
+      },
+      desc={initially \code{braced}, no default}
+    }
+  }
+  This key determines the form in which the collected arguments are passed on
+  to \meta{next-code}:
+  \begin{itemize}
+  \item When set to \refcollargs{return=braced} (the default), \meta{next-code}
+    receives the collected arguments as a single, braced argument.
+  \item When set to \refcollargs{return=plain}, the collected arguments are
+    simply inserted behind \meta{next-code}.  Combined with other keys, this
+    keys makes it possible to transform the collected arguments into form
+    expected by \meta{next-code}.  For example, |&{...} b| below transforms the
+    body of an environment into a mandatory argument (after trimming the
+    surrounding spaces); the preceding optional argument remains unmodified.
+    Without \code{\refcollargs{return}=\refcollargs{return=plain}},
+    |\processbody| would receive a single argument, containing both the
+    optional argument and the transformed environment body; with
+    \code{\refcollargs{return}=\refcollargs{return=plain}}, which makes
+    CollArgs refrain from bracing the collected arguments, it receives an
+    optional plus a mandatory argument.\footnote{For further examples, see the
+      definition of \cs{mmz at remove@quotes} and advising of \cs{blx at bbl@entry}
+      in the Memoize source.}
+
+    \ExampleName{collargs-return-plain}
+    \makeexample{\examplename.tex.c1}
+    \tcbinputexample{comment=\small\input{\examplepath.tex.c1}}
+  \item When set to \refcollargs{return=no}, the collected arguments are not
+    inserted into the input stream; \meta{next-code} can access them through
+    \refcmd{collargsArgs}, a token register dedicated to holding the
+    collected arguments (regardless of the value of \refcollargs{return}).
+
+    In conjunction with \code{\refcollargs{clear args}=false}, this setup can
+    be useful for reiterating command \refcmd{CollectArguments}.\footnote{The
+      idea illustrated with this example is deployed in the definition of
+      \refmmzauto{cites} in the Memoize source.}  Command
+    |\CollectOptionalArguments| defined below collects any number of optional
+    arguments given either in square brackets or in parentheses.  To achieve
+    this, we instruct CollArgs to neither clear \refcmd{collargsArgs} at the
+    start of argument collection, nor insert it into the input stream once the
+    collection is finished; we thus have to clear this token register manually
+    at the start, and use it directly at the end.  (There's a number of ways of
+    detecting whether further arguments follow.  We use a pure Collargs
+    solution below: we define a postprocessor which sets an internal
+    conditional to true if any argument was found, and test for that
+    conditional in the \meta{next-code}.)
+    
+    \ExampleName{collargs-return-no}
+    \makeexample{\examplename.tex.c1}
+    \tcbinputexample{comment=\small\input{\examplepath.tex.c1}}
+  \end{itemize}
+\end{doc}
+
+\begin{doc}{
+    cmd={name=collargsArgs, desc={token register, global}},
+  }
+  This token register holds the collected arguments upon the exit from
+  \refcmd{CollectArguments}; the token register is assigned to globally.
+
+  This register may be manipulated by the user, both within and outside an
+  invocation of \refcmd{CollectArguments}; all assignments should be global.
+\end{doc}
+
 \begin{doc}[
-    pi=\docaux{cmd}{ifcollargsBraceCollected}
+    pi=\docaux{cmd}{ifcollargsClearArgs}
   ]{
-    key={name=brace collected, conditional=true},
+    key={name=clear args, conditional=true},
   }
-  When this conditional is set to false, the collected arguments are not
-  enclosed in braces when passed on to \meta{next-code}.  This probably only
-  makes sense when wrapping the individual arguments, e.g.\ by
-  \refcollargs{append postwrap}|={{#1}}|.
+  When this conditional is set to |false|, token register \refcmd{collargsArgs}
+  is not cleared upon entering \refcmd{CollectArguments}; see
+  \code{\refcollargs{return}=\refcollargs{return=no}} for an example.
 \end{doc}
 
 \begin{doc}[
@@ -8937,10 +9082,291 @@
 \endgroup % /collargs
 
 
+\subsection{Support for specific classes and packages}
+
+\subsubsection{PGF}
+
+When package \PGF is loaded, commands \refcmd{mmzPgfAtBeginMemoization}
+and \refcmd{mmzPgfAtEndMemoization} are defined and appended to hooks
+\refmmz{at begin memoization} and \refmmz{at end memoization}, respectively.
+
+Note that environment \env{pgfpicture} is \emph{not} submitted to
+automemoization.  Doing this would probably not be a good idea, as it is used
+by many other commands and environments.
+
+\makeexcerpt{_support-pgf}
+\tcbinputexample[.tex][.excerpt]{%
+  listing only, one file, no attachment,
+  title=\hypercolor{url}{white}\PGF support,
+}
+
+\begin{doc}{
+    cmd={name=mmzPgfAtBeginMemoization},
+    cmd={name=mmzPgfAtEndMemoization},
+  }
+  These commands are meant to be executed inside hooks \refmmz{at begin
+    memoization} and \refmmz{at end memoization}.  Together, they make sure
+  that utilizing an extern containing PGF/\TikZ pictures advances the PGF
+  picture ID (\cs{pgf at picture@serial at count}) as if the pictures were compiled.
+  
+  This avoids potential problems for various mechanisms which rely on a stable
+  PGF picture ID.  For example, in absence of advancing the ID, placing a \TikZ
+  picture scaled by |ext.scalepicture| of \pkg{tikz-ext} \emph{after} some
+  memoized \TikZ picture would confuse the scaled picture, as its ID would
+  depend on whether the extern of the previous (unrelated!)  picture was
+  memoized or utilized.
+
+  Command \refcmd{mmzPgfAtBeginMemoization}, executed in hook \refmmz{at begin
+    memoization}, remembers the PGF picture ID at the beginning of memoization.
+  Command \refcmd{mmzPgfAtEndMemoization}, executed in hook \refmmz{at end
+    memoization}, checks whether the ID was advanced during memoization, and if
+  so, appends to the cc-memo the code advancing the ID counter accordingly.
+
+  Note that out of the box, \refcmd{mmzPgfAtBeginMemoization} and
+  \refcmd{mmzPgfAtEndMemoization} reside in their respective hooks at all
+  times, not only when memoizing \refenv{tikzpicture} and \refcmd{tikz}.  This
+  way, the PGF picture ID mechanism is applied to all pictures deploying PGF
+  pictures under the hook, e.g.\ \pkg{forest} trees.
+\end{doc}
+
+
+\subsubsection[TikZ]{\TikZ*}
+
+When package \TikZ is loaded, environment \refenv{tikzpicture} and command
+\refcmd{tikz} and are automatically submitted to automemoization; this may be
+prevented by \code{\refmmz{deactivate}=\refenv{tikzpicture}} and\slash or
+\code{\refmmz{deactivate}=\refcmd{tikz}}, or by \refmmz{manual}.  Note that
+command \refcmd{tikz} requires a dedicated argument collector,
+\refcmd{AdviceCollectTikZArguments}.
+
+\makeexcerpt{_support-tikz}
+\tcbinputexample[.tex][.excerpt]{%
+  listing only, one file, no attachment,
+  title=\hypercolor{url}{white}\TikZ support,
+}
+
+
+\subsubsection{Forest}
+
+When package \pkg{forest} is loaded, environment \refenv{forest} and command
+\refcmd{Forest} are automatically submitted to automemoization; this may be
+prevented by \code{\refmmz{deactivate}=\refenv{forest}} and\slash or
+\code{\refmmz{deactivate}=\refcmd{Forest}}, or by \refmmz{manual}.  Note that
+command \refcmd{Forest} is defined by \refcmd{NewDocumentCommand}, which makes
+specifying option \refmmzauto{args} unnecessary.
+
+\makeexcerpt{_support-forest}
+\tcbinputexample[.tex][.excerpt]{%
+  listing only, one file, no attachment,
+  title=\pkg[white]{Forest} support,
+}
+
+
+\subsubsection{Beamer}
+
+Memoize should be loaded by writing |\RequirePackage{memoize}| (rather than
+|\usepackage{memoize}|) before (rather than after) |\documentclass{beamer}|.
+
+\begin{doc}{easy, key={name=per overlay,desc=style}}
+  Applying this style to a piece of memoized code contained in a Beamer
+  \refenv{frame} will produce a separate cc-memo (and extern) for each overlay
+  of the frame.  See section~\ref{sec:tut:beamer} for the tutorial.
+
+  Note that this style is \emph{not} intended for externalization of entire
+  frames.
+
+  The implementation, documented in section~\ref{sec:per-overlay}, is not
+  trivial, but only deploys the public interface offered by Memoize.
+\end{doc}
+
+\subsubsection{Biblatex}
+
+\begin{doc}{
+    key={name=biblatex, par=\marg{additional configuration}, desc=style},
+  }
+  This key loads the \pkg{biblatex} support, but only if package \pkg{biblatex}
+  is loaded (anywhere in the preamble); after loading the support,
+  \meta{additional configuration} is executed within \refcmd{mmzset}.
+
+  When \pkg{biblatex} support is loaded, all citation commands defined by this
+  package\footnote{In \pkg{biblatex} version 3.19: \cs{cite}, \cs{Cite},
+    \cs{parencite}, \cs{Parencite}, \cs{footcite}, \cs{footcitetext},
+    \cs{textcite}, \cs{Textcite}, \cs{smartcite}, \cs{Smartcite},
+    \cs{supercite}, \cs{cites}, \cs{Cites}, \cs{parencites}, \cs{Parencites},
+    \cs{footcites}, \cs{footcitetexts}, \cs{smartcites}, \cs{Smartcites},
+    \cs{textcites}, \cs{Textcites}, \cs{supercites}, \cs{autocite},
+    \cs{Autocite}, \cs{autocites}, \cs{Autocites}, \cs{citeauthor},
+    \cs{Citeauthor}, \cs{citetitle}, \cs{citeyear}, \cs{citedate},
+    \cs{citeurl}, \cs{nocite}, \cs{fullcite}, \cs{footfullcite}, \cs{volcite},
+    \cs{Volcite}, \cs{volcites}, \cs{Volcites}, \cs{pvolcite}, \cs{Pvolcite},
+    \cs{pvolcites}, \cs{Pvolcites}, \cs{fvolcite}, \cs{Fvolcite},
+    \cs{fvolcites}, \cs{Fvolcites}, \cs{ftvolcite}, \cs{ftvolcites},
+    \cs{Ftvolcite}, \cs{Ftvolcites}, \cs{svolcite}, \cs{Svolcite},
+    \cs{svolcites}, \cs{Svolcites}, \cs{tvolcite}, \cs{Tvolcite},
+    \cs{tvolcites}, \cs{Tvolcites}, \cs{avolcite}, \cs{Avolcite},
+    \cs{avolcites}, \cs{Avolcites}, \cs{notecite}, \cs{Notecite},
+    \cs{pnotecite}, \cs{Pnotecite}, \cs{fnotecite}, \cs{citename},
+    \cs{citelist}, \cs{citefield}.} behave like \refcmd{ref} in the sense that
+  changing a bibliography entry referred to by a citation command within a
+  piece of memoized code triggers recompilation of that code.  For example, it
+  is safe to use \code{\cs{textcite}\braces{\meta{citation key}}} inside
+  memoized code, in the sense that the extern will be recompiled when the entry
+  for the \meta{citation key} is changed in the |.bib| file.
+
+  Furthermore, Memoize takes care that even once an extern which contains a
+  reference to \meta{citation key} is utilized (i.e.\ included into the
+  document as a picture), the \meta{citation key} is marked (by \cs{nocite}) as
+  used, and will appear among the items listed by \cs{printbibliography}.
+
+  In most cases, the out-of-the-box level of \refmmz{biblatex} support will
+  suffice.  However:
+  \begin{itemize}
+  \item To support an additional citation command (most likely defined via
+    \cs{DeclareCiteCommand} etc.), advise it by one of \refmmzauto{cite} and
+    friends below.
+  \item To have ibid (and similar) tracking sensitive to citation commands
+    within memoized code, execute \refmmz{biblatex ccmemo cite}.
+  \end{itemize}
+
+  Under the hood, \pkg{biblatex} support does two things:
+  \begin{itemize}
+  \item It declares advice for \pkg{biblatex}'s internal macro
+    \cs{blx at bbl@entry}, executed while processing the |.bbl| file, which makes
+    it possible for Memoize to detect changes in bibliography entries.
+  \item It defines the \refmmz{auto}-keys of the \refmmzauto{cite} family,
+    documented below, and advises all \pkg{biblatex}'s citation commands with
+    these keys.
+  \end{itemize}
+\end{doc}
+
+
+\begin{doc}{
+    key={keypath=/mmz/auto, name=cite, desc=style},
+    key={keypath=/mmz/auto, name=cites, desc=style},
+    key={keypath=/mmz/auto, name=volcite, desc=style},
+    key={keypath=/mmz/auto, name=volcites, desc=style},
+  }
+  When a citation command is advised by one of these \refmmz{auto}-keys, a
+  piece of memoized code containing the citation command will be recompiled
+  upon changing the bibliography entry of a citation key used by the command;
+  in other words, the citation command will behave in a fashion analogous to
+  \refmmzauto{ref}.
+  
+  Furthermore, the memo corresponding to the memoized piece of code will
+  contain a \cs{nocite} command for each citation key occurring within the
+  code; in effect, citation keys continue to be marked as used even when
+  utilizing the memo\slash extern.  For further details, see \refmmz{biblatex
+    ccmemo cite}.
+
+  Out of the box, Memoize advises all \pkg{biblatex}'s (v3.19) citation
+  commands with these keys.  If a new citation command is defined, it may be
+  submitted to these keys by the author.  Use
+  \begin{itemize}
+  \item \code{\refmmz{auto}=\meta{citation command}\braces{\refmmzauto{cite}}}
+    for a \meta{citation command} in the \cs{cite} family,
+  \item \code{\refmmz{auto}=\meta{citation command}\braces{\refmmzauto{cites}}}
+    for a \meta{citation command} in the \cs{cites} family,
+  \item \code{\refmmz{auto}=\meta{citation command}\braces{\refmmzauto{volcite}}}
+    for a \meta{citation command} in the \cs{volcite} family, and
+  \item \code{\refmmz{auto}=\meta{citation command}\braces{\refmmzauto{volcites}}}
+    for a \meta{citation command} in the \cs{volcites} family.
+  \end{itemize}
+  
+  Which key should be used with which command depends on the argument structure
+  of the citation command, as documented in section 3.9 of the \pkg{biblatex}
+  manual.  Accordingly, the auto-keys of the \refmmzauto{cite} family set
+  \refmmzauto{args} as follows:
+
+  \begin{center}
+    \begin{tabular}{rl}
+      &\refmmzauto{args}\\
+      \midrule
+      \refmmzauto{cite}, \refmmzauto{cites}
+      &\code{l\,*m}\\
+      \refmmzauto{volcite}, \refmmzauto{volcites}
+      &\code{l\,m l\,*m}\\
+    \end{tabular}
+  \end{center}
+
+  Commands like |\cite| take one mandatory argument (the citation key), which
+  may be preceded by an optional star, prenote and postnote.  Key
+  \refmmzauto{cite} grabs all the optional arguments by |l|, while |*m|
+  receives the braced \meta{citation key} argument; |*| is locally defined to
+  mark the following argument as the citation key.  Commands like |\volcite|
+  take two mandatory arguments: the volume and the citation key, in this order;
+  each may be preceded by an optional argument.  Again, the optional arguments
+  are collected by |l|s, and the mandatory arguments by |m|s, with the second
+  argument being marked as the citation key by |*|.  The two \refmmzauto{cites}
+  variants use the given \refmmzauto{args} unconventionally: they iterate the
+  given pattern as long as the citation arguments continue (see
+  \refcollargs{return} for the gist of how they achieve this).
+
+  When advising new citation commands, the author may override the given
+  \refmmzauto{args} if necessary.  In fact, this is what Memoize does do
+  support \cs{citename}, \cs{citelist} and \cs{citefield}.  With these
+  commands, the braced \meta{citation key} is followed by optional arguments
+  followed by another braced mandatory argument, which implies |lm| following
+  \refmmzauto{cite}'s \refmmzauto{args}.  For example, \cs{citename} is advised
+  by \code{\refmmz{auto}=\braces{%
+        \refmmzauto{cite},
+        \refmmzauto{args}=l\,*m l\,m%
+      }%
+    }.
+\end{doc}
+
+\begin{doc}{
+    key={
+      name=biblatex ccmemo cite,
+      par={%
+        \docAux{
+          of=key:/mmz/biblatex ccmemo cite,
+          value={name=nocite},
+          text=\Alt,
+          value={name=replicate},
+        }
+      },
+      desc={initially \code{nocite}, no default}
+    }
+  }
+  Select the citation command which Memoize puts into the cc-memo in order to
+  broadcast that the citation key was used in the compilation of the extern.
+
+  By default, this citation command is \cs{nocite}.  Even if the memoized code
+  uses e.g.\ \cs{textcite}\braces{\meta{citation key}}, the cc-memo contains
+  \code{\cs{nocite}\braces{\meta{citation key}}}.  This usually suffices, as we
+  normally only have to inform \pkg{biblatex} that the \meta{citation key} was
+  used in the utilized extern.
+
+  However, in the rare situations where a tracker (page, cite, ibid, opcit,
+  loccit or idem tracker) depends on the citation used in the extern, the
+  \cs{nocite} approach does not suffice.  If such tracking is required, the
+  author should issue \code{\refmmz{biblatex ccmemo cite}=\refmmz{biblatex
+      ccmemo cite=replicate}} to have the cc-memo contain the original citation
+  command; note that if the cc-memo was already created, recompilation is
+  necessary.
+
+  The replication approach has the downside of yielding lots of `Missing
+  character' warnings.  This happens because, in order to use the original
+  citation command but not produce an actual citation, Memoize precedes the
+  invocation of the original citation command by \cs{nullfont}.
+\end{doc}
+
 \section{Varia}
 
 \subsectionclearpagefalse
 
+
+\subsection{Changelog}
+
+The changelogs of Memoize, Advice and CollArgs can be found in the
+documentation directory of the respective package, i.e.\ in
+\code{\meta{texmf}/doc/generic/\meta{package}/CHANGELOG.md}.  They are written
+in the MarkDown format.  Here are direct links to these changelogs on
+CTAN:
+\href{https://mirrors.ctan.org/macros/generic/memoize/CHANGELOG.md}{Memoize},
+\href{https://mirrors.ctan.org/macros/generic/advice/CHANGELOG.md}{Advice},
+\href{https://mirrors.ctan.org/macros/generic/collargs/CHANGELOG.md}{CollArgs}.
+
 \subsection{Known issues}
 \label{sec:known-issues}
 
@@ -8978,10 +9404,8 @@
 
 Due to an unfortunate design decision, CollArgs does not accept a dot |.| as
 the \meta{token} argument of types, \docref{xparse:r}, \docref{xparse:R},
-\docref{xparse:d}, \docref{xparse:D}, and \docref{xparse:t}.  Furthermore,
-\refcollargs{append prewrap} and friends (and their macro counterparts) do not
-accept a parameter symbol consistently.  These issues will be fixed in the next
-release.
+\docref{xparse:d}, \docref{xparse:D}, and \docref{xparse:t}.  The issue will be
+fixed in a subsequent release.
 
 
 \subsection{Troubleshooting}

Modified: trunk/Master/texmf-dist/doc/generic/memoize/memoize-extract.1.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/memoize/memoize-extract.1.md	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/generic/memoize/memoize-extract.1.md	2024-03-18 19:59:51 UTC (rev 70690)
@@ -2,8 +2,8 @@
 title: memoize-extract
 section: 1
 header: User Manual
-footer: memoize-extract of Memoize v1.1.2
-date: January 21, 2024
+footer: memoize-extract of Memoize v1.2.0
+date: March 15, 2024
 hyphenate: false
 ---
 

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-clean.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/memoize-clean.1	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/man/man1/memoize-clean.1	2024-03-18 19:59:51 UTC (rev 70690)
@@ -14,7 +14,7 @@
 . ftr VB CB
 . ftr VBI CBI
 .\}
-.TH "memoize-clean" "1" "January 21, 2024" "memoize-clean of Memoize v1.1.2" "User Manual"
+.TH "memoize-clean" "1" "March 15, 2024" "memoize-clean of Memoize v1.2.0" "User Manual"
 .nh
 .SH NAME
 .PP

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-clean.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-clean.pl.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-clean.py.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-extract.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/memoize-extract.1	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/doc/man/man1/memoize-extract.1	2024-03-18 19:59:51 UTC (rev 70690)
@@ -14,7 +14,7 @@
 . ftr VB CB
 . ftr VBI CBI
 .\}
-.TH "memoize-extract" "1" "January 21, 2024" "memoize-extract of Memoize v1.1.2" "User Manual"
+.TH "memoize-extract" "1" "March 15, 2024" "memoize-extract of Memoize v1.2.0" "User Manual"
 .nh
 .SH NAME
 .PP

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-extract.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-extract.pl.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/memoize-extract.py.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/memoize/memoize-clean.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/memoize/memoize-clean.pl	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/scripts/memoize/memoize-clean.pl	2024-03-18 19:59:51 UTC (rev 70690)
@@ -19,7 +19,7 @@
 # <texmf>/doc/generic/memoize/FILES.
 
 my $PROG = 'memoize-clean.pl';
-my $VERSION = '2024/01/21 v1.1.2';
+my $VERSION = '2024/03/15 v1.2.0';
 
 use strict;
 use Getopt::Long;

Modified: trunk/Master/texmf-dist/scripts/memoize/memoize-clean.py
===================================================================
--- trunk/Master/texmf-dist/scripts/memoize/memoize-clean.py	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/scripts/memoize/memoize-clean.py	2024-03-18 19:59:51 UTC (rev 70690)
@@ -18,7 +18,7 @@
 # The files belonging to this work and covered by LPPL are listed in
 # <texmf>/doc/generic/memoize/FILES.
 
-__version__ = '2024/01/21 v1.1.2'
+__version__ = '2024/03/15 v1.2.0'
 
 import argparse, re, sys, pathlib, os
 

Modified: trunk/Master/texmf-dist/scripts/memoize/memoize-extract.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/memoize/memoize-extract.pl	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/scripts/memoize/memoize-extract.pl	2024-03-18 19:59:51 UTC (rev 70690)
@@ -19,7 +19,7 @@
 # <texmf>/doc/generic/memoize/FILES.
 
 my $PROG = 'memoize-extract.pl';
-my $VERSION = '2024/01/21 v1.1.2';
+my $VERSION = '2024/03/15 v1.2.0';
 
 use strict;
 use File::Basename qw/basename/;

Modified: trunk/Master/texmf-dist/scripts/memoize/memoize-extract.py
===================================================================
--- trunk/Master/texmf-dist/scripts/memoize/memoize-extract.py	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/scripts/memoize/memoize-extract.py	2024-03-18 19:59:51 UTC (rev 70690)
@@ -18,7 +18,7 @@
 # The files belonging to this work and covered by LPPL are listed in
 # <texmf>/doc/generic/memoize/FILES.
 
-__version__ = '2024/01/21 v1.1.2'
+__version__ = '2024/03/15 v1.2.0'
 
 import argparse, re, sys, os, subprocess, itertools, traceback, platform
 from pathlib import Path, PurePath

Modified: trunk/Master/texmf-dist/source/generic/memoize/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/generic/memoize/Makefile	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/source/generic/memoize/Makefile	2024-03-18 19:59:51 UTC (rev 70690)
@@ -10,10 +10,10 @@
 # Prepare the CTAN submission.
 
 PACKAGE = memoize
-VERSION = 1.1.2
+VERSION = 1.2.0
 YEAR = 2024
-MONTH = 01
-DAY = 21
+MONTH = 03
+DAY = 15
 
 FORMAT = generic
 
@@ -20,6 +20,7 @@
 COMMON = memoize nomemoize memoizable
 PLAIN = memoize-extract-one.tex
 GENERIC = memoizable.code.tex
+LATEX = memoize-biblatex.code.tex
 SOURCE = memoize.edtx memoize.ins
 
 SCRIPTS := memoize-extract memoize-clean

Modified: trunk/Master/texmf-dist/source/generic/memoize/memoize.edtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/memoize/memoize.edtx	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/source/generic/memoize/memoize.edtx	2024-03-18 19:59:51 UTC (rev 70690)
@@ -64,7 +64,7 @@
 % listing options app={basicstyle=\ttfamily\scriptsize}}}
 % 
 % \begin{tcbraster}[raster columns=100]
-%   \tcbinputlisting{raster multicolumn=55, ins listing, top=1mm, bottom=1mm, title=memoize.ins,listing file=../memoize.ins, linerange={27-39}, leftupper=1mm}
+%   \tcbinputlisting{raster multicolumn=55, ins listing, top=1mm, bottom=1mm, title=memoize.ins,listing file=../memoize.ins, linerange={27-40}, leftupper=1mm}
 %   \begin{tcboxedraster}[raster columns=1]{blankest, raster multicolumn=45}
 %     \tcbinputlisting{ins listing, title=advice.ins, listing file=../advice.ins, linerange=28-31}
 %     \tcbinputlisting{ins listing, title=collar\raisebox{0pt}[\height][0pt]{g}s.ins, listing file=../collargs.ins, linerange=29-31}
@@ -90,14 +90,14 @@
 % 
 % \paragraph{Identification} of |memoize|, |memoizable| and |nomemoize|.
 %<*mmz>
-%<latex>\ProvidesPackage{memoize}[2024/01/21 v1.1.2 Fast and flexible externalization]
+%<latex>\ProvidesPackage{memoize}[2024/03/15 v1.2.0 Fast and flexible externalization]
 %<context>%D \module[
 %<context>%D         file=t-memoize.tex,
-%<context>%D      version=1.1.2,
+%<context>%D      version=1.2.0,
 %<context>%D        title=Memoize,
 %<context>%D     subtitle=Fast and flexible externalization,
 %<context>%D       author=Saso Zivanovic,
-%<context>%D         date=2024-01-21,
+%<context>%D         date=2024-03-15,
 %<context>%D    copyright=Saso Zivanovic,
 %<context>%D      license=LPPL,
 %<context>%D ]
@@ -104,17 +104,17 @@
 %<context>\writestatus{loading}{ConTeXt User Module / memoize}
 %<context>\unprotect
 %<context>\startmodule[memoize]
-%<plain>% Package memoize 2024/01/21 v1.1.2
+%<plain>% Package memoize 2024/03/15 v1.2.0
 %</mmz>
 %<*mmzable>
-%<latex>\ProvidesPackage{memoizable}[2024/01/21 v1.1.2 A programmer's stub for Memoize]
+%<latex>\ProvidesPackage{memoizable}[2024/03/15 v1.2.0 A programmer's stub for Memoize]
 %<context>%D \module[
 %<context>%D         file=t-memoizable.tex,
-%<context>%D      version=1.1.2,
+%<context>%D      version=1.2.0,
 %<context>%D        title=Memoizable,
 %<context>%D     subtitle=A programmer's stub for Memoize,
 %<context>%D       author=Saso Zivanovic,
-%<context>%D         date=2024-01-21,
+%<context>%D         date=2024-03-15,
 %<context>%D    copyright=Saso Zivanovic,
 %<context>%D      license=LPPL,
 %<context>%D ]
@@ -121,17 +121,17 @@
 %<context>\writestatus{loading}{ConTeXt User Module / memoizable}
 %<context>\unprotect
 %<context>\startmodule[memoizable]
-%<plain>% Package memoizable 2024/01/21 v1.1.2
+%<plain>% Package memoizable 2024/03/15 v1.2.0
 %</mmzable>
 %<*nommz>
-%<latex>\ProvidesPackage{nomemoize}[2024/01/21 v1.1.2 A no-op stub for Memoize]
+%<latex>\ProvidesPackage{nomemoize}[2024/03/15 v1.2.0 A no-op stub for Memoize]
 %<context>%D \module[
 %<context>%D         file=t-nomemoize.tex,
-%<context>%D      version=1.1.2,
+%<context>%D      version=1.2.0,
 %<context>%D        title=Memoize,
 %<context>%D     subtitle=A no-op stub for Memoize,
 %<context>%D       author=Saso Zivanovic,
-%<context>%D         date=2024-01-21,
+%<context>%D         date=2024-03-15,
 %<context>%D    copyright=Saso Zivanovic,
 %<context>%D      license=LPPL,
 %<context>%D ]
@@ -138,7 +138,7 @@
 %<context>\writestatus{loading}{ConTeXt User Module / nomemoize}
 %<context>\unprotect
 %<context>\startmodule[nomemoize]
-%<mmz>% Package nomemoize 2024/01/21 v1.1.2
+%<mmz>% Package nomemoize 2024/03/15 v1.2.0
 %</nommz>
 % 
 % \paragraph{Required packages} and \hologo{LaTeX}ization of \hologo{plainTeX}
@@ -361,7 +361,7 @@
 %   Read \hologo{TeX} file |#2| into token register |#1| (under the current
 %   category code regime); |\toksapp| is defined in CollArgs.
 \def\filetotoks#1#2{%
-  \immediate\mmz at openin0{#2}%
+  \immediate\openin0{#2}%
   #1={}%
   \loop
   \unless\ifeof0
@@ -373,12 +373,6 @@
 }
 % \end{macro}
 % 
-% \begin{macro}{\mmz at openin,\mmz at openout}
-%   A workaround for |morewrites|.
-\let\mmz at openin\openin
-\let\mmz at openout\openout
-% \end{macro}
-% 
 % \paragraph{Other} little things.
 \newif\ifmmz at temp
 \newtoks\mmz at temptoks
@@ -583,9 +577,9 @@
 }
 \def\mmz at remove@quotes at i{%
   \CollectArgumentsRaw
-    {\collargsBraceCollectedfalse
+    {\collargsReturnPlain
       \collargsNoDelimiterstrue
-      \collargsAppendPostwrap{{##1}}%
+      \collargsAppendExpandablePostprocessor{{\the\collargsArg}}%
     }%
     {u"u\mmz at eov}%
     \mmz at remove@quotes at ii
@@ -783,11 +777,11 @@
     }%
     % Spaces at the beginning of the environment body are trimmed by setting
     % the first argument to |!t<space>| and disappearing it with
-    % |\collargsAppendPostwrap{}|; note that this removes any number of space
+    % |\collargsAppendExpandablePostprocessor{}|; note that this removes any number of space
     % tokens.  |\CollectArgumentsRaw| automatically adapts the argument type
     % |b| to the format.
     % 
-  }{&&{\collargsAppendPostwrap{}}!t{ }+b{memoize}}{\mmz at do}%
+  }{&&{\collargsAppendExpandablePostprocessor{}}!t{ }+b{memoize}}{\mmz at do}%
 }%
 %</mmz>
 % \end{environment}
@@ -1562,7 +1556,7 @@
 %   |\mmzCMemo|.
 \def\mmz at write@cmemo{%
   % Open the file for writing.
-  \immediate\mmz at openout\mmz at out{\mmz at cmemo@path}%
+  \immediate\openout\mmz at out{\mmz at cmemo@path}%
   % The memo starts with the |\mmzMemo| marker (a signal that the memo is valid).
   \immediate\write\mmz at out{\noexpand\mmzMemo}%
   % We store the content of |\mmzContextExtra| by writing out a command that
@@ -1714,7 +1708,7 @@
   % memoized code can update the context.  This is one of the two reasons why
   % we couldn't write the cc-memo directly into the file, but had to collect
   % its contents into token register |\mmzCCMemo|.
-  \immediate\mmz at openout\mmz at out{\mmz at ccmemo@path}%
+  \immediate\openout\mmz at out{\mmz at ccmemo@path}%
   % Token register |\mmz at ccmemo@resources| consists of calls to
   % |\mmz at ccmemo@append at resource|, so the following code writes down the list
   % of created externs into the cc-memo.  Wanting to have this list at the top
@@ -2428,7 +2422,7 @@
 % the external scripts).
 \def\mmz at clear@extraction at log{%
   \begingroup
-  \immediate\mmz at openout0{\jobname.mmz.log}%
+  \immediate\openout0{\jobname.mmz.log}%
   \immediate\closeout0
   \endgroup
 }
@@ -2544,7 +2538,7 @@
     % location (the current directory, i.e.\ the directory where \hologo{TeX}
     % is executed from; usually, this will be the directory containing the
     % \hologo{TeX} source).
-    \immediate\mmz at openout\mmz at mmzout{\jobname.mmz}%
+    \immediate\openout\mmz at mmzout{\jobname.mmz}%
   },
   % The |\mmzPrefix| is used by the clean-up script, which will remove all
   % files with the given path prefix but (unless called with |--all|) those
@@ -2567,6 +2561,8 @@
     \immediate\write\mmz at mmzout{%
       \noexpand\mmzNewExtern{#1}{\pagenumber}{\expectedwidth}{\expectedheight}%
     }%
+    % Support |latexmk|:
+    %<latex>\typeout{No file #1}%
   },
   record/mmz/new cmemo/.code={%
     \immediate\write\mmz at mmzout{\noexpand\mmzNewCMemo{#1}}%
@@ -2607,7 +2603,7 @@
 % \begin{key}{record/sh/...} Define the Linux shell script record type.
   record/sh/begin/.code={%
     \newwrite\mmz at shout
-    \immediate\mmz at openout\mmz at shout{\mmz at shname}%
+    \immediate\openout\mmz at shout{\mmz at shname}%
   },
   record/sh/new extern/.code={%
     \begingroup
@@ -2626,7 +2622,7 @@
 %   Rinse and repeat for Windows.
   record/bat/begin/.code={%
     \newwrite\mmz at batout
-    \immediate\mmz at openout\mmz at batout{\mmz at batname}%
+    \immediate\openout\mmz at batout{\mmz at batname}%
   },
   record/bat/new extern/.code={%
     \begingroup
@@ -2664,7 +2660,7 @@
     % variables |.DEFAULT_GOAL| and |.PHONY|.
     \newwrite\mmz at makefileout
     \newtoks\mmz at makefile@externs
-    \immediate\mmz at openout\mmz at makefileout{\mmz at makefilename}%
+    \immediate\openout\mmz at makefileout{\mmz at makefilename}%
     \immediate\write\mmz at makefileout{.DEFAULT_GOAL = externs}%
     \immediate\write\mmz at makefileout{.PHONY: externs}%
   },
@@ -3401,6 +3397,57 @@
     outer handler=\global\advance\mmzExtraPages1\relax\AdviceOriginal}}
 %</latex>
 % 
+% Utility macro for clarity below. |#1| is the name of the package which should
+% be loaded (used with \hologo{LaTeX}) and |#2| is the name of the command
+% which should be defined (used with \hologo{plainTeX} and \hologo{ConTeXt})
+% for |#3| to be executed at the beginning of the document.  We make sure that
+% we can use |#1| etc.\ inside |#3|.
+\def\mmz at if@package at loaded#1#2#3{%
+  \mmzset{%
+    begindocument/before/.append code={%
+      %<latex>\@ifpackageloaded{#1}{%
+      %<plain,context>\ifdefined#2%
+        #3%
+        %<plain,context>\fi
+      %<latex>}{}%
+    }%
+  }%
+}
+% 
+% \subsection{\pkg{PGF}}
+%
+\mmz at if@package at loaded{pgf}{%
+  %<plain>\pgfpicture
+  %<context>\startpgfpicture
+}{%
+  \def\mmzPgfAtBeginMemoization{%
+    \edef\mmz at pgfpictureid{%
+      \the\pgf at picture@serial at count
+    }%
+  }%
+  \def\mmzPgfAtEndMemoization{%
+    \edef\mmz at temp{%
+      \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax
+    }%
+    \ifx\mmz at temp=0
+    \else
+      \xtoksapp\mmzCCMemo{%
+        \unexpanded{%
+          \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
+        }%
+        \mmz at temp
+      }%
+    \fi
+  }%
+  % \begin{listingregion}{_support-pgf.tex}
+  \mmzset{%
+    at begin memoization=\mmzPgfAtBeginMemoization,
+    at end memoization=\mmzPgfAtEndMemoization,
+  }%
+  % \end{listingregion}
+}
+% 
+% 
 % \subsection{\TikZ;}
 % \label{sec:code:mmz:tikz}
 %
@@ -3408,32 +3455,16 @@
 % Advice).  All the action happens at the end of the preamble, so that we can
 % detect whether \TikZ; was loaded (regardless of whether Memoize was loaded
 % before \TikZ;, or vice versa), but still input the definitions.
-\mmzset{
-  begindocument/before/.append code={%
-    %<latex>\@ifpackageloaded{tikz}{%
-    %<plain,context>\ifdefined\tikz
-      \input advice-tikz.code.tex
-    %<latex>}{}%
-    %<plain,context>\fi
-    % We define and activate the automemoization handlers for the \TikZ; command
-    % and environment.
-    \mmzset{%
-      auto/memoize tikz/.style={
-        memoize,
-        at begin memoization=\edef\mmz at pgfpictureid{%
-          \the\pgf at picture@serial at count
-        },
-        at end memoization=\xtoksapp\mmzCCMemo{%
-          \unexpanded{%
-            \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
-          }%
-          \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax\relax
-        },
-      },
-      auto=\tikz{memoize tikz, collector=\AdviceCollectTikZArguments},
-      auto={tikzpicture}{memoize tikz},
-    }%
-  },
+\mmz at if@package at loaded{tikz}{\tikz}{%
+  \input advice-tikz.code.tex
+  % We define and activate the automemoization handlers for the \TikZ; command
+  % and environment.
+  % \begin{listingregion}{_support-tikz.tex}
+  \mmzset{%
+    auto={tikzpicture}{memoize},
+    auto=\tikz{memoize, collector=\AdviceCollectTikZArguments},
+  }%
+  % \end{listingregion}
 }
 % 
 %
@@ -3441,18 +3472,16 @@
 % \label{sec:code:forest}
 %
 % Forest will soon feature extensive memoization support, but for now, let's
-% just enable the basic, single extern externalization.
+% just enable the basic, single extern externalization.  Command |\Forest| is
+% defined using |xparse|, so |args| is unnecessary.
 %<*latex>
-\mmzset{
-  begindocument/before/.append code={%
-    \@ifpackageloaded{forest}{%
-      \mmzset{
-        auto={forest}{memoize},
-% Yes, |\Forest| is defined using |xparse|.
-        auto=\Forest{memoize},
-      }%
-    }{}%
-  },
+\mmz at if@package at loaded{forest}{\Forest}{%
+  % \begin{listingregion}{_support-forest.tex}
+  \mmzset{
+    auto={forest}{memoize},
+    auto=\Forest{memoize},
+  }%
+  % \end{listingregion}
 }
 %</latex>
 % 
@@ -3502,69 +3531,176 @@
 }{}}
 %</latex>
 %
-% \subsection{Morewrites}
-% \label{sec:code:morewrites}
-% 
-% Use the old grammar for |\openin| and |\openout| as a temporary workaround.
-% |prefix|es containing spaces must be quoted manually.
-%<*latex>
-\AddToHook{begindocument/before}{%
-  \@ifpackageloaded{morewrites}{%
-    \def\mmz at openin#1#2{\openin#1=#2\relax}%
-    \def\mmz at openout#1#2{\openout#1=#2\relax}%
-  }{}%
-}
-%</latex>
-%
 % \subsection{Biblatex}
 % \label{sec:biblatex}
 %
+% 
 %<*latex>
 \mmzset{
-  begindocument/before/.append style={%
-    auto=\blx at bbl@entry{outer handler=\mmz at biblatex@entry},
-    auto/cite/.style={run if memoizing, outer handler=\mmz at biblatex@cite},
-    auto/cites/.style={run if memoizing, outer handler=\mmz at biblatex@cites},
-    auto=\cite{cite},
-    auto=\cites{cites},
-  }%
+  biblatex/.code={%
+    \mmz at if@package at loaded{biblatex}{}{%
+      \input memoize-biblatex.code.tex
+      \mmzset{#1}%
+    }%
+  },
 }
+%</latex>
+%</mmz>
+%<*biblatex>
+\edef\memoizeresetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax}%
+\catcode`\@=11
+\mmzset{%
+  % Advise macro |\entry| occuring in |.bbl| files to collect the entry,
+  % verbatim. |args|: |m| = citation key, |&&{...}u| = the entry, verbatim,
+  % braced --- so |\blx at bbl@entry| will receive two mandatory arguments.
+  auto=\blx at bbl@entry{
+    inner handler=\mmz at biblatex@entry,
+    args={%
+      m%
+      &&{\collargsVerb
+        \collargsAppendExpandablePostprocessor{{\the\collargsArg}}%
+      }u{\endentry}%
+    },
+    % No braces around the collected arguments, as each is already braced on
+    % its own.
+    raw collector options=\collargsReturnPlain,
+  },
+  % \begin{mmzautokey}{cite,volcite,cites,volcites}
+  %   Define handlers for citation commands. 
+  auto/cite/.style={
+    run conditions=\mmz at biblatex@cite at rc,
+    outer handler=\mmz at biblatex@cite at outer,
+    args=l*m,
+    raw collector options=\mmz at biblatex@def at star\collargsReturnNo,
+    inner handler=\mmz at biblatex@cite at inner,
+  },
+  % We need a dedicated |volcite| even though |\volcite| executes |\cite|
+  % because otherwise, we would end up with |\cite{volume}{key}| in the cc-memo
+  % when |biblatex ccmemo cite=replicate|.
+  auto/volcite/.style={
+    run if memoizing,
+    outer handler=\mmz at biblatex@cite at outer,
+    args=lml*m,
+    raw collector options=\mmz at biblatex@def at star\collargsReturnNo,
+    inner handler=\mmz at biblatex@cite at inner,
+  },
+  auto/cites/.style={
+    run conditions=\mmz at biblatex@cite at rc,
+    outer handler=\mmz at biblatex@cites at outer,
+    args=l*m,
+    raw collector options=\mmz at biblatex@def at star\collargsClearArgsfalse\collargsReturnNo,
+    inner handler=\mmz at biblatex@cites at inner,
+  },
+  auto/volcites/.style={
+    run if memoizing,
+    outer handler=\mmz at biblatex@cites at outer,
+    args=lml*m,
+    raw collector options=\mmz at biblatex@def at star\collargsClearArgsfalse\collargsReturnNo,
+    inner handler=\mmz at biblatex@cites at inner,
+  },
+  % \end{mmzautokey}
+  % \begin{mmzautokey}{biblatex ccmemo cite}
+  %   What to put into the cc-memo, |\nocite| or the handled citation command?
+  biblatex ccmemo cite/.is choice,
+  biblatex ccmemo cite/nocite/.code={%
+    \let\mmz at biblatex@do at ccmemo\mmz at biblatex@do at nocite
+  },
+  biblatex ccmemo cite/replicate/.code={%
+    \let\mmz at biblatex@do at ccmemo\mmz at biblatex@do at replicate
+  },
+  % \end{mmzautokey}
+}%
 % \begin{macro}{\mmz at biblatex@entry}
 %   This macro stores the MD5 sum of the |\entry| when reading the |.bbl| file.
-\def\mmz at biblatex@entry#1#2\endentry{%
-  \protected at edef\mmz at temp{\pdf at mdfivesum{#2}}%
+\def\mmz at biblatex@entry#1#2{%
+  \edef\mmz at temp{\pdf at mdfivesum{#2}}%
   \global\cslet{mmz at bbl@#1}\mmz at temp
-  \AdviceOriginal{#1}#2\endentry
+  \mmz at scantokens{\AdviceOriginal{#1}#2}%
 }
 % \end{macro}
-% \begin{macro}{\mmz at biblatex@cite}
-%   This macro puts the cites reference keys into the context, and adds the
-%   handled |\cite| command to the cc-memo.
-\def\mmz at biblatex@cite#1#{\mmz at biblatex@cite at i{#1}}
-\def\mmz at biblatex@cite at i#1#2{%
-  \forcsvlist\mmz at biblatex@cite at do@key{#2}%
-  \xtoksapp\mmzCCMemo{%
-    \noexpand\setbox0\noexpand\hbox{%
-      \expandonce\AdviceOriginal\unexpanded{#1}{#2}%
-    }}%
-  \AdviceOriginal#1{#2}%
+% \begin{macro}{\mmz at biblatex@cite at rc}
+%   Run if memoizing but not within a |\volcite| command. Applied to |\cite(s)|.
+\def\mmz at biblatex@cite at rc{%
+  \ifmemoizing
+    % We cannot use the official |\ifvolcite|, or even the |blx at volcite| toggle
+    %   it depends on, because these are defined\slash set within the
+    %   next-citation hook, which is yet to be executed.  So we depend on the
+    %   internal detail that |\volcite| and friends redefine |\blx at citeargs| to
+    %   |\blx at volciteargs|.
+    \ifx\blx at citeargs\blx at volciteargs
+    \else
+      \AdviceRuntrue
+    \fi
+  \fi
 }
-\def\mmz at biblatex@cite at do@key#1{%
+% \end{macro}
+% \begin{macro}{\mmz at biblatex@cite at outer}
+%   Initialize the macro receiving the citation key(s), and execute the
+%   collector.
+\def\mmz at biblatex@cite at outer{%
+  \gdef\mmz at biblatex@keys{}%
+  \AdviceCollector
+}
+% \end{macro}
+% \begin{macro}{\mmz at biblatex@mark at citation@key}
+%   We \emph{append} to |\mmz at biblatex@keys| to automatically collect all
+%   citation keys of a |\cites| command; note that we use this system for
+%   |\cite| as well.
+\def\mmz at biblatex@def at star{%
+  \collargsAlias{*}{&&{\mmz at biblatex@mark at citation@key}}%
+}
+\def\mmz at biblatex@mark at citation@key{%
+  \collargsAppendPreprocessor{\xappto\mmz at biblatex@keys{,\the\collargsArg}}%
+}
+% \end{macro}
+% \begin{macro}{\mmz at biblatex@cite at inner}
+\def\mmz at biblatex@cite at inner{%
+  % This macro puts the cites reference keys into the context, and adds
+  % |\nocite|, or the handled citation command, to the cc-memo.
+  \mmz at biblatex@do at context
+  \mmz at biblatex@do at ccmemo
+  \expandafter\AdviceOriginal\the\collargsArgs
+}
+\def\mmz at biblatex@do at context{%
+  \expandafter\forcsvlist
+    \expandafter\mmz at biblatex@do at context@one
+    \expandafter{\mmz at biblatex@keys}%
+}
+\def\mmz at biblatex@do at context@one#1{%
   \mmz at mtoc@csname{mmz at bbl@#1}%
   \ifcsdef{mmz at bbl@#1}{}{\mmzAbort}%
 }
+\def\mmz at biblatex@do at nocite{%
+  \xtoksapp\mmzCCMemo{%
+    \noexpand\nocite{\mmz at biblatex@keys}%
+  }%
+}
+\def\mmz at biblatex@do at replicate{%
+  \xtoksapp\mmzCCMemo{%
+    {%
+      \nullfont
+      % It is ok to use |\AdviceName| here, as the cc-memo is never input
+      % during memoization.
+      \expandonce\AdviceName\the\collargsArgs
+    }%
+  }%
+}
+\let\mmz at biblatex@do at ccmemo\mmz at biblatex@do at nocite
 % \end{macro}
-% \begin{macro}{\mmz at biblatex@cites}
-%   This macro puts the cites reference keys into the context, and adds the
-%   handled |\cites| command to the cc-memo.
-\def\mmz at biblatex@cites{%
-  \mmz at temptoks{}%
-  \mmz at biblatex@cites at i
+% \begin{macro}{\mmz at biblatex@cites at outer}
+%   Same as for |cite|, but we iterate the collector as long as the arguments
+%   continue.
+\def\mmz at biblatex@cites at outer{%
+  \global\collargsArgs{}%
+  \gdef\mmz at biblatex@keys{}%
+  \AdviceCollector
 }
-\def\mmz at biblatex@cites at i{%
-  \futurelet\mmz at temp\mmz at biblatex@cites at ii
+\def\mmz at biblatex@cites at inner{%
+  \futurelet\mmz at temp\mmz at biblatex@cites at inner@again
 }
-\def\mmz at biblatex@cites at ii{%
+% If the following token is an opening brace or bracket, the
+% multicite arguments continue.
+\def\mmz at biblatex@cites at inner@again{%
   \mmz at tempfalse
   \ifx\mmz at temp\bgroup
     \mmz at temptrue
@@ -3574,26 +3710,97 @@
     \fi
   \fi
   \ifmmz at temp
-    \expandafter\mmz at biblatex@cites at iii
+    \expandafter\AdviceCollector
   \else
-    \expandafter\mmz at biblatex@cites at z
+    \expandafter\mmz at biblatex@cites at inner@finish
   \fi
 }
-\def\mmz at biblatex@cites at iii#1#{\mmz at biblatex@cites at iv{#1}}
-\def\mmz at biblatex@cites at iv#1#2{%
-  \forcsvlist\mmz at biblatex@cite at do@key{#2}%
-  \toksapp\mmz at temptoks{#1{#2}}%
-  \mmz at biblatex@cites at i
+\def\mmz at biblatex@cites at inner@finish{%
+  \mmz at biblatex@do at context
+  \mmz at biblatex@do at ccmemo
+  \expandafter\AdviceOriginal\the\collargsArgs
 }
-\def\mmz at biblatex@cites at z{%
-  \xtoksapp\mmzCCMemo{%
-    \noexpand\setbox0\noexpand\hbox{%
-      \expandonce\AdviceOriginal\the\mmz at temptoks
-    }}%
-  \expandafter\AdviceOriginal\the\mmz at temptoks
+% \end{macro}
+% 
+% \paragraph{Advise} the citation commands.
+\mmzset{
+  auto=\cite{cite},
+  auto=\Cite{cite},
+  auto=\parencite{cite},
+  auto=\Parencite{cite},
+  auto=\footcite{cite},
+  auto=\footcitetext{cite},
+  auto=\textcite{cite},
+  auto=\Textcite{cite},
+  auto=\smartcite{cite},
+  auto=\Smartcite{cite},
+  auto=\supercite{cite},
+  auto=\cites{cites},
+  auto=\Cites{cites},
+  auto=\parencites{cites},
+  auto=\Parencites{cites},
+  auto=\footcites{cites},
+  auto=\footcitetexts{cites},
+  auto=\smartcites{cites},
+  auto=\Smartcites{cites},
+  auto=\textcites{cites},
+  auto=\Textcites{cites},
+  auto=\supercites{cites},
+  auto=\autocite{cite},
+  auto=\Autocite{cite},
+  auto=\autocites{cites},
+  auto=\Autocites{cites},
+  auto=\citeauthor{cite},
+  auto=\Citeauthor{cite},
+  auto=\citetitle{cite},
+  auto=\citeyear{cite},
+  auto=\citedate{cite},
+  auto=\citeurl{cite},
+  auto=\nocite{cite},
+  auto=\fullcite{cite},
+  auto=\footfullcite{cite},
+  auto=\volcite{volcite},
+  auto=\Volcite{volcite},
+  auto=\volcites{volcites},
+  auto=\Volcites{volcites},
+  auto=\pvolcite{volcite},
+  auto=\Pvolcite{volcite},
+  auto=\pvolcites{volcites},
+  auto=\Pvolcites{volcites},
+  auto=\fvolcite{volcite},
+  auto=\Fvolcite{volcite},
+  auto=\fvolcites{volcites},
+  auto=\Fvolcites{volcites},
+  auto=\ftvolcite{volcite},
+  auto=\ftvolcites{volcites},
+  auto=\Ftvolcite{volcite},
+  auto=\Ftvolcites{volcites},
+  auto=\svolcite{volcite},
+  auto=\Svolcite{volcite},
+  auto=\svolcites{volcites},
+  auto=\Svolcites{volcites},
+  auto=\tvolcite{volcite},
+  auto=\Tvolcite{volcite},
+  auto=\tvolcites{volcites},
+  auto=\Tvolcites{volcites},
+  auto=\avolcite{volcite},
+  auto=\Avolcite{volcite},
+  auto=\avolcites{volcites},
+  auto=\Avolcites{volcites},
+  auto=\notecite{cite},
+  auto=\Notecite{cite},
+  auto=\pnotecite{cite},
+  auto=\Pnotecite{cite},
+  auto=\fnotecite{cite},
+  % Similar to |volcite|, these commands must be handled specifically in order
+  % to function correctly with |biblatex ccmemo cite=replicate|.
+  auto=\citename{cite, args=l*mlm},
+  auto=\citelist{cite, args=l*mlm},
+  auto=\citefield{cite, args=l*mlm},
 }
-%</latex>
-% \end{macro}
+\memoizeresetatcatcode
+%</biblatex>
+%<*mmz>
 %
 %
 % \section{Initialization}
@@ -3627,6 +3834,14 @@
   end document/.style={enddocument/afterlastpage},
 }
 %</plain,context>
+% We clear the hooks after executing the last of them.
+\mmzset{
+  begindocument/end/.append style={
+    begindocument/before/.code={},
+    begindocument/.code={},
+    begindocument/end/.code={},
+  }
+}
 % \end{key}
 % 
 % Formats other than \hologo{plainTeX} need a way to prevent extraction during

Modified: trunk/Master/texmf-dist/source/generic/memoize/memoize.ins
===================================================================
--- trunk/Master/texmf-dist/source/generic/memoize/memoize.ins	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/source/generic/memoize/memoize.ins	2024-03-18 19:59:51 UTC (rev 70690)
@@ -36,5 +36,6 @@
   \file{t-memoizable.tex}{\from{memoize.dtx}{mmzable,context}}%  
   \file{memoizable.code.tex}{\from{memoize.dtx}{mmzable,generic}}%
   \file{memoize-extract-one.tex}{\from{memoize.dtx}{extract-one}}%
+  \file{memoize-biblatex.code.tex}{\from{memoize.dtx}{biblatex}}%
 }
 \endbatchfile

Modified: trunk/Master/texmf-dist/tex/context/third/memoize/t-memoizable.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/memoize/t-memoizable.tex	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/context/third/memoize/t-memoizable.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -26,11 +26,11 @@
 %% (<texmf>/doc/generic/memoize/)FILES.
 %D \module[
 %D         file=t-memoizable.tex,
-%D      version=1.1.2,
+%D      version=1.2.0,
 %D        title=Memoizable,
 %D     subtitle=A programmer's stub for Memoize,
 %D       author=Saso Zivanovic,
-%D         date=2024-01-21,
+%D         date=2024-03-15,
 %D    copyright=Saso Zivanovic,
 %D      license=LPPL,
 %D ]

Modified: trunk/Master/texmf-dist/tex/context/third/memoize/t-memoize.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/memoize/t-memoize.tex	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/context/third/memoize/t-memoize.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -26,11 +26,11 @@
 %% (<texmf>/doc/generic/memoize/)FILES.
 %D \module[
 %D         file=t-memoize.tex,
-%D      version=1.1.2,
+%D      version=1.2.0,
 %D        title=Memoize,
 %D     subtitle=Fast and flexible externalization,
 %D       author=Saso Zivanovic,
-%D         date=2024-01-21,
+%D         date=2024-03-15,
 %D    copyright=Saso Zivanovic,
 %D      license=LPPL,
 %D ]
@@ -119,7 +119,7 @@
 \ifmmz at loadstatus{1}{\endinput}{}%
 \def\mmz at loadstatus{1}%
 \def\filetotoks#1#2{%
-  \immediate\mmz at openin0{#2}%
+  \immediate\openin0{#2}%
   #1={}%
   \loop
   \unless\ifeof0
@@ -128,8 +128,6 @@
   \repeat
   \immediate\closein0
 }
-\let\mmz at openin\openin
-\let\mmz at openout\openout
 \newif\ifmmz at temp
 \newtoks\mmz at temptoks
 \newbox\mmz at box
@@ -217,9 +215,9 @@
 }
 \def\mmz at remove@quotes at i{%
   \CollectArgumentsRaw
-    {\collargsBraceCollectedfalse
+    {\collargsReturnPlain
       \collargsNoDelimiterstrue
-      \collargsAppendPostwrap{{##1}}%
+      \collargsAppendExpandablePostprocessor{{\the\collargsArg}}%
     }%
     {u"u\mmz at eov}%
     \mmz at remove@quotes at ii
@@ -315,7 +313,7 @@
       \expandonce\mmzRawCollectorOptions
       \ifmmz at verbatim\mmz at verbatim@fix\fi
     }%
-  }{&&{\collargsAppendPostwrap{}}!t{ }+b{memoize}}{\mmz at do}%
+  }{&&{\collargsAppendExpandablePostprocessor{}}!t{ }+b{memoize}}{\mmz at do}%
 }%
 \protected\def\nommz#1#{%
   \afterassignment\nommz at i
@@ -702,7 +700,7 @@
 \newif\ifmmz at include@source
 \mmz at include@sourcetrue
 \def\mmz at write@cmemo{%
-  \immediate\mmz at openout\mmz at out{\mmz at cmemo@path}%
+  \immediate\openout\mmz at out{\mmz at cmemo@path}%
   \immediate\write\mmz at out{\noexpand\mmzMemo}%
   \immediate\write\mmz at out{%
     \global\mmzContextExtra{\the\mmzContextExtra}\collargs at percentchar
@@ -757,7 +755,7 @@
   direct ccmemo input/.is if=mmz at direct@ccmemo at input,
 }
 \def\mmz at write@ccmemo{%
-  \immediate\mmz at openout\mmz at out{\mmz at ccmemo@path}%
+  \immediate\openout\mmz at out{\mmz at ccmemo@path}%
   \begingroup
   \the\mmz at ccmemo@resources
   \endgroup
@@ -1078,7 +1076,7 @@
 }
 \def\mmz at clear@extraction at log{%
   \begingroup
-  \immediate\mmz at openout0{\jobname.mmz.log}%
+  \immediate\openout0{\jobname.mmz.log}%
   \immediate\closeout0
   \endgroup
 }
@@ -1135,7 +1133,7 @@
 \mmzset{
   record/mmz/begin/.code={%
     \newwrite\mmz at mmzout
-    \immediate\mmz at openout\mmz at mmzout{\jobname.mmz}%
+    \immediate\openout\mmz at mmzout{\jobname.mmz}%
   },
   record/mmz/prefix/.code={%
     \immediate\write\mmz at mmzout{\noexpand\mmzPrefix{#1}}%
@@ -1170,7 +1168,7 @@
   bat=memoize-extract.\jobname.bat,
   record/sh/begin/.code={%
     \newwrite\mmz at shout
-    \immediate\mmz at openout\mmz at shout{\mmz at shname}%
+    \immediate\openout\mmz at shout{\mmz at shname}%
   },
   record/sh/new extern/.code={%
     \begingroup
@@ -1182,7 +1180,7 @@
   },
   record/bat/begin/.code={%
     \newwrite\mmz at batout
-    \immediate\mmz at openout\mmz at batout{\mmz at batname}%
+    \immediate\openout\mmz at batout{\mmz at batname}%
   },
   record/bat/new extern/.code={%
     \begingroup
@@ -1203,7 +1201,7 @@
   record/makefile/begin/.code={%
     \newwrite\mmz at makefileout
     \newtoks\mmz at makefile@externs
-    \immediate\mmz at openout\mmz at makefileout{\mmz at makefilename}%
+    \immediate\openout\mmz at makefileout{\mmz at makefilename}%
     \immediate\write\mmz at makefileout{.DEFAULT_GOAL = externs}%
     \immediate\write\mmz at makefileout{.PHONY: externs}%
   },
@@ -1408,33 +1406,60 @@
   \pgfeov
   \AdviceOriginal
 }
-\mmzset{
-  begindocument/before/.append code={%
-    \ifdefined\tikz
-      \input advice-tikz.code.tex
-    \fi
-    \mmzset{%
-      auto/memoize tikz/.style={
-        memoize,
-        at begin memoization=\edef\mmz at pgfpictureid{%
-          \the\pgf at picture@serial at count
-        },
-        at end memoization=\xtoksapp\mmzCCMemo{%
-          \normalunexpanded{%
-            \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
-          }%
-          \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax\relax
-        },
-      },
-      auto=\tikz{memoize tikz, collector=\AdviceCollectTikZArguments},
-      auto={tikzpicture}{memoize tikz},
+\def\mmz at if@package at loaded#1#2#3{%
+  \mmzset{%
+    begindocument/before/.append code={%
+      \ifdefined#2%
+        #3%
+        \fi
     }%
-  },
+  }%
 }
+\mmz at if@package at loaded{pgf}{%
+  \startpgfpicture
+}{%
+  \def\mmzPgfAtBeginMemoization{%
+    \edef\mmz at pgfpictureid{%
+      \the\pgf at picture@serial at count
+    }%
+  }%
+  \def\mmzPgfAtEndMemoization{%
+    \edef\mmz at temp{%
+      \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax
+    }%
+    \ifx\mmz at temp=0
+    \else
+      \xtoksapp\mmzCCMemo{%
+        \normalunexpanded{%
+          \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
+        }%
+        \mmz at temp
+      }%
+    \fi
+  }%
+  \mmzset{%
+    at begin memoization=\mmzPgfAtBeginMemoization,
+    at end memoization=\mmzPgfAtEndMemoization,
+  }%
+}
+\mmz at if@package at loaded{tikz}{\tikz}{%
+  \input advice-tikz.code.tex
+  \mmzset{%
+    auto={tikzpicture}{memoize},
+    auto=\tikz{memoize, collector=\AdviceCollectTikZArguments},
+  }%
+}
 \mmzset{
   begin document/.style={begindocument/before, begindocument, begindocument/end},
   end document/.style={enddocument/afterlastpage},
 }
+\mmzset{
+  begindocument/end/.append style={
+    begindocument/before/.code={},
+    begindocument/.code={},
+    begindocument/end/.code={},
+  }
+}
 \mmzset{extract/no/.code={}}
 \InputIfFileExists{memoize.cfg}{}{}
 \let\mmz at initial@extraction at method\mmz at extraction@method

Modified: trunk/Master/texmf-dist/tex/context/third/memoize/t-nomemoize.tex
===================================================================
--- trunk/Master/texmf-dist/tex/context/third/memoize/t-nomemoize.tex	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/context/third/memoize/t-nomemoize.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -26,11 +26,11 @@
 %% (<texmf>/doc/generic/memoize/)FILES.
 %D \module[
 %D         file=t-nomemoize.tex,
-%D      version=1.1.2,
+%D      version=1.2.0,
 %D        title=Memoize,
 %D     subtitle=A no-op stub for Memoize,
 %D       author=Saso Zivanovic,
-%D         date=2024-01-21,
+%D         date=2024-03-15,
 %D    copyright=Saso Zivanovic,
 %D      license=LPPL,
 %D ]

Modified: trunk/Master/texmf-dist/tex/latex/memoize/memoizable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/memoize/memoizable.sty	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/latex/memoize/memoizable.sty	2024-03-18 19:59:51 UTC (rev 70690)
@@ -24,7 +24,7 @@
 %%
 %% The files belonging to this work and covered by LPPL are listed in
 %% (<texmf>/doc/generic/memoize/)FILES.
-\ProvidesPackage{memoizable}[2024/01/21 v1.1.2 A programmer's stub for Memoize]
+\ProvidesPackage{memoizable}[2024/03/15 v1.2.0 A programmer's stub for Memoize]
 \RequirePackage{pgfkeys}
 \input memoizable.code.tex
 \endinput

Added: trunk/Master/texmf-dist/tex/latex/memoize/memoize-biblatex.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/memoize/memoize-biblatex.code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/memoize/memoize-biblatex.code.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -0,0 +1,231 @@
+%%
+%% This is file `memoize-biblatex.code.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% memoize.dtx  (with options: `biblatex')
+%% 
+%% This file is a part of Memoize, a TeX package for externalization of
+%% graphics and memoization of compilation results in general, available at
+%% https://ctan.org/pkg/memoize and https://github.com/sasozivanovic/memoize.
+%%
+%% Copyright (c) 2020- Saso Zivanovic <saso.zivanovic at guest.arnes.si>
+%%                     (Sa\v{s}o \v{Z}ivanovi\'{c})
+%%
+%% This work may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License, either version 1.3c of this license or (at
+%% your option) any later version.  The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt and version 1.3c or later is part of
+%% all distributions of LaTeX version 2008 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%% The Current Maintainer of this work is Saso Zivanovic.
+%%
+%% The files belonging to this work and covered by LPPL are listed in
+%% (<texmf>/doc/generic/memoize/)FILES.
+\edef\memoizeresetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax}%
+\catcode`\@=11
+\mmzset{%
+  auto=\blx at bbl@entry{
+    inner handler=\mmz at biblatex@entry,
+    args={%
+      m%
+      &&{\collargsVerb
+        \collargsAppendExpandablePostprocessor{{\the\collargsArg}}%
+      }u{\endentry}%
+    },
+    raw collector options=\collargsReturnPlain,
+  },
+  auto/cite/.style={
+    run conditions=\mmz at biblatex@cite at rc,
+    outer handler=\mmz at biblatex@cite at outer,
+    args=l*m,
+    raw collector options=\mmz at biblatex@def at star\collargsReturnNo,
+    inner handler=\mmz at biblatex@cite at inner,
+  },
+  auto/volcite/.style={
+    run if memoizing,
+    outer handler=\mmz at biblatex@cite at outer,
+    args=lml*m,
+    raw collector options=\mmz at biblatex@def at star\collargsReturnNo,
+    inner handler=\mmz at biblatex@cite at inner,
+  },
+  auto/cites/.style={
+    run conditions=\mmz at biblatex@cite at rc,
+    outer handler=\mmz at biblatex@cites at outer,
+    args=l*m,
+    raw collector options=\mmz at biblatex@def at star\collargsClearArgsfalse\collargsReturnNo,
+    inner handler=\mmz at biblatex@cites at inner,
+  },
+  auto/volcites/.style={
+    run if memoizing,
+    outer handler=\mmz at biblatex@cites at outer,
+    args=lml*m,
+    raw collector options=\mmz at biblatex@def at star\collargsClearArgsfalse\collargsReturnNo,
+    inner handler=\mmz at biblatex@cites at inner,
+  },
+  biblatex ccmemo cite/.is choice,
+  biblatex ccmemo cite/nocite/.code={%
+    \let\mmz at biblatex@do at ccmemo\mmz at biblatex@do at nocite
+  },
+  biblatex ccmemo cite/replicate/.code={%
+    \let\mmz at biblatex@do at ccmemo\mmz at biblatex@do at replicate
+  },
+}%
+\def\mmz at biblatex@entry#1#2{%
+  \edef\mmz at temp{\pdf at mdfivesum{#2}}%
+  \global\cslet{mmz at bbl@#1}\mmz at temp
+  \mmz at scantokens{\AdviceOriginal{#1}#2}%
+}
+\def\mmz at biblatex@cite at rc{%
+  \ifmemoizing
+    \ifx\blx at citeargs\blx at volciteargs
+    \else
+      \AdviceRuntrue
+    \fi
+  \fi
+}
+\def\mmz at biblatex@cite at outer{%
+  \gdef\mmz at biblatex@keys{}%
+  \AdviceCollector
+}
+\def\mmz at biblatex@def at star{%
+  \collargsAlias{*}{&&{\mmz at biblatex@mark at citation@key}}%
+}
+\def\mmz at biblatex@mark at citation@key{%
+  \collargsAppendPreprocessor{\xappto\mmz at biblatex@keys{,\the\collargsArg}}%
+}
+\def\mmz at biblatex@cite at inner{%
+  \mmz at biblatex@do at context
+  \mmz at biblatex@do at ccmemo
+  \expandafter\AdviceOriginal\the\collargsArgs
+}
+\def\mmz at biblatex@do at context{%
+  \expandafter\forcsvlist
+    \expandafter\mmz at biblatex@do at context@one
+    \expandafter{\mmz at biblatex@keys}%
+}
+\def\mmz at biblatex@do at context@one#1{%
+  \mmz at mtoc@csname{mmz at bbl@#1}%
+  \ifcsdef{mmz at bbl@#1}{}{\mmzAbort}%
+}
+\def\mmz at biblatex@do at nocite{%
+  \xtoksapp\mmzCCMemo{%
+    \noexpand\nocite{\mmz at biblatex@keys}%
+  }%
+}
+\def\mmz at biblatex@do at replicate{%
+  \xtoksapp\mmzCCMemo{%
+    {%
+      \nullfont
+      \expandonce\AdviceName\the\collargsArgs
+    }%
+  }%
+}
+\let\mmz at biblatex@do at ccmemo\mmz at biblatex@do at nocite
+\def\mmz at biblatex@cites at outer{%
+  \global\collargsArgs{}%
+  \gdef\mmz at biblatex@keys{}%
+  \AdviceCollector
+}
+\def\mmz at biblatex@cites at inner{%
+  \futurelet\mmz at temp\mmz at biblatex@cites at inner@again
+}
+\def\mmz at biblatex@cites at inner@again{%
+  \mmz at tempfalse
+  \ifx\mmz at temp\bgroup
+    \mmz at temptrue
+  \else
+    \ifx\mmz at temp[%]
+      \mmz at temptrue
+    \fi
+  \fi
+  \ifmmz at temp
+    \expandafter\AdviceCollector
+  \else
+    \expandafter\mmz at biblatex@cites at inner@finish
+  \fi
+}
+\def\mmz at biblatex@cites at inner@finish{%
+  \mmz at biblatex@do at context
+  \mmz at biblatex@do at ccmemo
+  \expandafter\AdviceOriginal\the\collargsArgs
+}
+\mmzset{
+  auto=\cite{cite},
+  auto=\Cite{cite},
+  auto=\parencite{cite},
+  auto=\Parencite{cite},
+  auto=\footcite{cite},
+  auto=\footcitetext{cite},
+  auto=\textcite{cite},
+  auto=\Textcite{cite},
+  auto=\smartcite{cite},
+  auto=\Smartcite{cite},
+  auto=\supercite{cite},
+  auto=\cites{cites},
+  auto=\Cites{cites},
+  auto=\parencites{cites},
+  auto=\Parencites{cites},
+  auto=\footcites{cites},
+  auto=\footcitetexts{cites},
+  auto=\smartcites{cites},
+  auto=\Smartcites{cites},
+  auto=\textcites{cites},
+  auto=\Textcites{cites},
+  auto=\supercites{cites},
+  auto=\autocite{cite},
+  auto=\Autocite{cite},
+  auto=\autocites{cites},
+  auto=\Autocites{cites},
+  auto=\citeauthor{cite},
+  auto=\Citeauthor{cite},
+  auto=\citetitle{cite},
+  auto=\citeyear{cite},
+  auto=\citedate{cite},
+  auto=\citeurl{cite},
+  auto=\nocite{cite},
+  auto=\fullcite{cite},
+  auto=\footfullcite{cite},
+  auto=\volcite{volcite},
+  auto=\Volcite{volcite},
+  auto=\volcites{volcites},
+  auto=\Volcites{volcites},
+  auto=\pvolcite{volcite},
+  auto=\Pvolcite{volcite},
+  auto=\pvolcites{volcites},
+  auto=\Pvolcites{volcites},
+  auto=\fvolcite{volcite},
+  auto=\Fvolcite{volcite},
+  auto=\fvolcites{volcites},
+  auto=\Fvolcites{volcites},
+  auto=\ftvolcite{volcite},
+  auto=\ftvolcites{volcites},
+  auto=\Ftvolcite{volcite},
+  auto=\Ftvolcites{volcites},
+  auto=\svolcite{volcite},
+  auto=\Svolcite{volcite},
+  auto=\svolcites{volcites},
+  auto=\Svolcites{volcites},
+  auto=\tvolcite{volcite},
+  auto=\Tvolcite{volcite},
+  auto=\tvolcites{volcites},
+  auto=\Tvolcites{volcites},
+  auto=\avolcite{volcite},
+  auto=\Avolcite{volcite},
+  auto=\avolcites{volcites},
+  auto=\Avolcites{volcites},
+  auto=\notecite{cite},
+  auto=\Notecite{cite},
+  auto=\pnotecite{cite},
+  auto=\Pnotecite{cite},
+  auto=\fnotecite{cite},
+  auto=\citename{cite, args=l*mlm},
+  auto=\citelist{cite, args=l*mlm},
+  auto=\citefield{cite, args=l*mlm},
+}
+\memoizeresetatcatcode
+\endinput
+%%
+%% End of file `memoize-biblatex.code.tex'.


Property changes on: trunk/Master/texmf-dist/tex/latex/memoize/memoize-biblatex.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/memoize/memoize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/memoize/memoize.sty	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/latex/memoize/memoize.sty	2024-03-18 19:59:51 UTC (rev 70690)
@@ -24,7 +24,7 @@
 %%
 %% The files belonging to this work and covered by LPPL are listed in
 %% (<texmf>/doc/generic/memoize/)FILES.
-\ProvidesPackage{memoize}[2024/01/21 v1.1.2 Fast and flexible externalization]
+\ProvidesPackage{memoize}[2024/03/15 v1.2.0 Fast and flexible externalization]
 \RequirePackage{etoolbox}
 \ifdefined\luatexversion
   \directlua{memoize = {}}
@@ -80,7 +80,7 @@
 \ifmmz at loadstatus{1}{\endinput}{}%
 \def\mmz at loadstatus{1}%
 \def\filetotoks#1#2{%
-  \immediate\mmz at openin0{#2}%
+  \immediate\openin0{#2}%
   #1={}%
   \loop
   \unless\ifeof0
@@ -89,8 +89,6 @@
   \repeat
   \immediate\closein0
 }
-\let\mmz at openin\openin
-\let\mmz at openout\openout
 \newif\ifmmz at temp
 \newtoks\mmz at temptoks
 \newbox\mmz at box
@@ -178,9 +176,9 @@
 }
 \def\mmz at remove@quotes at i{%
   \CollectArgumentsRaw
-    {\collargsBraceCollectedfalse
+    {\collargsReturnPlain
       \collargsNoDelimiterstrue
-      \collargsAppendPostwrap{{##1}}%
+      \collargsAppendExpandablePostprocessor{{\the\collargsArg}}%
     }%
     {u"u\mmz at eov}%
     \mmz at remove@quotes at ii
@@ -272,7 +270,7 @@
       \expandonce\mmzRawCollectorOptions
       \ifmmz at verbatim\mmz at verbatim@fix\fi
     }%
-  }{&&{\collargsAppendPostwrap{}}!t{ }+b{memoize}}{\mmz at do}%
+  }{&&{\collargsAppendExpandablePostprocessor{}}!t{ }+b{memoize}}{\mmz at do}%
 }%
 \protected\def\nommz#1#{%
   \afterassignment\nommz at i
@@ -670,7 +668,7 @@
 \newif\ifmmz at include@source
 \mmz at include@sourcetrue
 \def\mmz at write@cmemo{%
-  \immediate\mmz at openout\mmz at out{\mmz at cmemo@path}%
+  \immediate\openout\mmz at out{\mmz at cmemo@path}%
   \immediate\write\mmz at out{\noexpand\mmzMemo}%
   \immediate\write\mmz at out{%
     \global\mmzContextExtra{\the\mmzContextExtra}\collargs at percentchar
@@ -725,7 +723,7 @@
   direct ccmemo input/.is if=mmz at direct@ccmemo at input,
 }
 \def\mmz at write@ccmemo{%
-  \immediate\mmz at openout\mmz at out{\mmz at ccmemo@path}%
+  \immediate\openout\mmz at out{\mmz at ccmemo@path}%
   \begingroup
   \the\mmz at ccmemo@resources
   \endgroup
@@ -1044,7 +1042,7 @@
 }
 \def\mmz at clear@extraction at log{%
   \begingroup
-  \immediate\mmz at openout0{\jobname.mmz.log}%
+  \immediate\openout0{\jobname.mmz.log}%
   \immediate\closeout0
   \endgroup
 }
@@ -1101,7 +1099,7 @@
 \mmzset{
   record/mmz/begin/.code={%
     \newwrite\mmz at mmzout
-    \immediate\mmz at openout\mmz at mmzout{\jobname.mmz}%
+    \immediate\openout\mmz at mmzout{\jobname.mmz}%
   },
   record/mmz/prefix/.code={%
     \immediate\write\mmz at mmzout{\noexpand\mmzPrefix{#1}}%
@@ -1110,6 +1108,7 @@
     \immediate\write\mmz at mmzout{%
       \noexpand\mmzNewExtern{#1}{\pagenumber}{\expectedwidth}{\expectedheight}%
     }%
+    \typeout{No file #1}%
   },
   record/mmz/new cmemo/.code={%
     \immediate\write\mmz at mmzout{\noexpand\mmzNewCMemo{#1}}%
@@ -1136,7 +1135,7 @@
   bat=memoize-extract.\jobname.bat,
   record/sh/begin/.code={%
     \newwrite\mmz at shout
-    \immediate\mmz at openout\mmz at shout{\mmz at shname}%
+    \immediate\openout\mmz at shout{\mmz at shname}%
   },
   record/sh/new extern/.code={%
     \begingroup
@@ -1148,7 +1147,7 @@
   },
   record/bat/begin/.code={%
     \newwrite\mmz at batout
-    \immediate\mmz at openout\mmz at batout{\mmz at batname}%
+    \immediate\openout\mmz at batout{\mmz at batname}%
   },
   record/bat/new extern/.code={%
     \begingroup
@@ -1169,7 +1168,7 @@
   record/makefile/begin/.code={%
     \newwrite\mmz at makefileout
     \newtoks\mmz at makefile@externs
-    \immediate\mmz at openout\mmz at makefileout{\mmz at makefilename}%
+    \immediate\openout\mmz at makefileout{\mmz at makefilename}%
     \immediate\write\mmz at makefileout{.DEFAULT_GOAL = externs}%
     \immediate\write\mmz at makefileout{.PHONY: externs}%
   },
@@ -1450,39 +1449,54 @@
 \AddToHook{shipout/after}[memoize]{\global\advance\mmzExtraPages1\relax}
 \mmzset{auto=\DiscardShipoutBox{
     outer handler=\global\advance\mmzExtraPages1\relax\AdviceOriginal}}
-\mmzset{
-  begindocument/before/.append code={%
-    \@ifpackageloaded{tikz}{%
-      \input advice-tikz.code.tex
-    }{}%
-    \mmzset{%
-      auto/memoize tikz/.style={
-        memoize,
-        at begin memoization=\edef\mmz at pgfpictureid{%
-          \the\pgf at picture@serial at count
-        },
-        at end memoization=\xtoksapp\mmzCCMemo{%
-          \unexpanded{%
-            \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
-          }%
-          \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax\relax
-        },
-      },
-      auto=\tikz{memoize tikz, collector=\AdviceCollectTikZArguments},
-      auto={tikzpicture}{memoize tikz},
+\def\mmz at if@package at loaded#1#2#3{%
+  \mmzset{%
+    begindocument/before/.append code={%
+      \@ifpackageloaded{#1}{%
+        #3%
+      }{}%
     }%
-  },
+  }%
 }
-\mmzset{
-  begindocument/before/.append code={%
-    \@ifpackageloaded{forest}{%
-      \mmzset{
-        auto={forest}{memoize},
-        auto=\Forest{memoize},
+\mmz at if@package at loaded{pgf}{%
+}{%
+  \def\mmzPgfAtBeginMemoization{%
+    \edef\mmz at pgfpictureid{%
+      \the\pgf at picture@serial at count
+    }%
+  }%
+  \def\mmzPgfAtEndMemoization{%
+    \edef\mmz at temp{%
+      \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax
+    }%
+    \ifx\mmz at temp=0
+    \else
+      \xtoksapp\mmzCCMemo{%
+        \unexpanded{%
+          \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
+        }%
+        \mmz at temp
       }%
-    }{}%
-  },
+    \fi
+  }%
+  \mmzset{%
+    at begin memoization=\mmzPgfAtBeginMemoization,
+    at end memoization=\mmzPgfAtEndMemoization,
+  }%
 }
+\mmz at if@package at loaded{tikz}{\tikz}{%
+  \input advice-tikz.code.tex
+  \mmzset{%
+    auto={tikzpicture}{memoize},
+    auto=\tikz{memoize, collector=\AdviceCollectTikZArguments},
+  }%
+}
+\mmz at if@package at loaded{forest}{\Forest}{%
+  \mmzset{
+    auto={forest}{memoize},
+    auto=\Forest{memoize},
+  }%
+}
 \AddToHook{begindocument/before}{\@ifclassloaded{beamer}{%
   \mmzset{per overlay/.style={
     /mmz/context={%
@@ -1519,78 +1533,25 @@
     \fi
   }%
 }{}}
-\AddToHook{begindocument/before}{%
-  \@ifpackageloaded{morewrites}{%
-    \def\mmz at openin#1#2{\openin#1=#2\relax}%
-    \def\mmz at openout#1#2{\openout#1=#2\relax}%
-  }{}%
-}
 \mmzset{
-  begindocument/before/.append style={%
-    auto=\blx at bbl@entry{outer handler=\mmz at biblatex@entry},
-    auto/cite/.style={run if memoizing, outer handler=\mmz at biblatex@cite},
-    auto/cites/.style={run if memoizing, outer handler=\mmz at biblatex@cites},
-    auto=\cite{cite},
-    auto=\cites{cites},
-  }%
+  biblatex/.code={%
+    \mmz at if@package at loaded{biblatex}{}{%
+      \input memoize-biblatex.code.tex
+      \mmzset{#1}%
+    }%
+  },
 }
-\def\mmz at biblatex@entry#1#2\endentry{%
-  \protected at edef\mmz at temp{\pdf at mdfivesum{#2}}%
-  \global\cslet{mmz at bbl@#1}\mmz at temp
-  \AdviceOriginal{#1}#2\endentry
-}
-\def\mmz at biblatex@cite#1#{\mmz at biblatex@cite at i{#1}}
-\def\mmz at biblatex@cite at i#1#2{%
-  \forcsvlist\mmz at biblatex@cite at do@key{#2}%
-  \xtoksapp\mmzCCMemo{%
-    \noexpand\setbox0\noexpand\hbox{%
-      \expandonce\AdviceOriginal\unexpanded{#1}{#2}%
-    }}%
-  \AdviceOriginal#1{#2}%
-}
-\def\mmz at biblatex@cite at do@key#1{%
-  \mmz at mtoc@csname{mmz at bbl@#1}%
-  \ifcsdef{mmz at bbl@#1}{}{\mmzAbort}%
-}
-\def\mmz at biblatex@cites{%
-  \mmz at temptoks{}%
-  \mmz at biblatex@cites at i
-}
-\def\mmz at biblatex@cites at i{%
-  \futurelet\mmz at temp\mmz at biblatex@cites at ii
-}
-\def\mmz at biblatex@cites at ii{%
-  \mmz at tempfalse
-  \ifx\mmz at temp\bgroup
-    \mmz at temptrue
-  \else
-    \ifx\mmz at temp[%]
-      \mmz at temptrue
-    \fi
-  \fi
-  \ifmmz at temp
-    \expandafter\mmz at biblatex@cites at iii
-  \else
-    \expandafter\mmz at biblatex@cites at z
-  \fi
-}
-\def\mmz at biblatex@cites at iii#1#{\mmz at biblatex@cites at iv{#1}}
-\def\mmz at biblatex@cites at iv#1#2{%
-  \forcsvlist\mmz at biblatex@cite at do@key{#2}%
-  \toksapp\mmz at temptoks{#1{#2}}%
-  \mmz at biblatex@cites at i
-}
-\def\mmz at biblatex@cites at z{%
-  \xtoksapp\mmzCCMemo{%
-    \noexpand\setbox0\noexpand\hbox{%
-      \expandonce\AdviceOriginal\the\mmz at temptoks
-    }}%
-  \expandafter\AdviceOriginal\the\mmz at temptoks
-}
 \AddToHook{begindocument/before}{\mmzset{begindocument/before}}
 \AddToHook{begindocument}{\mmzset{begindocument}}
 \AddToHook{begindocument/end}{\mmzset{begindocument/end}}
 \AddToHook{enddocument/afterlastpage}{\mmzset{enddocument/afterlastpage}}
+\mmzset{
+  begindocument/end/.append style={
+    begindocument/before/.code={},
+    begindocument/.code={},
+    begindocument/end/.code={},
+  }
+}
 \mmzset{extract/no/.code={}}
 \InputIfFileExists{memoize.cfg}{}{}
 \let\mmz at initial@extraction at method\mmz at extraction@method

Modified: trunk/Master/texmf-dist/tex/latex/memoize/nomemoize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/memoize/nomemoize.sty	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/latex/memoize/nomemoize.sty	2024-03-18 19:59:51 UTC (rev 70690)
@@ -24,7 +24,7 @@
 %%
 %% The files belonging to this work and covered by LPPL are listed in
 %% (<texmf>/doc/generic/memoize/)FILES.
-\ProvidesPackage{nomemoize}[2024/01/21 v1.1.2 A no-op stub for Memoize]
+\ProvidesPackage{nomemoize}[2024/03/15 v1.2.0 A no-op stub for Memoize]
 \RequirePackage{pgfkeys}
 \def\ifmmz at loadstatus#1{%
   \ifnum#1=0\csname mmz at loadstatus\endcsname\relax

Modified: trunk/Master/texmf-dist/tex/plain/memoize/memoizable.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/memoize/memoizable.tex	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/plain/memoize/memoizable.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -24,7 +24,7 @@
 %%
 %% The files belonging to this work and covered by LPPL are listed in
 %% (<texmf>/doc/generic/memoize/)FILES.
-% Package memoizable 2024/01/21 v1.1.2
+% Package memoizable 2024/03/15 v1.2.0
 \input miniltx
 \input pgfkeys
 \input memoizable.code.tex

Modified: trunk/Master/texmf-dist/tex/plain/memoize/memoize.tex
===================================================================
--- trunk/Master/texmf-dist/tex/plain/memoize/memoize.tex	2024-03-18 19:59:31 UTC (rev 70689)
+++ trunk/Master/texmf-dist/tex/plain/memoize/memoize.tex	2024-03-18 19:59:51 UTC (rev 70690)
@@ -24,7 +24,7 @@
 %%
 %% The files belonging to this work and covered by LPPL are listed in
 %% (<texmf>/doc/generic/memoize/)FILES.
-% Package memoize 2024/01/21 v1.1.2
+% Package memoize 2024/03/15 v1.2.0
 \input miniltx
 \def\PackageWarning#1#2{{%
     \newlinechar`\^^J\def\MessageBreak{^^J\space\space#1: }%
@@ -94,7 +94,7 @@
 \ifmmz at loadstatus{1}{\endinput}{}%
 \def\mmz at loadstatus{1}%
 \def\filetotoks#1#2{%
-  \immediate\mmz at openin0{#2}%
+  \immediate\openin0{#2}%
   #1={}%
   \loop
   \unless\ifeof0
@@ -103,8 +103,6 @@
   \repeat
   \immediate\closein0
 }
-\let\mmz at openin\openin
-\let\mmz at openout\openout
 \newif\ifmmz at temp
 \newtoks\mmz at temptoks
 \newbox\mmz at box
@@ -192,9 +190,9 @@
 }
 \def\mmz at remove@quotes at i{%
   \CollectArgumentsRaw
-    {\collargsBraceCollectedfalse
+    {\collargsReturnPlain
       \collargsNoDelimiterstrue
-      \collargsAppendPostwrap{{##1}}%
+      \collargsAppendExpandablePostprocessor{{\the\collargsArg}}%
     }%
     {u"u\mmz at eov}%
     \mmz at remove@quotes at ii
@@ -290,7 +288,7 @@
       \expandonce\mmzRawCollectorOptions
       \ifmmz at verbatim\mmz at verbatim@fix\fi
     }%
-  }{&&{\collargsAppendPostwrap{}}!t{ }+b{memoize}}{\mmz at do}%
+  }{&&{\collargsAppendExpandablePostprocessor{}}!t{ }+b{memoize}}{\mmz at do}%
 }%
 \protected\def\nommz#1#{%
   \afterassignment\nommz at i
@@ -699,7 +697,7 @@
 \newif\ifmmz at include@source
 \mmz at include@sourcetrue
 \def\mmz at write@cmemo{%
-  \immediate\mmz at openout\mmz at out{\mmz at cmemo@path}%
+  \immediate\openout\mmz at out{\mmz at cmemo@path}%
   \immediate\write\mmz at out{\noexpand\mmzMemo}%
   \immediate\write\mmz at out{%
     \global\mmzContextExtra{\the\mmzContextExtra}\collargs at percentchar
@@ -754,7 +752,7 @@
   direct ccmemo input/.is if=mmz at direct@ccmemo at input,
 }
 \def\mmz at write@ccmemo{%
-  \immediate\mmz at openout\mmz at out{\mmz at ccmemo@path}%
+  \immediate\openout\mmz at out{\mmz at ccmemo@path}%
   \begingroup
   \the\mmz at ccmemo@resources
   \endgroup
@@ -1072,7 +1070,7 @@
 }
 \def\mmz at clear@extraction at log{%
   \begingroup
-  \immediate\mmz at openout0{\jobname.mmz.log}%
+  \immediate\openout0{\jobname.mmz.log}%
   \immediate\closeout0
   \endgroup
 }
@@ -1129,7 +1127,7 @@
 \mmzset{
   record/mmz/begin/.code={%
     \newwrite\mmz at mmzout
-    \immediate\mmz at openout\mmz at mmzout{\jobname.mmz}%
+    \immediate\openout\mmz at mmzout{\jobname.mmz}%
   },
   record/mmz/prefix/.code={%
     \immediate\write\mmz at mmzout{\noexpand\mmzPrefix{#1}}%
@@ -1164,7 +1162,7 @@
   bat=memoize-extract.\jobname.bat,
   record/sh/begin/.code={%
     \newwrite\mmz at shout
-    \immediate\mmz at openout\mmz at shout{\mmz at shname}%
+    \immediate\openout\mmz at shout{\mmz at shname}%
   },
   record/sh/new extern/.code={%
     \begingroup
@@ -1176,7 +1174,7 @@
   },
   record/bat/begin/.code={%
     \newwrite\mmz at batout
-    \immediate\mmz at openout\mmz at batout{\mmz at batname}%
+    \immediate\openout\mmz at batout{\mmz at batname}%
   },
   record/bat/new extern/.code={%
     \begingroup
@@ -1197,7 +1195,7 @@
   record/makefile/begin/.code={%
     \newwrite\mmz at makefileout
     \newtoks\mmz at makefile@externs
-    \immediate\mmz at openout\mmz at makefileout{\mmz at makefilename}%
+    \immediate\openout\mmz at makefileout{\mmz at makefilename}%
     \immediate\write\mmz at makefileout{.DEFAULT_GOAL = externs}%
     \immediate\write\mmz at makefileout{.PHONY: externs}%
   },
@@ -1402,33 +1400,60 @@
   \pgfeov
   \AdviceOriginal
 }
-\mmzset{
-  begindocument/before/.append code={%
-    \ifdefined\tikz
-      \input advice-tikz.code.tex
-    \fi
-    \mmzset{%
-      auto/memoize tikz/.style={
-        memoize,
-        at begin memoization=\edef\mmz at pgfpictureid{%
-          \the\pgf at picture@serial at count
-        },
-        at end memoization=\xtoksapp\mmzCCMemo{%
-          \unexpanded{%
-            \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
-          }%
-          \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax\relax
-        },
-      },
-      auto=\tikz{memoize tikz, collector=\AdviceCollectTikZArguments},
-      auto={tikzpicture}{memoize tikz},
+\def\mmz at if@package at loaded#1#2#3{%
+  \mmzset{%
+    begindocument/before/.append code={%
+      \ifdefined#2%
+        #3%
+        \fi
     }%
-  },
+  }%
 }
+\mmz at if@package at loaded{pgf}{%
+  \pgfpicture
+}{%
+  \def\mmzPgfAtBeginMemoization{%
+    \edef\mmz at pgfpictureid{%
+      \the\pgf at picture@serial at count
+    }%
+  }%
+  \def\mmzPgfAtEndMemoization{%
+    \edef\mmz at temp{%
+      \the\numexpr\pgf at picture@serial at count-\mmz at pgfpictureid\relax
+    }%
+    \ifx\mmz at temp=0
+    \else
+      \xtoksapp\mmzCCMemo{%
+        \unexpanded{%
+          \global\expandafter\advance\csname pgf at picture@serial at count\endcsname
+        }%
+        \mmz at temp
+      }%
+    \fi
+  }%
+  \mmzset{%
+    at begin memoization=\mmzPgfAtBeginMemoization,
+    at end memoization=\mmzPgfAtEndMemoization,
+  }%
+}
+\mmz at if@package at loaded{tikz}{\tikz}{%
+  \input advice-tikz.code.tex
+  \mmzset{%
+    auto={tikzpicture}{memoize},
+    auto=\tikz{memoize, collector=\AdviceCollectTikZArguments},
+  }%
+}
 \mmzset{
   begin document/.style={begindocument/before, begindocument, begindocument/end},
   end document/.style={enddocument/afterlastpage},
 }
+\mmzset{
+  begindocument/end/.append style={
+    begindocument/before/.code={},
+    begindocument/.code={},
+    begindocument/end/.code={},
+  }
+}
 \InputIfFileExists{memoize.cfg}{}{}
 \mmzset{
   extract/.is choice,



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