diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-19 22:11:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-19 22:11:59 +0000 |
commit | 8876a8021514f190d676e4e5261f1084a66754d3 (patch) | |
tree | 9a496107a312a1acbbdb06ea0e1657c285109729 /Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex | |
parent | 693eacf895c01285e2992460bb489142ead8ae8a (diff) |
pgf (19dec19)
git-svn-id: svn://tug.org/texlive/trunk@53187 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex | 20 |
1 files changed, 15 insertions, 5 deletions
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 2f17652628a..73922a0f097 100644 --- a/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/utilities/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 |