From aebf7cb9eaabd4c0092643c77009a567ede155dc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 12 Jul 2019 20:45:15 +0000 Subject: pgf (12jul19) git-svn-id: svn://tug.org/texlive/trunk@51626 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex') 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 []. -- cgit v1.2.3