summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
diff options
context:
space:
mode:
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.tex20
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