summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-12 20:45:15 +0000
committerKarl Berry <karl@freefriends.org>2019-07-12 20:45:15 +0000
commitaebf7cb9eaabd4c0092643c77009a567ede155dc (patch)
treefa4aae570987002e252dd9c3d3b96b7571f03848 /Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
parent2d83a76b7d0fa40bf7b1c90280ee3388258a73f3 (diff)
pgf (12jul19)
git-svn-id: svn://tug.org/texlive/trunk@51626 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex9
1 files changed, 7 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
index f9afe04d72d..c16d07005d8 100644
--- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
+++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
@@ -10,6 +10,11 @@
\newif\ifpgfmathmathunitsdeclared
\newif\ifpgfmathignoreunitscale
+\let\pgfmath@protected@edef=\edef
+\ifcsname protected@edef\endcsname
+ \let\pgfmath@protected@edef=\protected@edef
+\fi
+
\def\pgfmathprint#1{\pgfmathparse{#1}\pgfmathresult}
\def\pgfmathparse{%
@@ -43,7 +48,7 @@
\global\pgfmathmathunitsdeclaredfalse
% Expand expression so any remaining CSs are registers
% or box dimensions (i.e. |\wd|, |\ht|, |\dp|).
- \edef\pgfmath@expression{#1}%
+ \pgfmath@protected@edef\pgfmath@expression{#1}%
%
\expandafter\pgfmathparse@trynumber@loop\pgfmath@expression\pgfmath@parse@stop
%
@@ -906,7 +911,7 @@
% Begin and end parenthesis ().
%
-\def\pgfmath@startgroup@#1{\edef\pgfmathresult{#1}}
+\def\pgfmath@startgroup@#1{\pgfmath@protected@edef\pgfmathresult{#1}}
\def\pgfmath@endgroup@{}% Never actually called.
% Begin and end array access [].