From 1e611e5edb570cb045a27e8fa52e7ffa36ba2f29 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 25 Dec 2020 22:01:58 +0000 Subject: pgf (25dec20) git-svn-id: svn://tug.org/texlive/trunk@57224 c570f23f-e606-0410-a88d-b1316a301751 --- .../tikz/libraries/tikzlibrarycalendar.code.tex | 2 +- .../tikz/libraries/tikzlibrarytopaths.code.tex | 4 ++ .../generic/pgf/frontendlayer/tikz/tikz.code.tex | 50 +++++++++++++++++----- .../lua/pgf/gd/force/ControlSprings.lua | 4 +- .../generic/pgf/libraries/pgflibraryfpu.code.tex | 2 - .../pgf/math/pgfmathfunctions.random.code.tex | 11 ++--- Master/texmf-dist/tex/generic/pgf/pgf.revision.tex | 8 ++-- 7 files changed, 56 insertions(+), 25 deletions(-) (limited to 'Master/texmf-dist/tex/generic/pgf') diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex index 3ade8fa1cce..73a47f6574c 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarycalendar.code.tex @@ -393,7 +393,7 @@ execute before day scope={\ifdate{day of month=1}{% \pgfutil@next% } \def\tikz@lib@cal@expand{% - \advance\tikz@expandcount by -1% + \advance\tikz@expandcount by -1 \ifnum\tikz@expandcount<0\relax% \tikzerror{Giving up on this calendar}% \let\pgfutil@next=\tikz@lib@cal@end% diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex index 36df6b69efd..ecf850ab40c 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex @@ -135,6 +135,7 @@ [every curve to] \pgfextra{\iftikz@to@relative\tikz@to@compute@relative\else\tikz@to@compute\fi} \tikz@computed@path + \pgfextra{\tikz@updatenexttrue\tikz@updatecurrenttrue}% \tikztonodes% } @@ -166,6 +167,9 @@ \def\tikz@first@point{#1}% \tikz@scan@one@point\tikz@@@to@compute@distance(\tikz@toto)} \def\tikz@@@to@compute@distance#1{% + \iftikz@updatecurrent\else + \tikz@updatenextfalse + \fi \def\tikz@second@point{#1}% \tikz@to@compute@distance@main% } diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex index 70f8da088e0..477418b7167 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex @@ -2120,10 +2120,15 @@ \else% \tikz@invoke@collected@onpath% \fi% - \afterassignment\tikz@handle\let\pgf@let@token=% + \tikz@scan@@next@command }% +\def\tikz@scan@@next@command{% + \afterassignment\tikz@handle\let\pgf@let@token=% +} + \newcount\tikz@expandcount \let\tikz@collected@onpath=\pgfutil@empty% +\edef\tikz@frozen@relax@token{\ifnum0=0\fi} % Central dispatcher for commands \def\tikz@handle{% @@ -2224,7 +2229,7 @@ \ifx\pgf@let@token:% \let\pgfutil@next=\tikz@colon@char% \else% - \let\pgfutil@next=\tikz@expand% + \let\pgfutil@next=\tikz@handle@evenmore \fi% \fi% \fi% @@ -2240,10 +2245,26 @@ \fi% \fi% \fi% - \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi% \pgfutil@next% }% +% Continued... +\def\tikz@handle@evenmore{% + % if \pgf@let@token is \relax or frozen \relax, skip it and + % scan from the next token + \ifx\pgf@let@token\relax + \let\pgfutil@next=\tikz@scan@@next@command + \else + \ifx\pgf@let@token\tikz@frozen@relax@token + \let\pgfutil@next=\tikz@scan@@next@command + \else + \let\pgfutil@next=\tikz@expand + \fi + \fi + \ifx\pgfutil@next\tikz@expand\else\tikz@expandcount=100\relax\fi + \pgfutil@next +} + \def\tikz@l@char{% \pgfutil@ifnextchar e{\tikz@let@command}{% \pgfutil@ifnextchar i{\tikz@lsystem}{% @@ -2566,7 +2587,7 @@ \def\tikz@skip#1{\tikz@scan@next@command#1}% \def\tikz@expand{% - \advance\tikz@expandcount by -1% + \advance\tikz@expandcount by -1 \ifnum\tikz@expandcount<0\relax% \tikzerror{Giving up on this path. Did you forget a semicolon?}% \let\pgfutil@next=\tikz@finish% @@ -2939,7 +2960,7 @@ % -| \def\tikz@hv@lineto{% - \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{ + \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@hv@lineto}{% \pgfutil@ifnextchar p{\tikz@collect@pic@onpath\tikz@hv@lineto}% {\pgfutil@ifnextchar c{\tikz@collect@coordinate@onpath\tikz@hv@lineto}% {\tikz@scan@one@point{\tikz@@hv@lineto}}}}}% @@ -3159,6 +3180,7 @@ \pgf@stop% \expandafter\tikz@scan@next@command\expandafter% }\tikz@after@path% + \pgfextra{\tikz@updatenexttrue\tikz@updatecurrenttrue}% }% @@ -3204,13 +3226,13 @@ \let\tikz@collected@onpath=\pgfutil@empty% \tikz@edgetoparentcollect% }% -\def\tikz@edgetoparentcollect{ +\def\tikz@edgetoparentcollect{% \pgfutil@ifnextchar n{\tikz@collect@label@onpath\tikz@edgetoparentcollect}% {% \expandafter% \endgroup% \expandafter\tikz@edgetoparent@rollout\expandafter{\tikz@collected@onpath}% - } + }% }% \def\tikz@edgetoparent@rollout#1{% @@ -3262,7 +3284,9 @@ \else% \tikzerror{Dot expected}% \fi% - \tikz@updatecurrenttrue% + \iftikz@updatenext + \tikz@updatecurrenttrue% + \fi \tikz@curveCcheck% }% \def\tikz@curveCcheck{% @@ -3840,7 +3864,7 @@ % A label text always ``ends'' the node. % \def\tikz@fig ode{% - \pgfutil@ifnextchar a\tikz@test@also{ + \pgfutil@ifnextchar a\tikz@test@also{% \pgfutil@ifnextchar f{\tikz@nodes@start}\tikz@normal@fig}}% \def\tikz@test@also a{\pgfutil@ifnextchar l\tikz@node@also{\tikz@normal@fig a}}% \def\tikz@normal@fig{% @@ -5221,11 +5245,15 @@ \tikz@lastxsaved=\pgf@x\relax% \tikz@lastysaved=\pgf@y\relax% \fi% - \tikz@updatecurrenttrue% + \iftikz@updatenext + \tikz@updatecurrenttrue% + \fi }% \newif\iftikz@updatecurrent \tikz@updatecurrenttrue +\newif\iftikz@updatenext +\tikz@updatenexttrue @@ -5240,7 +5268,7 @@ \def\tikz@scan@absolute#1{% \pgfutil@ifnextchar({\tikz@scan@@absolute#1}%) {% - \advance\tikz@expandcount by -1% + \advance\tikz@expandcount by -1 \ifnum\tikz@expandcount<0\relax% \let\pgfutil@next=\tikz@@scangiveup% \else% diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua index 71005d85274..9b0c1071e37 100644 --- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua +++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/ControlSprings.lua @@ -26,14 +26,14 @@ local declare = require("pgf.gd.interface.InterfaceToAlgorithms").declare -- The following examples shows how a simple graph can be scaled by -- changing the |node distance|: -- % --- \begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing} +-- \begin{codeexample}[preamble={\usetikzlibrary{graphs.standard,graphdrawing} -- \usegdlibrary{force}}] -- \tikz \graph [spring layout, node distance=7mm] { subgraph C_n[n=3] }; -- \tikz \graph [spring layout] { subgraph C_n[n=3] }; -- \tikz \graph [spring layout, node distance=15mm]{ subgraph C_n[n=3] }; -- \end{codeexample} -- % --- \begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing} +-- \begin{codeexample}[preamble={\usetikzlibrary{graphs.standard,graphdrawing} -- \usegdlibrary{force}}] -- \tikz \graph [spring electrical layout, node distance=0.7cm] { subgraph C_n[n=3] }; -- \tikz \graph [spring electrical layout] { subgraph C_n[n=3] }; diff --git a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex index 01cbab40f9c..a93fa7f90a3 100644 --- a/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/libraries/pgflibraryfpu.code.tex @@ -89,8 +89,6 @@ }, fpu/rel thresh=1e-4, fpu/install only/.code={ - \pgfmath@warning{The key `/pgf/fpu/install only' is experimental and might % - change or disappear at any point!}% \edef\pgf@list{#1}% \pgfutil@for\pgf@temp:=\pgf@list\do{% \expandafter\pgfmath@float@install@singlefunction\expandafter{% diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex index 66bdd72b71e..da20ce024f0 100644 --- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex @@ -185,10 +185,11 @@ \c@pgfmath@countc\c@pgfmath@countb% % OK. Maybe #2 > #3. \ifnum\c@pgfmath@counta>\c@pgfmath@countb\relax% - \c@pgfmath@countc\c@pgfmath@countb% - \c@pgfmath@countb\c@pgfmath@counta% - \c@pgfmath@counta\c@pgfmath@countc% + \c@pgfmath@countc\c@pgfmath@counta% + \c@pgfmath@counta\c@pgfmath@countb% + \c@pgfmath@countb\c@pgfmath@countc% \fi% + \c@pgfmath@countd\c@pgfmath@counta \advance\c@pgfmath@countc1\relax% \advance\c@pgfmath@countc-\c@pgfmath@counta% \pgfmathgeneratepseudorandomnumber% @@ -197,7 +198,7 @@ \divide\c@pgfmath@countb\c@pgfmath@countc% \multiply\c@pgfmath@countb-\c@pgfmath@countc% \advance\c@pgfmath@counta\c@pgfmath@countb% - \pgfmathaddtocount\c@pgfmath@counta{#2}% + \advance\c@pgfmath@counta\c@pgfmath@countd \edef\pgfmathresult{\the\c@pgfmath@counta}% \pgfmath@smuggleone{\pgfmathresult}% \endgroup% @@ -209,7 +210,7 @@ % Create a list to be used with \pgfmathrandomelement. % % #1 - the name of the list -% #2 - a list of comma separated elements. +% #2 - a list of elements (e.g., {item-1}{item-2}...{item-n}). % \def\pgfmathdeclarerandomlist#1#2{% \def\pgfmath@randomlistname{#1}% diff --git a/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex b/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex index 081613923a8..a03cfbb9452 100644 --- a/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex +++ b/Master/texmf-dist/tex/generic/pgf/pgf.revision.tex @@ -5,10 +5,10 @@ \catcode`\:=12 \catcode`\+=12 \catcode`\-=12 -\gdef\pgfrevision{3.1.7a} -\gdef\pgfversion{3.1.7a} -\gdef\pgfversiondatetime{2020-12-01 12:12:01 +0100} -\gdef\pgfrevisiondatetime{2020-12-01 12:12:01 +0100} +\gdef\pgfrevision{3.1.8} +\gdef\pgfversion{3.1.8} +\gdef\pgfversiondatetime{2020-12-25 18:12:40 +0100} +\gdef\pgfrevisiondatetime{2020-12-25 18:12:40 +0100} \gdef\pgf@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3} \xdef\pgfversiondate{\expandafter\pgf@glob@TMPa\pgfversiondatetime\relax} \xdef\pgfrevisiondate{\expandafter\pgf@glob@TMPa\pgfrevisiondatetime\relax} -- cgit v1.2.3