diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-23 22:01:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-23 22:01:18 +0000 |
commit | c23682f2c0c9d6928d1a2d9f362b8b7ed708fb72 (patch) | |
tree | 480e773e9958e03b19a9237fd47282c94481e6eb /Master/texmf-dist/tex/generic/pgf/utilities | |
parent | 754f20ecc77875061dd95322eca1dd3e9f453b18 (diff) |
pgf (23nov20)
git-svn-id: svn://tug.org/texlive/trunk@56989 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/utilities')
3 files changed, 41 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex index cdb77b31377..65b62b8cf98 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex @@ -79,10 +79,13 @@ \fi% } +\def\pgffor@expand@list@true{\let\pgffor@expand@list\edef} +\def\pgffor@expand@list@false{\let\pgffor@expand@list\def} \def\pgffor@macro@list#1{% \expandafter\pgffor@normal@list\expandafter{#1}} \def\pgffor@normal@list#1{% - \def\pgffor@values{#1, \pgffor@stop,}% + \pgffor@expand@list\pgffor@values{#1}% + \expandafter\def\expandafter\pgffor@values\expandafter{\pgffor@values, \pgffor@stop,}% \ifx\pgffor@values\pgffor@emptyvalues \def\pgffor@values{\pgffor@stop,}% \fi% @@ -619,6 +622,9 @@ count/.code=\pgffor@count@parse#1\pgffor@stop, parse/.is if=pgffor@assign@parse, parse/.default=false, + expand list/.is if=pgffor@expand@list@, + expand list/.default=true, + expand list=false, } \def\pgffor@assign@parse#1{% diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex index e32745317c5..db89141aca1 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex @@ -178,7 +178,13 @@ % % \pgfkeysifdefined{/tikz/length}{key exists}{does not exist} -\long\def\pgfkeysifdefined#1#2#3{\ifcsname pgfk@#1\endcsname#2\else#3\fi} +\long\def\pgfkeysifdefined#1{% + \ifcsname pgfk@#1\endcsname + \expandafter\pgfkeys@firstoftwo + \else + \expandafter\pgfkeys@secondoftwo + \fi +} % Tests whether a key is assignable. For standard keys which just % store their value, this is identical to \pgfkeysifdefined. @@ -749,7 +755,7 @@ {% \pgfkeysgetvalue{\pgfkeyscurrentpath/.@args}{\pgfkeys@tempargs}% \pgfkeysgetvalue{\pgfkeyscurrentpath/.@body}{\pgfkeys@tempbody}% - \def\pgfkeys@marshal{\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}% + \def\pgfkeys@marshal{\expandafter\long\expandafter\gdef\expandafter\pgfkeys@global@temp\pgfkeys@tempargs}% \expandafter\pgfkeys@marshal\expandafter{\pgfkeys@tempbody}% }% \pgfkeysifdefined{\pgfkeyscurrentpath/.@@body}{% @@ -799,11 +805,7 @@ % Defining a value -\pgfkeys{/handlers/.initial/.code=% - \pgfkeyslet{\pgfkeyscurrentpath/.@cmd}\undefined - \pgfkeyslet{\pgfkeyscurrentpath/.@args}\undefined - \pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}% -} +\pgfkeys{/handlers/.initial/.code=\pgfkeyssetvalue{\pgfkeyscurrentpath}{#1}} \pgfkeys{/handlers/.add/.code 2 args=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{#2}} \pgfkeys{/handlers/.prefix/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{#1}{}} \pgfkeys{/handlers/.append/.code=\pgfkeysaddvalue{\pgfkeyscurrentpath}{}{#1}} @@ -1039,50 +1041,50 @@ \pgfkeys{ /errors/boolean expected/.code 2 args=% - { - \toks1={#1} - \toks2={#2} + {% + \toks1={#1}% + \toks2={#2}% \pgfkeys@error{% Boolean parameter of key '\the\toks1' must be 'true' or 'false', not '\the\toks2'. I am going to ignore it% - } + }% }, /errors/value required/.code 2 args=% - { - \toks1={#1} + {% + \toks1={#1}% \pgfkeys@error{% The key '\the\toks1' requires a value. I am going to ignore this key% - } + }% }, /errors/value forbidden/.code 2 args=% - { - \toks1={#1} - \toks2={#2} + {% + \toks1={#1}% + \toks2={#2}% \pgfkeys@error{% You may not specify a value for the key '\the\toks1'. I am going to ignore the value '\the\toks2' that you provided% - } + }% }, /errors/unknown choice value/.code 2 args=% - { - \toks1={#1} - \toks2={#2} + {% + \toks1={#1}% + \toks2={#2}% \pgfkeys@error{% Choice '\the\toks2' unknown in choice key '\the\toks1'. I am going to ignore this key% - } + }% }, /errors/unknown key/.code 2 args=% - { - \toks1={#1} - \toks2={#2} + {% + \toks1={#1}% + \toks2={#2}% \def\pgf@temp{#2}% \pgfkeys@error{% I do not know the key '\the\toks1'\ifx\pgf@temp\pgfkeysnovalue@text\space\else, to which you passed '\the\toks2', \fi and I am going to ignore it. Perhaps you misspelled it% - } + }% } } diff --git a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def index e2ed750368f..a21f3b4d633 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def +++ b/Master/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def @@ -92,6 +92,9 @@ \AtBeginDocument{\AtEndDocument{\clearpage\the\pgfutil@everybye}} +% \@ifl@t@r is defined \@onlypremable so we have to save it here +\let\pgfutil@ifl@t@r=\@ifl@t@r + \def\pgfutil@insertatbegincurrentpagefrombox#1{% \edef\pgf@temp{\the\wd\pgfutil@abb}% \global\setbox\pgfutil@abb\hbox{% @@ -105,8 +108,9 @@ % % CF observed problems when placing patterns in XObjects without % this skip (dvipdfmx driver for pgfplots shader=interp) - \hskip-\pgf@temp\relax% + \hskip\dimexpr\pgfutil@ifl@t@r\fmtversion{2020/10/01}{2in-2\hoffset}{}-\pgf@temp\relax% #1% + \pgfutil@ifl@t@r\fmtversion{2020/10/01}{\hskip\dimexpr-2in-2\hoffset\relax}{}% }% } \newbox\pgfutil@abb% @@ -119,7 +123,7 @@ } \let\pgfutil@abe\pgfutil@empty% -\@ifl@t@r\fmtversion{2020/10/01}{% +\pgfutil@ifl@t@r\fmtversion{2020/10/01}{% \AddToHook{shipout/background}{% \put(\hoffset-1in,\voffset-1in){% \pgfutil@abe\unhbox\pgfutil@abb\pgfutil@abc\global\let\pgfutil@abc\pgfutil@empty |