summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex41
1 files changed, 31 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
index 2f2ce4d9716..4a795f89cd5 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmathfloat.code.tex
@@ -14,7 +14,7 @@
%%% - nested \input commands have been updated
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% Date of this copy: Do 29. Dez 12:39:03 CET 2011 %%%
+%%% Date of this copy: Fr 17. Aug 20:12:53 CEST 2012 %%%
@@ -30,7 +30,28 @@
% This file contains methods for basic floating point arithmetics, rounding
% to arbitrary precision and number pretty printing.
%
-% Version 1.0 2008/09/17
+
+
+\pgfkeys{
+ % The bug 3430171 (wrong minus sign spacing in pgfmathprintnumber)
+ % has been fixed in 2.10 CVS. Since it changes the spacing, its
+ % effects can be undone with this compatibility switch.
+ /pgf/compat/number printer/.is choice,
+ /pgf/compat/number printer/2.10/.code={%
+ \def\pgfmathprintnumber@begingroup{\bgroup}%
+ \def\pgfmathprintnumber@endgroup{\egroup}%
+ },
+ % I do not know the version number of the next release at this
+ % time. Please be so kind and KEEP THIS NAME INTACT. Add an alias
+ % if needed.
+ /pgf/compat/number printer/next after 2.10/.code={%
+ \def\pgfmathprintnumber@begingroup{\begingroup}%
+ \def\pgfmathprintnumber@endgroup{\endgroup}%
+ },
+ % activate the fix by default.
+ /pgf/compat/number printer/next after 2.10,%
+}
+
\global\newif\ifpgfmathfloatcomparison
\newif\ifpgfmathfloatroundhasperiod
@@ -817,23 +838,23 @@
% #1: the part before the exponent code
% #2: the part for the exponent code.
\def\pgfmathfloatrounddisplaystyle@shared@impl@#1#2{%
- \begingroup
+ \pgfmathprintnumber@begingroup
\toks0={#1}%
\toks1=\expandafter{\pgfmathfloatrounddisplaystyle@e@mark #2}%
\xdef\pgfmathfloat@glob@TMP{\the\toks0 \the\toks1 }%
- \endgroup
+ \pgfmathprintnumber@endgroup
\let\pgfmathresult=\pgfmathfloat@glob@TMP
}%
% Same as \pgfmathfloatrounddisplaystyle@shared@impl@, but it also
% inserts the '@dec sep mark' at the end.
\def\pgfmathfloatrounddisplaystyle@shared@impl@@#1#2{%
- \begingroup
+ \pgfmathprintnumber@begingroup
\toks0={#1}%
\toks1=\expandafter{\pgfmathfloatrounddisplaystyle@e@mark #2}%
\pgfkeysgetvalue{/pgf/number format/@dec sep mark}\pgfmathprintnumber@fixed@styleDEFAULT@DEC@SEP@MARK
\toks2=\expandafter{\pgfmathprintnumber@fixed@styleDEFAULT@DEC@SEP@MARK}%
\xdef\pgfmathfloat@glob@TMP{\the\toks0 \the\toks1 \the\toks2 }%
- \endgroup
+ \pgfmathprintnumber@endgroup
\let\pgfmathresult=\pgfmathfloat@glob@TMP
}
@@ -848,11 +869,11 @@
}
\def\pgfmathfloatrounddisplaystyle@e#1#2e#3\relax{%
\ifnum#3<0\relax
- \begingroup
+ \pgfmathprintnumber@begingroup
\count0=#3\relax
\multiply\count0 by-1
\xdef\pgfmathfloat@glob@TMP{e{-}\the\count0}%
- \endgroup%
+ \pgfmathprintnumber@endgroup%
\let\pgfmathresult=\pgfmathfloat@glob@TMP
\else
\def\pgfmathresult{e{+}#3}%
@@ -862,11 +883,11 @@
}
\def\pgfmathfloatrounddisplaystyle@E#1#2e#3\relax{%
\ifnum#3<0\relax
- \begingroup
+ \pgfmathprintnumber@begingroup
\count0=#3\relax
\multiply\count0 by-1
\xdef\pgfmathfloat@glob@TMP{E{-}\the\count0}%
- \endgroup%
+ \pgfmathprintnumber@endgroup%
\let\pgfmathresult=\pgfmathfloat@glob@TMP
\else
\def\pgfmathresult{E{+}#3}%