texlive[59210] Master/texmf-dist: pgf (15may21)

commits+karl at tug.org commits+karl at tug.org
Sat May 15 22:36:08 CEST 2021


Revision: 59210
          http://tug.org/svn/texlive?view=revision&revision=59210
Author:   karl
Date:     2021-05-15 22:36:08 +0200 (Sat, 15 May 2021)
Log Message:
-----------
pgf (15may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pgf/ChangeLog
    trunk/Master/texmf-dist/doc/generic/pgf/FILES
    trunk/Master/texmf-dist/doc/generic/pgf/RELEASE_NOTES.md
    trunk/Master/texmf-dist/doc/generic/pgf/pgfmanual.pdf
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-nodes.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-guidelines.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-edges.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-math.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex
    trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex
    trunk/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh
    trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex
    trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
    trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def
    trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
    trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
    trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
    trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
    trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/generic/pgf/README.md

Modified: trunk/Master/texmf-dist/doc/generic/pgf/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/ChangeLog	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/ChangeLog	2021-05-15 20:36:08 UTC (rev 59210)
@@ -1,3 +1,203 @@
+2021-05-15 Henri Menke
+
+    - Release 3.1.9a
+
+2021-05-08 Henri Menke
+
+    - Merge pull request #1012 from TorbjornT/incontrol_doc
+
+2021-05-08 Torbjørn T
+
+    - Specify that relative coord is to end point
+
+2021-04-12 Henri Menke
+
+    - Merge pull request #1005 from kechtel/patch-1
+
+2021-04-12 Christoph Kecht
+
+    - Fix typo in guidelines on graphics
+
+2021-04-11 Henri Menke
+
+    - CI: Expire the cache
+
+2021-04-11 Henri Menke
+
+    - Merge pull request #1004 from michal-h21/patch-1
+
+2021-04-11 Michal Hoftich
+
+    - Update pgfsys-dvisvgm4ht.def
+
+2021-04-03 Henri Menke
+
+    - Merge pull request #1003 from tknuth/patch-1
+
+2021-04-03 Dr. Tobias Knuth
+
+    - fixed typo
+
+2021-04-02 muzimuzhi
+
+    - Merge pull request #977 from muzimuzhi/pgf-point-node-border
+
+2021-04-01 muzimuzhi
+
+    - adjust comments
+
+2021-01-16 muzimuzhi
+
+    - \pgfpointshapeborder: measure by distance < 0.02pt
+
+2021-01-14 muzimuzhi
+
+    - \pgfpointshapeborder: more doc words
+
+2021-01-13 muzimuzhi
+
+    - doc: use paired `` and ''
+
+2021-01-13 muzimuzhi
+
+    - \pgfpointshapeborder: doc new behavior
+
+2021-01-13 muzimuzhi
+
+    - pgf/shapes: add warning when \pgfpointshapeborder gives up
+
+2021-01-10 muzimuzhi
+
+    - pgf/shapes: improve \pgfpointshapeborder, #908
+
+2021-03-25 Henri Menke
+
+    - Merge pull request #1002 from muzimuzhi/edef-keys
+
+2021-03-24 muzimuzhi
+
+    - pgfkeys: enhance edef keys, #305
+
+2021-03-05 Henri Menke
+
+    - fixup! build: copy the README into the TDS archive
+
+2021-03-02 Henri Menke
+
+    - build: copy the README into the TDS archive
+
+2021-03-02 Henri Menke
+
+    - Release 3.1.9
+
+2021-03-02 Henri Menke
+
+    - Merge pull request #996 from muzimuzhi/dvips-blend-mode
+
+2021-02-28 muzimuzhi
+
+    - dvips: fix displacement after blend group, #995
+
+2021-02-24 muzimuzhi
+
+    - Revert "syntax is similar to METAPOST not METAFONT"
+
+2021-02-23 muzimuzhi
+
+    - Merge pull request #994 from itmm/master
+
+2021-02-22 Timm Knape
+
+    - syntax is similar to METAPOST not METAFONT
+
+2021-02-14 Henri Menke
+
+    - Merge pull request #992 from joel-coffman/dev/fix-code-2-args-documentation
+
+2021-02-13 Joel Coffman
+
+    - Correct documentation for .code 2 args second arg
+
+2021-01-22 Henri Menke
+
+    - Merge pull request #987 from muzimuzhi/doc-typo
+
+2021-01-22 muzimuzhi
+
+    - doc: fix typo #986
+
+2021-01-14 muzimuzhi
+
+    - Merge pull request #981 from muzimuzhi/fix-tikz at handle
+
+2021-01-14 muzimuzhi
+
+    - Apply suggestions from code review
+
+2021-01-13 muzimuzhi
+
+    - tikz: fix uses of \pgfutil at switch
+
+2021-01-11 Henri Menke
+
+    - Merge pull request #979 from muzimuzhi/doc-install-only
+
+2021-01-11 muzimuzhi
+
+    - doc/fpu: fpu: mark /pgf/fpu/install only as not experimental
+
+2020-12-25 Henri Menke
+
+    - Fix and document dim() #964
+
+2021-01-04 Henri Menke
+
+    - Merge pull request #976 from muzimuzhi/tikz-math
+
+2021-01-05 muzimuzhi
+
+    - tikz/math: gobble spaces between for list and loop body
+
+2021-01-04 Henri Menke
+
+    - Merge pull request #970 from muzimuzhi/reset-tikz at expandcount
+
+2021-01-05 muzimuzhi
+
+    - tikz: retry to handle \relax on path #966
+
+2021-01-04 Henri Menke
+
+    - tikz/calendar: switch over \pgf at let@token in \tikz at lib@cal at handle
+
+2021-01-02 Henri Menke
+
+    - Merge pull request #973 from schtandard/spurious_show
+
+2021-01-02 schtandard
+
+    - Remove a spurious \show
+
+2021-01-02 Henri Menke
+
+    - Merge pull request #972 from alisaaalehi/patch-1
+
+2021-01-02 Ali Salehi
+
+    - doc: fix typo
+
+2021-01-01 Henri Menke
+
+    - tikz: switch over \pgf at let@token in \tikz at handle
+
+2020-12-29 Henri Menke
+
+    - tikz: improve \tikz at expandcount handling
+
+2020-12-29 muzimuzhi
+
+    - tikz: reset \tikz at expandcount more frequent #969
+
 2020-12-27 Henri Menke
 
     - Release 3.1.8b

Modified: trunk/Master/texmf-dist/doc/generic/pgf/FILES
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/FILES	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/FILES	2021-05-15 20:36:08 UTC (rev 59210)
@@ -1,6 +1,7 @@
 doc/generic/pgf/ChangeLog
 doc/generic/pgf/FILES
 doc/generic/pgf/INSTALL
+doc/generic/pgf/README.md
 doc/generic/pgf/RELEASE_NOTES.md
 doc/generic/pgf/description.html
 doc/generic/pgf/extract.lua

Added: trunk/Master/texmf-dist/doc/generic/pgf/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pgf/README.md	2021-05-15 20:36:08 UTC (rev 59210)
@@ -0,0 +1,53 @@
+# pgf – A Portable Graphic Format for TeX
+
+![CI](https://github.com/pgf-tikz/pgf/workflows/CI/badge.svg)
+
+PGF is a TeX macro package for generating graphics. It is platform-
+and format-independent and works together with the most important TeX
+backend drivers, including `pdftex` and `dvips`. It comes with a
+user-friendly syntax layer called Ti*k*Z.
+
+See the directory `doc/generic/pgf` for more information. See the file
+`doc/generic/pgf/pgfmanual.pdf` (also available from 
+https://pgf-tikz.github.io/pgf/pgfmanual.pdf) for a manual. This
+documentation also explains the installation.  See the file
+`doc/generic/pgf/license/LICENSE` for license details.
+
+Please go to the official repository at https://github.com/pgf-tikz/pgf or the
+official mailing list at https://tug.org/mailman/listinfo/pgf-tikz to submit
+bug reports, request new features, etc.
+
+## Installation
+
+In general you should just use the version of PGF that is shipped by
+your TeX distribution.  See their documentation on how to install
+packages.
+
+If you are feeling adventurous you can install the latest development
+version in TeX Live from our tlcontrib repository.
+```console
+$ tlmgr repository add http://pgf-tikz.github.io/pgf/tlnet pgf-development
+$ tlmgr pinning add pgf-development "*"
+$ tlmgr update --self --all
+$ tlmgr install pgf --reinstall
+```
+
+## Development
+
+Currently PGF does not have a comprehensive test suite to check for
+regressions, so for now we check for bugs by building the manual for
+each commit.  To build the manual locally you can either copy the PGF
+repository into your texmf tree (not recommended) or use the usertree
+option of TeX Live.  For the usertree option on GNU/Linux, follow
+these steps:
+```console
+$ git clone https://github.com/pgf-tikz/pgf
+$ tlmgr init-usertree --usertree pgf
+$ export TEXMFHOME=$(readlink -f pgf)
+$ cd pgf
+$ texlua build.lua manual luatex
+```
+We recommend building at least the version for LuaTeX, as shown in the
+example above because this has the broadest coverage of PGF features.
+To test the animations feature you have to build the version for
+dvisvgm.


Property changes on: trunk/Master/texmf-dist/doc/generic/pgf/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/generic/pgf/RELEASE_NOTES.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/RELEASE_NOTES.md	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/RELEASE_NOTES.md	2021-05-15 20:36:08 UTC (rev 59210)
@@ -1,5 +1 @@
-Hotfix for handling of TeX conditionals on a path.  We can't forward \relax and
-frozen \relax through the parser because there is existing code that relies on
-this.
-
-The recommendation is to use expandable conditionals where possible.
+Emergency release to fix pgfplots which depends on unreleased parts of PGF.

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

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-nodes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-nodes.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-nodes.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -601,6 +601,9 @@
 \end{pgfpicture}
 \end{codeexample}
     %
+    \emph{Remark:} If the given \meta{point} is almost identical to the center
+    of \meta{node}, the node center is returned and a warning message will be
+    printed.
 \end{command}
 
 

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-guidelines.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-guidelines.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-guidelines.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -320,7 +320,7 @@
 questions based on the information in the table or in the graphic:
 %
 \begin{enumerate}
-    \item How many participants where there?
+    \item How many participants were there?
     \item How many participants returned the feedback form?
     \item What percentage of the participants returned the feedback form?
     \item How many participants checked ``very good''?

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-edges.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-edges.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-edges.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -253,7 +253,8 @@
     %
     \begin{key}{/tikz/in control=\meta{coordinate}}
         This option causes the \meta{coordinate} to be used as the target
-        control point.
+        control point. You can use a coordinate like |+(1,0)| to specify
+        a point relative to the \emph{end} coordinate.
     \end{key}
     %
     \begin{key}{/tikz/controls=\meta{coordinate}| and |\meta{coordinate}}

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -179,7 +179,8 @@
 \endgroup
 \end{codeexample}
     %
-    \emph{This key is experimental and can change or disappear at any time!}
+    This key is introduced in \pgfname v3.1.6 and marked stable since \pgfname
+    v3.1.8.
 \end{key}
 
 

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-math.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-math.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-library-math.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -68,7 +68,7 @@
     };
   };
   int \f, \i;
-  for \i in {0,1,...,20}{
+  for \i in {0,1,...,20} {
     \f = fibonacci(\i);
     print {\f, };
   };
@@ -86,8 +86,8 @@
 \tikz[x=0.25cm,y=0.25cm,
   evaluate={
     int \i, \j;
-    for \i in {0,...,10}{
-      for \j in {0,...,10}{
+    for \i in {0,...,10} {
+      for \j in {0,...,10} {
         \a{\i,\j} = (\i+\j)*5;
       };
     };
@@ -295,7 +295,7 @@
 
 \subsection{Repeating Things}
 
-\begin{math-keyword}{{for} \meta{variable} \texttt{in \{}\meta{list}\texttt{\}\{}\meta{expressions}\texttt{\};}}
+\begin{math-keyword}{{for} \meta{variable} \texttt{in \{}\meta{list} \texttt{\}\{}\meta{expressions}\texttt{\};}}
     This is a ``trimmed down'' version of the |\foreach| command available as
     part of \pgfname\ and \tikzname, but cannot currently be used outside of
     the |\tikzmath| command. It is important to note the following:
@@ -310,7 +310,7 @@
 \tikzmath{
   int \x, \v;
   \v=1;
-  for \x in {1,...,{random(3,10)}}{
+  for \x in {1,...,{random(3,10)}} {
      \v=\v*2;
   };
   print {$x=\x, v=\v$};
@@ -333,8 +333,8 @@
 \tikzmath{
   int \x, \y;
   \y = 0;
-  for \x1 in {1,...,5}{
-    for \x2 in {10,20,...,50}{
+  for \x1 in {1,...,5} {
+    for \x2 in {10,20,...,50} {
       \y = \y+\x1*\x2;
     };
   };
@@ -365,7 +365,7 @@
   \begin{tikzpicture}
   \tikzmath{
     int \x;
-    for \k in {0,10,...,350}{
+    for \k in {0,10,...,350} {
       if \k>260 then { let \c = orange; } else {
         if \k>170 then { let \c = blue; } else {
           if \k>80 then { let \c = red; } else {
@@ -409,7 +409,7 @@
   function product(\x,\y) {
     return \x*\y;
   };
-  int \i, \i, \k;
+  int \i, \j, \k;
   \i = random(1,10);
   \j = random(20, 40);
   \k = product(\i, \j);
@@ -441,7 +441,7 @@
 \tikzmath{
   int \x, \y, \z;
   \x = random(2, 5);
-  for \y in {0,...,6}{
+  for \y in {0,...,6} {
     \z = \x^\y;
     print {$\x^\y=\z$, };
   };
@@ -462,7 +462,7 @@
 \draw [help lines] grid (3,2);
 \tikzmath{
   coordinate \c;
-  for \x in {0,10,...,360}{
+  for \x in {0,10,...,360} {
     \c = (1.5cm, 1cm) + (\x:1cm and 0.5cm);
     { \fill (\c) circle [radius=1pt]; };
   };

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-math-parsing.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -484,7 +484,7 @@
 \begin{tikzpicture}
 \foreach \f [count=\i from 0] in
 {abs,acos,add,and,array,asin,atan,atan2,bin,ceil,cos,
- cosec,cosh,cot,deg,depth,div,divide,e,equal,factorial, false,
+ cosec,cosh,cot,deg,depth,dim,div,divide,e,equal,factorial, false,
  floor,frac,gcd,greater,height,hex,Hex,int,ifthenelse,iseven,isodd,isprime,
  less,ln,log10,log2,max,min,mod,Mod,multiply,
  neg,not,notequal,notgreater,notless,
@@ -1332,6 +1332,17 @@
     %
 \end{math-function}
 
+\begin{math-function}{dim(\mvar{x})}
+\mathcommand
+    This returns the dimension of the array \mvar{x}. The array must begin and
+    end with braces (e.g., |{1,2,3,4}|).
+    %
+\begin{codeexample}[]
+\pgfmathparse{dim({1,2,3,4})} \pgfmathresult
+\end{codeexample}
+    %
+\end{math-function}
+
 The following hyperbolic functions were adapted from code suggested by Martin
 Heller:
 

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgfkeys.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -1025,9 +1025,6 @@
 \pgfkeys{/page size={30cm}{20cm}}
 \end{codeexample}
     %
-    The second argument is optional: if it is not provided, it will be the
-    empty string.
-
     Because of the special way the \meta{value} is parsed, if you set
     \meta{value} to, for instance, |first| (without any braces), then |#1| will
     be set to |f| and |#2| will be set to |irst|.

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -270,7 +270,7 @@
 \subsubsection{Concept: Edge Labels and Styles}
 
 When connectors like |->| or |--| are used to connect nodes or whole chain
-groups, one or more edges will typically be created. These edges can be styles
+groups, one or more edges will typically be created. These edges can be styled
 easily by providing options in square brackets directly after these connectors:
 %
 \begin{codeexample}[preamble={\usetikzlibrary{graphs}}]

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-shapes.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -2627,6 +2627,10 @@
         Likewise, |(1,1)--(x)| will also have the line end on the border in the
         direction coming from |(1,1)|.
 
+        If the specified coordinate is almost identical to the node center, for
+        example |(x)--(0,0)|, no line will be drawn and a warning message will
+        be printed.
+
         In addition to |--|, the curve-to path operation |..| and the path
         operations \verb!-|! and \verb!|-! will also handle nodes without
         anchors correctly. Here is an example, see also

Modified: trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -793,7 +793,7 @@
 \end{codeexample}
 
 Note that there is no |--| between |(30:1cm)| and |++(0,-0.5)|. In detail, this
-path is interpreted as follows: ``First, the |(30:1cm)| tells me to move by pen
+path is interpreted as follows: ``First, the |(30:1cm)| tells me to move my pen
 to $(\cos 30^\circ,1/2)$. Next, there comes another coordinate specification,
 so I move my pen there without drawing anything. This new point is half a unit
 down from the last position, thus it is at $(\cos 30^\circ,0)$. Finally, I move

Modified: trunk/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh
===================================================================
--- trunk/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh	2021-05-15 20:36:08 UTC (rev 59210)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # it generates tex/generic/pgf/pgf.revision.tex which, in turn, will be loaded
 # by pgf.sty
 #

Modified: trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -358,7 +358,7 @@
 \def\tikz at lib@cal at calendar{%
   \begingroup%
     \let\tikz at lib@cal at ifs=\pgfutil at empty%
-    \tikz at expandcount=1000\relax%
+    \tikz at resetexpandcount
     \tikzset{name=,at={(0,0)}}%
     \let\%=\pgfcalendarshorthand%
     \tikzset{every calendar/.try}%
@@ -370,27 +370,13 @@
 }
 
 \def\tikz at lib@cal at handle{%
-  \let\pgfutil at next=\tikz at lib@cal at expand%
-  \ifx\pgf at let@token;%
-    \let\pgfutil at next=\tikz at lib@cal at stop%
-  \else%
-    \ifx\pgf at let@token(%)
-      \let\pgfutil at next=\tikz at lib@cal at name%
-    \else%
-      \ifx\pgf at let@token a%
-        \let\pgfutil at next=\tikz at lib@cal at at%
-      \else%
-        \ifx\pgf at let@token[%
-          \let\pgfutil at next=\tikz at lib@cal at option%
-        \else%
-          \ifx\pgf at let@token i%
-            \let\pgfutil at next=\tikz at lib@cal at if%
-          \fi%
-        \fi%
-      \fi%
-    \fi%
-  \fi%
-  \pgfutil at next%
+  \pgfutil at switch\pgfutil at ifx\pgf at let@token{%
+    {;}{\let\pgfutil at next\tikz at lib@cal at stop}%
+    {(}{\let\pgfutil at next\tikz at lib@cal at name}%)
+    {a}{\let\pgfutil at next\tikz at lib@cal at at}%
+    {[}{\let\pgfutil at next\tikz at lib@cal at option}%]
+    {i}{\let\pgfutil at next\tikz at lib@cal at if}%
+  }{\tikz at resetexpandcount\pgfutil at next}{\tikz at lib@cal at expand}%
 }
 \def\tikz at lib@cal at expand{%
   \advance\tikz at expandcount by -1

Modified: trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymath.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -532,7 +532,8 @@
 
 \long\def\tikz at math@for at parselist#1{%
     \edef\tikz at math@for at list{#1}%
-    \tikz at math@collecttosemicolon{\tikz at math@for at parseaction}}%
+    \tikz at math@gobblespaces{%
+      \tikz at math@collecttosemicolon{\tikz at math@for at parseaction}}}%
 
 \def\tikz at math@for at parseaction{%
     \tikz at math@for at namedef{prevvalue}{}%

Modified: trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryspy.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -97,7 +97,7 @@
         \pgftransformcm{\pgf at lib@svg at a}{\pgf at lib@svg at b}{\pgf at lib@svg at c}{\pgf at lib@svg at d}{\pgfpointorigin}%
       }
     }]{};
-    \expandafter\pgfutil at switch\expandafter{\tikz at anchor}{%
+    \expandafter\pgfutil at switch\expandafter\pgfutil at ifstrequal\expandafter{\tikz at anchor}{%
       {north}     {\def\tikz at spy@anchor{south}}%
       {north east}{\def\tikz at spy@anchor{south west}}%
       {east}      {\def\tikz at spy@anchor{west}}%
@@ -106,9 +106,7 @@
       {south west}{\def\tikz at spy@anchor{north east}}%
       {west}      {\def\tikz at spy@anchor{east}}%
       {north west}{\def\tikz at spy@anchor{south east}}%
-      % default to center
-      {default}   {\def\tikz at spy@anchor{center}}%
-    }
+    }{}{\def\tikz at spy@anchor{center}}%
     \node [alias=tikzspyinnode,inner sep=0pt,outer sep=0pt,at={#2},every spy in node/.try,
     path picture={\node[anchor=\tikz at spy@anchor,tikz at lib@reset at gs]{\nullfont%
         \pgfpicture\relax\pgfsetbaseline{default}\pgfsettrimleft{default}\pgfsettrimright{default}%

Modified: trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -2105,7 +2105,7 @@
     \tikz at snakedfalse%
     \tikz at decoratepathfalse%
     \tikz at node@is at a@labelfalse%
-    \tikz at expandcount=100\relax%
+    \tikz at resetexpandcount
     \pgf at path@lastx=0pt%
     \pgf at path@lasty=0pt%
     \tikz at lastx=0pt%
@@ -2123,127 +2123,44 @@
   \afterassignment\tikz at handle\let\pgf at let@token=%
 }%
 \newcount\tikz at expandcount
+\def\tikz at resetexpandcount{\tikz at expandcount=100\relax}
 \let\tikz at collected@onpath=\pgfutil at empty%
 
+\edef\tikz at frozen@relax at token{\ifnum0=0\fi}
+
 % Central dispatcher for commands
 \def\tikz at handle{%
-  \let\pgfutil at next=\tikz at expand%
-  \ifx\pgf at let@token(%)
-    \let\pgfutil at next=\tikz at movetoabs%
-  \else%
-    \ifx\pgf at let@token+%
-      \let\pgfutil at next=\tikz at movetorel%
-    \else%
-      \ifx\pgf at let@token-%
-        \let\pgfutil at next=\tikz at lineto%
-      \else%
-        \ifx\pgf at let@token.%
-          \let\pgfutil at next=\tikz at dot%
-        \else%
-          \ifx\pgf at let@token r%
-            \let\pgfutil at next=\tikz at rect%
-          \else%
-            \ifx\pgf at let@token n%
-              \let\pgfutil at next=\tikz at fig%
-            \else%
-              \ifx\pgf at let@token[%]
-                \let\pgfutil at next=\tikz at parse@options%
-              \else%
-                \ifx\pgf at let@token c%
-                  \let\pgfutil at next=\tikz at cchar%
-                \else%
-                  \ifx\pgf at let@token\bgroup%
-                    \let\pgfutil at next=\tikz at beginscope%
-                  \else%
-                    \ifx\pgf at let@token\egroup%
-                      \let\pgfutil at next=\tikz at endscope%
-                    \else%
-                      \ifx\pgf at let@token;%
-                        \let\pgfutil at next=\tikz at finish%
-                      \else%
-                        \let\pgfutil at next=\tikz at handle@more%
-                      \fi%
-                    \fi%
-                  \fi%
-                \fi%
-              \fi%
-            \fi%
-          \fi%
-        \fi%
-      \fi%
-    \fi%
-  \fi%
-  \pgfutil at next%
+  \pgfutil at switch\pgfutil at ifx\pgf at let@token{%
+    {(}{\let\pgfutil at next\tikz at movetoabs}%)
+    {+}{\let\pgfutil at next\tikz at movetorel}%
+    {-}{\let\pgfutil at next\tikz at lineto}%
+    {.}{\let\pgfutil at next\tikz at dot}%
+    {r}{\let\pgfutil at next\tikz at rect}%
+    {n}{\let\pgfutil at next\tikz at fig}%
+    {[}{\let\pgfutil at next\tikz at parse@options}%]
+    {c}{\let\pgfutil at next\tikz at cchar}%
+    {\bgroup}{\let\pgfutil at next\tikz at beginscope}%
+    {\egroup}{\let\pgfutil at next\tikz at endscope}%
+    {;}{\let\pgfutil at next\tikz at finish}%
+    {a}{\let\pgfutil at next\tikz at a@char}%
+    {e}{\let\pgfutil at next\tikz at e@char}%
+    {g}{\let\pgfutil at next\tikz at g@char}%
+    {s}{\let\pgfutil at next\tikz at schar}%
+    {|}{\let\pgfutil at next\tikz at vh@lineto}%
+    {p}{\pgfsetmovetofirstplotpoint\let\pgfutil at next\tikz at pchar}%
+    {t}{\let\pgfutil at next\tikz at to}%
+    {\pgfextra}{\let\pgfutil at next\tikz at extra}%
+    {\foreach}{\let\pgfutil at next\tikz at foreach}%
+    {f}{\let\pgfutil at next\tikz at fchar}%
+    {\pgf at stop}{\let\pgfutil at next\relax}%
+    {\par}{\let\pgfutil at next\tikz at scan@next at command}%
+    {d}{\let\pgfutil at next\tikz at decoration}%
+    {l}{\let\pgfutil at next\tikz at l@char}%
+    {:}{\let\pgfutil at next\tikz at colon@char}%
+    {\relax}{\relax\let\pgfutil at next\tikz at scan@next at command}%
+  }{\tikz at resetexpandcount\pgfutil at next}{\tikz at expand}%
 }%
 
-% Continued...
-\def\tikz at handle@more{%
-  \ifx\pgf at let@token a%
-    \let\pgfutil at next=\tikz at a@char%
-  \else%
-    \ifx\pgf at let@token e%
-      \let\pgfutil at next=\tikz at e@char%
-    \else%
-      \ifx\pgf at let@token g%
-        \let\pgfutil at next=\tikz at g@char%
-      \else%
-        \ifx\pgf at let@token s%
-           \let\pgfutil at next=\tikz at schar%
-        \else%
-          \ifx\pgf at let@token |%
-             \let\pgfutil at next=\tikz at vh@lineto%
-          \else%
-            \ifx\pgf at let@token p%
-              \let\pgfutil at next=\tikz at pchar%
-              \pgfsetmovetofirstplotpoint%
-            \else%
-              \ifx\pgf at let@token t%
-                \let\pgfutil at next=\tikz at to%
-              \else%
-                \ifx\pgf at let@token\pgfextra%
-                  \let\pgfutil at next=\tikz at extra%
-                \else%
-                  \ifx\pgf at let@token\foreach%
-                    \let\pgfutil at next=\tikz at foreach%
-                  \else%
-                    \ifx\pgf at let@token f%
-                      \let\pgfutil at next=\tikz at fchar%
-                    \else%
-                      \ifx\pgf at let@token\pgf at stop%
-                        \let\pgfutil at next=\relax%
-                      \else%
-                        \ifx\pgf at let@token\par%
-                          \let\pgfutil at next=\tikz at scan@next at command%
-                        \else%
-                          \ifx\pgf at let@token d%
-                            \let\pgfutil at next=\tikz at decoration%
-                          \else%
-                            \ifx\pgf at let@token l%
-                              \let\pgfutil at next=\tikz at l@char%
-                            \else%
-                              \ifx\pgf at let@token:%
-                                \let\pgfutil at next=\tikz at colon@char%
-                              \else%
-                                \let\pgfutil at next=\tikz at expand%
-                              \fi%
-                            \fi%
-                          \fi%
-                        \fi%
-                      \fi%
-                    \fi%
-                  \fi%
-                \fi%
-              \fi%
-            \fi%
-          \fi%
-        \fi%
-      \fi%
-    \fi%
-  \fi%
-  \ifx\pgfutil at next\tikz at expand\else\tikz at expandcount=100\relax\fi%
-  \pgfutil at next%
-}%
-
 \def\tikz at l@char{%
   \pgfutil at ifnextchar e{\tikz at let@command}{%
     \pgfutil at ifnextchar i{\tikz at lsystem}{%
@@ -4093,7 +4010,7 @@
                     \pgfutil at for\pgf at temp:=\tikz at common@matrix at code@styleorder\do{%
                       \toks0=\expandafter{\romannumeral-`0\expandafter\pgfutil at trimspaces\expandafter{\pgf at temp}}%
                       \def\pgf at marshal{}%
-                      \pgfutil at ifempty\pgf at temp{}{%
+                      \pgfutil at ifxempty\pgf at temp{}{%
                         \edef\pgf at marshal{\noexpand\tikzset{matrix/inner style/.cd,\the\toks0}}%
                       }%
                       \pgf at marshal
@@ -4754,8 +4671,8 @@
     \expandafter\expandafter\expandafter\tikz at parse@child at node%
   \fi%
 }%
-\def\tikz at parse@child at node@rest#1\pgf at stop{\tikz at expandcount=100\relax\def\tikz at child@node at rest{#1}}%
-\def\tikz at parse@child at node@c c{\tikz at expandcount=100\pgfutil at ifnextchar o{\tikz at parse@child at node@co}{\tikz at parse@child at node@rest c}}%
+\def\tikz at parse@child at node@rest#1\pgf at stop{\tikz at resetexpandcount\def\tikz at child@node at rest{#1}}%
+\def\tikz at parse@child at node@c c{\tikz at resetexpandcount\pgfutil at ifnextchar o{\tikz at parse@child at node@co}{\tikz at parse@child at node@rest c}}%
 \def\tikz at parse@child at node@co o{\pgfutil at ifnextchar o{\tikz at parse@child at node@coordinate}{\tikz at parse@child at node@rest co}}%
 \def\tikz at parse@child at node@coordinate ordinate{%
   \pgfutil at ifnextchar ({\tikz@@parse at child@node at coordinate}{%
@@ -4777,7 +4694,7 @@
   \expandafter\expandafter\expandafter{\expandafter\tikz at child@node at text@pre\tikz at marshal}%
   \tikz at parse@child at node@rest%
 }%
-\def\tikz at parse@child at node@n node{\tikz at expandcount=100%
+\def\tikz at parse@child at node@n node{\tikz at resetexpandcount%
   \let\tikz at child@node at text=\pgfutil at empty%
   \tikz at p@c at s}%
 \def\tikz at p@c at s{%

Modified: trunk/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -272,19 +272,23 @@
 \pgfmathdeclarefunction{dim}{1}{%
   \begingroup
     \pgfmath at count=0\relax
-    \expandafter\pgfmath at dim@i\pgfutil at firstofone#1\pgfmath at token@stop
+    \expandafter\pgfmath at dim@i\pgfutil at firstofone#1{\pgfmath at token@stop}%
     \edef\pgfmathresult{\the\pgfmath at count}%
     \pgfmath at smuggleone\pgfmathresult%
   \endgroup}
 
-\def\pgfmath at dim@i#1{%
-    \ifx\pgfmath at token@stop#1%
-    \else
-      \advance\pgfmath at count by 1\relax
-      \expandafter\pgfmath at dim@i
-    \fi}
+\def\pgfmath at dim@i#1#{%
+  \pgfutil at ifempty{#1}{}{\advance\pgfmath at count by 1}%
+  \pgfmath at dim@ii{#1}}
 
+\def\pgfmath at dim@ii#1#2{%
+  \ifx\pgfmath at token@stop#2%
+  \else
+    \advance\pgfmath at count by 1\relax
+    \expandafter\pgfmath at dim@i
+  \fi}
 
+
 % max function.
 %
 \pgfmathdeclarefunction{max}{...}{%

Modified: trunk/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -617,7 +617,42 @@
         \pgf at process{\pgf at shape@interpictureshift{#1}}%%
         \advance\pgf at xa by-\pgf at x%
         \advance\pgf at ya by-\pgf at y%
-        \csname pgf at anchor@\csname pgf at sh@ns@#1\endcsname @border\endcsname{\pgfqpoint{\pgf at xa}{\pgf at ya}}%
+        % Now (\pgf at xa, \pgf at ya) is a coord in shape's coord system, and
+        % relative to the anchor "center". If (xa, ya) is almost identical to
+        % the node center, which is determined by sqrt(xa^2+ya^2) < 0.02pt,
+        % just return the node center.
+        %
+        % \pgf at xb = 10*\pgf at xa if -1pt<\pgf at xa<1pt else 10pt
+        %  - "10*\pgf at xa": reduce ruonding errors when \pgf at xa is small
+        %  - "-1pt<\pgf at xa<1pt": guard against error "Dimension too large"
+        \pgf at xb=10pt
+        \ifdim\pgf at xa<1pt\ifdim\pgf at xa>-1pt
+          \pgf at xb=10\pgf at xa
+        \fi\fi
+        % \pgf at yb = 10*\pgf at ya if -1pt<\pgf at ya<1pt else 10pt
+        \pgf at yb=10pt
+        \ifdim\pgf at ya<1pt\ifdim\pgf at ya>-1pt
+          \pgf at yb=10\pgf at ya
+        \fi\fi
+        % if xb^2+yb^2 < 0.04pt, which means sqrt(xa^2+ya^2) < 0.02pt,
+        % return node center
+        \ifdim\dimexpr\expandafter\Pgf at geT\the\pgf at xb\pgf at xb
+                     +\expandafter\Pgf at geT\the\pgf at yb\pgf at yb\relax<0.04pt
+          \expandafter\pgfutil at firstoftwo
+        \else
+          \expandafter\pgfutil at secondoftwo
+        \fi
+        {% return coord of "center"
+          \pgfwarning
+            {Returning node center instead of a point on node border. Did you
+            specify a point identical to the center of node
+            ``\pgfreferencednodename''?}%
+          \pgf at sh@reanchor{\csname pgf at sh@ns@#1\endcsname}{center}%
+        }
+        {% this calls the corresponding \anchorborder in shape declaration
+          \csname pgf at anchor@\csname pgf at sh@ns@#1\endcsname @border\endcsname
+            {\pgfqpoint{\pgf at xa}{\pgf at ya}}%
+        }%
         \pgfsettransform{\csname pgf at sh@nt@#1\endcsname}%
         \pgf at pos@transform at glob%
         \global\pgf at x=\pgf at x%

Modified: trunk/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -5,10 +5,10 @@
 \catcode`\:=12
 \catcode`\+=12
 \catcode`\-=12
-\gdef\pgfrevision{3.1.8b}
-\gdef\pgfversion{3.1.8b}
-\gdef\pgfversiondatetime{2020-12-27 19:52:45 +0100}
-\gdef\pgfrevisiondatetime{2020-12-27 19:52:45 +0100}
+\gdef\pgfrevision{3.1.9a}
+\gdef\pgfversion{3.1.9a}
+\gdef\pgfversiondatetime{2021-05-15 12:06:55 +0200}
+\gdef\pgfrevisiondatetime{2021-05-15 12:06:55 +0200}
 \gdef\pgf at glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3}
 \xdef\pgfversiondate{\expandafter\pgf at glob@TMPa\pgfversiondatetime\relax}
 \xdef\pgfrevisiondate{\expandafter\pgf at glob@TMPa\pgfrevisiondatetime\relax}

Modified: trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvips.def	2021-05-15 20:36:08 UTC (rev 59210)
@@ -567,7 +567,7 @@
   \wd#1=0pt
   \ht#1=0pt
   \dp#1=0pt
-  \hskip\pgf at picminx\box#1%
+  \hskip\pgf at picminx\box#1\hskip-\pgf at picminx
   \pgfsys at outerinvoke{%
     /pgffoa pgf at sys@foa def /pgfsoa pgf at sys@soa def
     grestore

Modified: trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm4ht.def	2021-05-15 20:36:08 UTC (rev 59210)
@@ -15,51 +15,68 @@
 %
 % Load common pdf commands:
 %
-  %\input pgfsys-dvisvgm.def
+
+% we load the dvips driver by default. it doesn't support patterns and some other stuff,
+% but it handles better nested images and some formatting. if you use patterns or if you
+% have other issues with the default method, pass the "tikz-dvisvgm" option to make4ht. 
+\ifdefined\ifOption
+\ifOption{tikz+}{\input pgfsys-dvisvgm.def}{\input pgfsys-dvips.def}
+\else
+% load the dvips driver by default
 \input pgfsys-dvips.def
+\fi
 
 
+\def\texfourht at tikz@begin{%
+  \bgroup%
+  \def\run at pict@cmd{}% insert the \Picture hooks only in the top nesting level
+  \def\end at pict@cmd{}%
+  \ifdefined\EndPicture\else% We are already inside command that uses \Picture
+  \ifdefined\inside at pict@cmd% handle nested uses
+  \else
+  % use different version of \Picture depending on the vertical mode
+  \ifvmode\def\run at pict@cmd{\Picture*}\else\def\run at pict@cmd{\Picture+}\fi%
+  \def\end at pict@cmd{\EndPicture}%
+  \fi\fi%
+  % command used to detect nesting
+  \def\inside at pict@cmd{}%
+  \csname a:tikzpicture\endcsname%
+}
 
+\def\texfourht at tikz@end{%
+  \csname b:tikzpicture\endcsname%
+  \egroup%
+}
+
 \AtBeginDocument{
-  % configure the output picture format to svg
+  \NewConfigure{tikzpicture}{2}
+  \catcode`\:=11
+  \Configure{tikzpicture}{%
+    \protect\csname nested:math\endcsname% support display math
+    \run at pict@cmd{}%
+  }{\end at pict@cmd}
+  % configure the output picture format to svg, as it will require dvisvgm
+  % post processing. 
   \Configure{Picture}{.svg}
-  % insert tex4ht hook to the code used at the start and end of each TikZ picture
-  \def\pgfsys at beginpicture{%
-    \bgroup%
-    \ifdefined\inside at pict@cmd% handle nested uses
-    \def\run at pict@cmd{}% insert the \Picture hooks only in the top nesting level
-    \def\end at pict@cmd{}%
-    \else
-    % use different version of \Picture depending on the vertical mode
-    \ifvmode\def\run at pict@cmd{\Picture*}\else\def\run at pict@cmd{\Picture+}\fi%
-    \def\end at pict@cmd{\EndPicture}%
-    \fi%
-    % command used to detect nesting
-    \def\inside at pict@cmd{}%
-    \csname a:tikzpicture\endcsname%
-    \orig at pgfsys@begin%
-  }%
-  \def\pgfsys at endpicture{%
-    \orig at pgfsys@end%
-      \csname b:tikzpicture\endcsname%
-      \egroup%
-      \par%
-  }%
+  % insert tex4ht hooks around TikZ picture box
+  \def\pgfsys at typesetpicturebox#1{%
+    \texfourht at tikz@begin%
+    \orig at pgfsys@typesetpicturebox{#1}%
+    \texfourht at tikz@end%
+  }
+  %
+  \ConfigureEnv{tikzpicture}{\ifvmode\Picture*{}\else\Picture+{}\fi\def\inside at pict@cmd{}}{\EndPicture}{}{}
+  \ConfigureEnv{pgfpicture}{\ifvmode\Picture*{}\else\Picture+{}\fi\def\inside at pict@cmd{}}{\EndPicture}{}{}
+  \catcode`\:=12
 }
 
 
 % Make the code inserted by tex4ht configurable
+% 
 
-\NewConfigure{tikzpicture}{2}
-\Configure{tikzpicture}{%
-  % \ifvmode\IgnorePar\fi\EndP%\HtmlParOff
-  \protect\csname nested:math\endcsname% support display math
-  \run at pict@cmd{}%
-}{\end at pict@cmd}
 
-\let\orig at pgfsys@begin\pgfsys at beginpicture
-\let\orig at pgfsys@end\pgfsys at endpicture
-\def\pgf at sys@postscript at header#1{{\special{! #1}}}
+\let\orig at pgfsys@typesetpicturebox\pgfsys at typesetpicturebox
+%\def\pgf at sys@postscript at header#1{{\special{! #1}}}
 
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -1715,9 +1715,32 @@
 % inserted into the resulting .pdf/.ps/.xxx file.
 
 
+% String comparison
+\ifdefined\pdfstrcmp
+  \let\pgfsys at strcmp\pdfstrcmp
+\else\ifdefined\strcmp
+  \let\pgfsys at strcmp\strcmp
+\else\ifdefined\directlua
+  \directlua{
+  local lft = lua.get_functions_table()
+  lft[\string#lft+1] = function()
+      local lhs = token.scan_string()
+      local rhs = token.scan_string()
+      if lhs < rhs then
+          tex.sprint(-2, "-1")
+      elseif lhs == rhs then
+          tex.sprint(-2, "0")
+      else
+          tex.sprint(-2, "1")
+      end
+  end
+  token.set_lua("pgfsys at strcmp", \string#lft, "global")
+  }
+\else
+  \def\pgfsys at strcmp#1#2{\pgf at sys@fail{string comparison}}%
+\fi\fi\fi
 
 
-
 % Discern the driver:
 
 % Default driver:

Modified: trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfcalendar.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -789,7 +789,6 @@
 }
 
 \pgfkeys{/pgf/calendar/Easter/.cd,.default=0,.code={%
-  \show\pgfcalendarifdateyear
   \pgfcalendareastersunday{\pgfcalendarifdateyear}{\pgf at cal@easter at julianday}%
   \ifnum\pgfcalendarifdatejulian=\pgfinteval{\pgf at cal@easter at julianday+#1}
     \expandafter\pgfcalendarmatchestrue

Modified: trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -45,6 +45,17 @@
   \csname @@end\expandafter\endcsname\expandafter\end%
 \fi
 
+% e-TeX primitives and beyond
+
+\ifx\contextversion\undefined
+  \let\pgfkeys at expanded   \expanded
+  \let\pgfkeys at unexpanded \unexpanded
+\else
+  \let\pgfkeys at expanded   \normalexpanded
+  \let\pgfkeys at unexpanded \normalunexpanded
+\fi
+
+
 % Set a key to a value
 %
 % #1 = key
@@ -74,9 +85,8 @@
 }
 
 \long\def\pgfkeyssetevalue#1#2{%
-  \edef\pgfkeys at temp##1##2##3##4##5##6##7##8##9{#2}%
-  \pgfkeys at temptoks=\expandafter{\pgfkeys at temp{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}%
-  \expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys at temptoks}%
+  \expandafter\edef\csname pgfk@#1\endcsname
+  {\pgfkeys at unexpanded\expandafter{\pgfkeys at expanded{#2}}}%
 }
 
 % Add text to a key at the end

Modified: trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex	2021-05-15 20:36:08 UTC (rev 59210)
@@ -32,7 +32,11 @@
 \newif\ifpgfutil at format@is at plain
 \newif\ifpgfutil at format@is at context
 
+% Aliases
 
+\let\pgfutil at exp\romannumeral
+\chardef\pgfutil at exp@end=0
+
 % Simple stuff
 
 % \pgfutil at trimspaces{<token list>}
@@ -45,16 +49,46 @@
 \def\pgfutil at trimspaces@@#1Q#2{#1}
 \catcode`\Q=11
 
-% \pgfutil at ifempty{<cs>}{<true code>}{<false code>}
+% \pgfutil at ifx{<token 1>}{<token 2>}{<true code>}{<false code>}
 %
-% Check if <cs> is equal to \pgfutil at empty
+% This macro is expandable.
+\long\def\pgfutil at ifx#1#2{%
+  \ifx#1#2%
+    \expandafter\pgfutil at firstoftwo
+  \else
+    \expandafter\pgfutil at secondoftwo
+  \fi}
+
+% \pgfutil at ifstrequal{<lhs>}{<rhs>}{<true code>}{<false code>}
 %
+% Check if <lhs> and <rhs> are equal by string comparison
+%
 % This macro is expandable.
-\def\pgfutil at ifempty#1{%
-  \ifx#1\pgfutil at empty
+\long\def\pgfutil at ifstrequal#1#2{%
+  \ifnum\pgfsys at strcmp{\pgfutil at unexpanded{#1}}{\pgfutil at unexpanded{#2}}=0
     \expandafter\pgfutil at firstoftwo
   \else
     \expandafter\pgfutil at secondoftwo
+  \fi
+}
+
+% \pgfutil at ifxempty{<token 1>}{<true code>}{<false code>}
+%
+% Shortcut for \pgfutil at ifx\pgfutil at empty{<token 1>}{<true code>}{<false code>}
+%
+% This macro is expandable.
+\def\pgfutil at ifxempty{\pgfutil at ifx\pgfutil at empty}
+
+% pgfutil at ifempty
+%
+% Check if #1 is empty. No expansion is performed on #1.
+%
+% This macro is expandable.
+\long\def\pgfutil at ifempty#1{%
+  \if\relax\detokenize{#1}\relax
+    \expandafter\pgfutil at firstoftwo
+  \else
+    \expandafter\pgfutil at secondoftwo
   \fi}
 
 % \pgfutil at ifundefined{<macro name with backslash>}
@@ -64,11 +98,7 @@
 %
 % This macro is expandable.
 \def\pgfutil at ifundefined#1{%
-  \expandafter\ifx\csname#1\endcsname\relax
-    \expandafter\pgfutil at firstoftwo
-  \else
-    \expandafter\pgfutil at secondoftwo
-  \fi}
+  \expandafter\pgfutil at ifx\csname#1\endcsname\relax}
 
 % A variant of \pgfutil at ifundefined which will NOT let #1 to \relax it
 % is undefined.
@@ -79,6 +109,7 @@
     \expandafter\pgfutil at firstoftwo
   \fi
 }
+
 \long\def\pgfutil at firstofone#1{#1}
 \long\def\pgfutil at firstoftwo#1#2{#1}
 \long\def\pgfutil at secondoftwo#1#2{#2}
@@ -222,46 +253,43 @@
 \def\pgfutil at iterate{\pgfutil at body \let\pgfutil at next\pgfutil at iterate \else\let\pgfutil at next\relax\fi \pgfutil at next}
 \let\pgfutil at repeat=\fi % this makes \loop...\if...\repeat skippable
 
-
 % \pgfutil at switch
 %
-% #1: string to switch on
-% #2: sequence of label-value pairs
+% #1: comparison function of the form
+%     \comp{<lhs>}{<rhs>}{<true code>}{<false code>}
+%     Has to be expandable!
+% #2: lhs
+% #3: sequence of rhs-value pairs
+% #4: default statement in case of match
+% #5: default statement in case of no match
 %
 % Example:
 %
-% \pgfutil at switch{foo}{%
-%   {foo}{1}%
-%   {bar}{2}%
-%   {default}{X}%
-% }
-%
-% If a statement with the label `default' exists it will be executed
-% if no other label matches.
+% \pgfutil at switch\pgfutil at ifx\pgf at let@token{%
+%   {(}{\tikz at movetoabs}%)
+%   {+}{\tikz at movetorel}%
+%   {-}{\tikz at lineto}%
+% }{}{\tikz at expand}
 
-\long\def\pgfutil at switch#1#2{%
-  \begingroup
-    \def\pgfutil at switch@selected{}%
-    \pgfutil at switch@collect at statements#2{}{}%
-    \ifcsname pgfutil at switch@choice@\detokenize{#1}\endcsname
-      \expandafter\let\expandafter\pgfutil at switch@selected\csname pgfutil at switch@choice@\detokenize{#1}\endcsname
-    \else
-      \ifdefined\pgfutil at switch@choice at default
-        \let\pgfutil at switch@selected\pgfutil at switch@choice at default
-      \fi
-    \fi
-  \expandafter\endgroup\pgfutil at switch@selected
-}
+\let\pgfutil at scan@mark\relax
+\let\pgfutil at scan@stop\relax
 
-\long\def\pgfutil at switch@collect at statements#1{%
-  \if\relax\detokenize{#1}\relax
-  \else
-    \afterassignment\pgfutil at switch@collect at statements
-    \expandafter\def\csname pgfutil at switch@choice@\detokenize{#1}\expandafter\endcsname
-  \fi
+\long\def\pgfutil at switch#1#2#3#4#5{%
+  \pgfutil at exp
+  \pgfutil at switch@@{#1}%
+  {#2}#3% user-defined cases
+  {#2}{}% default case
+  \pgfutil at scan@mark{#4}% true code
+  \pgfutil at scan@mark{#5}% false code
+  \pgfutil at scan@stop
 }
+\long\def\pgfutil at switch@@#1#2#3#4{%
+  #1{#2}{#3}%
+    {\pgfutil at switch@end{#4}}%
+    {\pgfutil at switch@@{#1}{#2}}%
+}
+\long\def\pgfutil at switch@end#1#2#3\pgfutil at scan@mark#4#5\pgfutil at scan@stop{\pgfutil at exp@end#1#4}
 
-
 % aux-read-hook
 
 \let\pgfutil at aux@read at hook=\relax

Modified: trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-context.def	2021-05-15 20:36:08 UTC (rev 59210)
@@ -367,10 +367,7 @@
 
 % e-TeX primitives
 
-\pgfutil at IfUndefined{normalprotected}{%
-  \def\pgfutil at protected{}%
-}{%
-  \let\pgfutil at protected\normalprotected
-}
+\let\pgfutil at protected\normalprotected
+\let\pgfutil at unexpanded\normalunexpanded
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def	2021-05-15 20:36:08 UTC (rev 59210)
@@ -208,10 +208,7 @@
 
 % e-TeX primitives
 
-\pgfutil at IfUndefined{protected}{%
-  \def\pgfutil at protected{}%
-}{%
-  \let\pgfutil at protected\protected
-}
+\let\pgfutil at protected\protected
+\let\pgfutil at unexpanded\unexpanded
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def	2021-05-15 17:46:34 UTC (rev 59209)
+++ trunk/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-plain.def	2021-05-15 20:36:08 UTC (rev 59210)
@@ -337,10 +337,7 @@
 
 % e-TeX primitives
 
-\pgfutil at IfUndefined{protected}{
-  \def\pgfutil at protected{}%
-}{%
-  \let\pgfutil at protected\protected
-}
+\let\pgfutil at protected\protected
+\let\pgfutil at unexpanded\unexpanded
 
 \endinput



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