diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex index 6d1ec5b6ab8..859d8266a92 100644 --- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex @@ -272,17 +272,21 @@ \pgfmathdeclarefunction{dim}{1}{% \begingroup \pgfmath@count=0\relax - \expandafter\pgfmath@dim@i\pgfutil@firstofone#1\pgfmath@token@stop + \expandafter\pgfmath@dim@i\pgfutil@firstofone#1{\pgfmath@token@stop}% \edef\pgfmathresult{\the\pgfmath@count}% \pgfmath@smuggleone\pgfmathresult% \endgroup} -\def\pgfmath@dim@i#1{% - \ifx\pgfmath@token@stop#1% - \else - \advance\pgfmath@count by 1\relax - \expandafter\pgfmath@dim@i - \fi} +\def\pgfmath@dim@i#1#{% + \pgfutil@ifempty{#1}{}{\advance\pgfmath@count by 1}% + \pgfmath@dim@ii{#1}} + +\def\pgfmath@dim@ii#1#2{% + \ifx\pgfmath@token@stop#2% + \else + \advance\pgfmath@count by 1\relax + \expandafter\pgfmath@dim@i + \fi} % max function. |