Skip to content

Commit

Permalink
fixed math loading order problem
Browse files Browse the repository at this point in the history
  • Loading branch information
tantau committed Mar 30, 2012
1 parent d0f77b2 commit 6b8752d
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 3 deletions.
6 changes: 6 additions & 0 deletions doc/generic/pgf/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-03-30 Till Tantau <[email protected]>

- Fixed problem that in case math library is loaded before pgf
some math functions were broken (because \pgfmath@xa and
\pgf@xa were different registers, which they should not be).

2012-03-29 Till Tantau <[email protected]>

- Added anchoring and orientation to graph drawing library.
Expand Down
2 changes: 1 addition & 1 deletion generic/pgf/math/pgfmathutil.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
\let\pgfmath@yc\pgf@yc

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdimb\pgfutil@tempdimb

\let\c@pgfmath@counta\c@pgf@counta
\let\c@pgfmath@countb\c@pgf@countb
Expand Down
3 changes: 1 addition & 2 deletions generic/pgf/modules/pgfmoduledecorations.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,6 @@
\advance\pgf@x0.666666\pgf@xa%
\advance\pgf@y0.666666\pgf@ya%
}%
%
\let\pgf@decorate@movealonginputsegment\pgf@decorate@movealonginputsegment@line%
\let\pgf@decorate@transformtoinputsegment\pgf@decorate@transformtoinputsegment@line%
\let\pgfdecorationcurrentinputsegment\pgfdecorationinputsegmentlineto%
Expand Down Expand Up @@ -1419,7 +1418,7 @@
\pgfpointcurveattime{\pgf@decorate@inputsegmenttime}%
{\pgf@decorate@inputsegment@first}{\pgf@decorate@inputsegment@supporta}%
{\pgf@decorate@inputsegment@supportb}{\pgf@decorate@inputsegment@last}%
\pgf@xa\pgf@x%
\show1 \pgf@xa\pgf@x%
\pgf@ya\pgf@y%
\pgf@xb\pgf@decorate@inputsegmenttime pt\relax%
%
Expand Down
19 changes: 19 additions & 0 deletions generic/pgf/systemlayer/pgfsys.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@
\newcount\c@pgf@countd


% Ensure that math registers are the same (math is broken in case it
% is loaded first)
\let\pgfmath@x\pgf@x
\let\pgfmath@xa\pgf@xa
\let\pgfmath@xb\pgf@xb
\let\pgfmath@xc\pgf@xc

\let\pgfmath@y\pgf@y
\let\pgfmath@ya\pgf@ya
\let\pgfmath@yb\pgf@yb
\let\pgfmath@yc\pgf@yc

\let\c@pgfmath@counta\c@pgf@counta
\let\c@pgfmath@countb\c@pgf@countb
\let\c@pgfmath@countc\c@pgf@countc
\let\c@pgfmath@countd\c@pgf@countd



% The following \if decides, whether even-odd filling and clipping is
% to be used or normal the non-zero winding number rule. See the
% pdf-documentation for details on what these rules are.
Expand Down
5 changes: 5 additions & 0 deletions generic/pgf/utilities/pgfutil-context.def
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@
\newbox \pgfutil@voidb@x
\newtoks \pgfutil@toks@

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

% From LaTeX
\newskip\pgfutil@flushglue
\pgfutil@flushglue=0pt plus 1fil
Expand Down
6 changes: 6 additions & 0 deletions generic/pgf/utilities/pgfutil-latex.def
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
\let\pgfutil@tempdima=\@tempdima
\let\pgfutil@tempdimb=\@tempdimb

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb


\AtEndDocument{\par\vfil\penalty-10000\relax\the\pgfutil@everybye}

\def\pgfutil@insertatbegincurrentpagefrombox#1{%
Expand Down
5 changes: 5 additions & 0 deletions generic/pgf/utilities/pgfutil-plain.def
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@
\newdimen\pgfutil@tempdima
\newdimen\pgfutil@tempdimb

\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempdima\pgfutil@tempdima
\let\pgfmath@tempcnta\pgfutil@tempcnta
\let\pgfmath@tempcntb\pgfutil@tempcntb

% From LaTeX
\newskip\pgfutil@flushglue
\pgfutil@flushglue=0pt plus 1fil
Expand Down

0 comments on commit 6b8752d

Please sign in to comment.