From 22536bb2b5257046d271b1eaa11b4a275d5ec041 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 5 Jan 2019 22:40:38 +0000 Subject: pgf (5jan19) git-svn-id: svn://tug.org/texlive/trunk@49607 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/generic/pgf/math/pgfmathparser.code.tex | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (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 e2c78d1fdf4..0ede2314cfe 100644 --- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex @@ -160,6 +160,24 @@ \def\pgfmathresultunitscale{1} + +% A utility function which evaluates expression '#1' and invokes '#2' +% if the expression is true and '#3' if it is false. +\def\pgfmathifexpression#1#2#3{% + \pgfmathparse{#1}% + \pgfmath@iftrue{#2}{#3}% +}% +% Executes '#1' if \pgfmathresult is 'true', '#2' otherwise. +% WARNING : overwritten in fpu lib! +\def\pgfmath@iftrue{% + \ifdim\pgfmathresult pt=1.0pt % + \let\pgfmath@next=\pgfutil@firstoftwo + \else + \let\pgfmath@next=\pgfutil@secondoftwo + \fi + \pgfmath@next% +}% + % Stuff for compatability with the calc package. % \def\pgfmath@calc@real#1{#1} @@ -261,6 +279,10 @@ \fi \pgfmath@parse@next} +% TT: If false, octal parsing is switched off (needed for time parsing) +\newif\ifpgfmath@octalparsing +\pgfmath@octalparsingtrue + % I (CJ) *think* it replaces |{| and |}| by |\pgfmath@bgroup| and % |\pgfmath@egroup|? \def\pgfmath@parse@@@ifbgroup#1{% @@ -312,7 +334,9 @@ \let\pgfmath@base=\pgfmath@empty% \let\pgfmath@token@next=\pgfmath@token% \if#10% Check for octal prefix. - \def\pgfmath@base{8}% + \ifpgfmath@octalparsing% + \def\pgfmath@base{8}% + \fi% \fi% \let\pgfmath@parse@next=\pgfmath@parse@number% \else% -- cgit v1.2.3