diff options
author | Norbert Preining <norbert@preining.info> | 2019-12-20 03:00:48 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-12-20 03:00:48 +0000 |
commit | 18d9ec0eba21e6b8c55cdd50afb91c56e02ce7bf (patch) | |
tree | 56de5f55a6575a68557d5a384f57e3e8566c536d /graphics/pgf/base/tex/pgfkeys.code.tex | |
parent | 3b24b0599bb35e1a3338fa33bfb24044a6125ba4 (diff) |
CTAN sync 201912200300
Diffstat (limited to 'graphics/pgf/base/tex/pgfkeys.code.tex')
-rw-r--r-- | graphics/pgf/base/tex/pgfkeys.code.tex | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/graphics/pgf/base/tex/pgfkeys.code.tex b/graphics/pgf/base/tex/pgfkeys.code.tex index 2f17652628..73922a0f09 100644 --- a/graphics/pgf/base/tex/pgfkeys.code.tex +++ b/graphics/pgf/base/tex/pgfkeys.code.tex @@ -74,9 +74,9 @@ } \long\def\pgfkeyssetevalue#1#2{% - \pgfkeys@temptoks={#2}% - \pgfkeys@temptoks=\scantokens\expandafter{\expandafter{\the\pgfkeys@temptoks}}% - \expandafter\edef\csname pgfk@#1\expandafter\endcsname\expandafter{\the\pgfkeys@temptoks}% + \edef\pgfkeys@temp##1##2##3##4##5##6##7##8##9{#2}% + \pgfkeys@temptoks=\expandafter{\pgfkeys@temp{##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}% + \expandafter\edef\csname pgfk@#1\endcsname{\the\pgfkeys@temptoks}% } % Add text to a key at the end @@ -401,11 +401,11 @@ % - path := '/my search path' % - name := 'key/.code' % - key = '/my search path/key/.code' - \let\pgfkeys@temp=\pgfkeyscurrentkey + \let\pgfkeys@tempa=\pgfkeyscurrentkey \let\pgfkeys@tempb=\pgfkeyscurrentname \edef\pgfkeyscurrentkey{\pgfkeyscurrentpath}% \pgfkeys@split@path% - \let\pgfkeyscurrentkey=\pgfkeys@temp + \let\pgfkeyscurrentkey=\pgfkeys@tempa \edef\pgfkeyscurrentname{\pgfkeyscurrentname/\pgfkeys@tempb}% \pgfkeys@unknown }% @@ -958,6 +958,16 @@ \long\def\pgfkeys@exp@call#1{\pgfkeysalso{\pgfkeyscurrentpath={#1}}} +\def\pgfkeys@mathparse{% + \ifcsname pgfmathparse\endcsname + \expandafter\pgfmathparse + \else + \pgfkeys@error{You have to load `pgfmath' to use \string\pgfmathparse}% + \expandafter\def\expandafter\pgfmathresult + \fi +} +\pgfkeys{/handlers/.evaluated/.code=\pgfkeys@mathparse{#1}\expandafter\pgfkeys@exp@call\expandafter{\pgfmathresult}} + % Try to set a key and do nothing if not define \newif\ifpgfkeyssuccess |