diff options
author | Karl Berry <karl@freefriends.org> | 2014-08-06 22:47:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-08-06 22:47:59 +0000 |
commit | 1da164bf9c4fed03b30b98439a239f5a1873f9ae (patch) | |
tree | 2ed76752cb203cacf4135b821206b45c24b1a534 /Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib | |
parent | e16354c1642ffdd8e82798c9f0f60108e85059c6 (diff) |
pgfplots (6aug14)
git-svn-id: svn://tug.org/texlive/trunk@34851 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib')
20 files changed, 655 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex index b3dcd2d6003..8b5a3eaa055 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex @@ -80,5 +80,13 @@ \input pgfplotsoldpgfsupp_pgfutil-common-lists.tex }{}% +\pgfutil@IfUndefined{pgfmathiftrigonometricusesdeg}{% + \pgfutil@ifundefined{pgfmathdeclarefunction}{% + % PGF 2.00 !? Well, trig format won't work here. + }{% + \input pgfplotsoldpgfsupp_trig_format.code.tex + }% +}{}% + \endinput diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex index 0c47024409a..36aafda149d 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_misc.code.tex @@ -2,6 +2,23 @@ % compatibility with PGF 2.10 % ====================================================== % +%%% This file is a copy of some part of PGF/Tikz. +%%% It has been copied here to provide : +%%% - compatibility with older PGF versions +%%% - availability of PGF contributions by Christian Feuersaenger +%%% which are necessary or helpful for pgfplots. +%%% +%%% It contains a couple of patches such that selected changes which +%%% are also part of PGF/TikZ (and can be found in the development +%%% version of PGF/TikZ) are available within pgfplots. +%%% +%%% Typically, these modifications have been done by the pgfplots team +%%% as contribution to PGf/TIKZ +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. \def\pgfdeclarelayer#1{% \pgfutil@ifundefined{pgf@layerbox@#1}{% \expandafter\expandafter\csname pgf@newbox\endcsname\csname pgf@layerbox@#1\endcsname% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_patches.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_patches.code.tex new file mode 100644 index 00000000000..698769ec1e5 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_patches.code.tex @@ -0,0 +1,18 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% This file contains patches on top of PGF/Tikz. +%%% +%%% It has been copied here to provide : +%%% - compatibility with older PGF versions +%%% - availability of PGF contributions by Christian Feuersaenger +%%% which are necessary or helpful for pgfplots. +%%% +%%% For reasons of simplicity, I have copied the whole file, including own contributions AND +%%% PGF parts. The copyrights are as they appear in PGF. +%%% +%%% Note that pgfplots has compatible licenses. +%%% +%%% This copy has been modified in the following ways: +%%% - nested \input commands have been updated +%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex index 1929b2faccf..733cb47a4db 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreexternal.code.tex @@ -13,8 +13,13 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% +%%% Date of this copy: Mi 9. Jul 15:41:39 CEST 2014 %%% @@ -27,7 +32,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.19 2012/06/18 20:39:58 ludewich Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcoreexternal.code.tex,v 1.20 2013/07/15 12:05:31 tantau Exp $ @@ -200,7 +205,7 @@ % This will be overwritten by the tikz external lib if it is loaded. \def\pgfexternal@error@no@shipout{% - \PackageError{pgf}{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname'. Perhaps there was a typo somewhere? Please check that your document contains '\string\beginpgfgraphicnamed{\pgfactualjobname} ... \string\endpgfgraphicnamed'}% + \pgferror{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname'. Perhaps there was a typo somewhere? Please check that your document contains '\string\beginpgfgraphicnamed{\pgfactualjobname} ... \string\endpgfgraphicnamed'}% }% @@ -512,7 +517,7 @@ \immediate\closeout\pgf@plotwrite \fi \fi - \pgfsys@papersize{\the\wd\pgfpic}{\the\dimen0}% + \pgfsys@prepare@papersize{\the\wd\pgfpic}{\the\dimen0}% % \setbox0=\vbox{% % I admit that I don't know why there is this kerning: diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreimage.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreimage.code.tex index 5283de70b9d..f352550430d 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreimage.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcoreimage.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Mon Mar 22 16:42:03 CET 2010 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex index 613a1993cc0..7665a76afb6 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorelayers.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex index 08d1e5e6d92..69ef0d9318b 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfcorescopes.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex index e505a111825..c2edfccaea4 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeys.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex index 9db17f509b6..b40528c43af 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfkeysfiltered.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex index 352e13e9e46..c45a35f60c8 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryfpu.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex index 1356aaec9ab..0e07fdc8a87 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryintersections.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Fr 14. Feb 21:37:39 CET 2014 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex index c4a141cc566..aa3c0e8f364 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgflibraryplothandlers.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex index 9f620fb6f82..8a3f3228d4a 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Sa 7. Dez 20:58:23 CET 2013 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex index 6286e9cebb0..a572afc552f 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.pdflinks.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Sa 7. Dez 20:58:23 CET 2013 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex index da95f766fee..21ba1b5b2a0 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfmanual.prettyprinter.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Sa 7. Dez 20:58:23 CET 2013 %%% 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 f7889097516..58eb9de28f1 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 @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfutil-common-lists.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfutil-common-lists.tex index a47bd4eb96a..4f2f3d68c61 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfutil-common-lists.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_pgfutil-common-lists.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Sa 7. Dez 20:58:23 CET 2013 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex index 23f088e84e4..b1e21bc5222 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzexternalshared.code.tex @@ -13,8 +13,13 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% +%%% Date of this copy: Mi 9. Jul 15:41:39 CEST 2014 %%% @@ -158,8 +163,6 @@ \pgfkeysalso{/tikz/external/figure list=true,/pgf/images/aux in dpth=true}% }, mode=convert with system call, - system call/.initial={pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}, -% system call/.initial={pdflatex -interaction=batchmode -jobname '\image' '\texsource'; pdftops -eps \image.pdf}, force remake/.is if=tikzexternal@force@remake, force remake/.default=true, failed ref warnings for/.initial={\ref,\cite,\pageref}, @@ -277,17 +280,51 @@ up to date check/.is choice, up to date check/simple/.code={\def\tikzexternal@uptodate@mode{0}}, % md5 relies on \pdfmdfivesum of pdftex. It uses 'diff' as fallback if we do not have that command. - up to date check/md5/.code={% - \pgfutil@ifundefined{pdfmdfivesum}{% - \pgfkeys{/tikz/external/up to date check=diff}% - }{% - \def\tikzexternal@uptodate@mode{1}% - }% - }, + up to date check/md5/.code={\def\tikzexternal@uptodate@mode{1}}, up to date check/diff/.code={\def\tikzexternal@uptodate@mode{2}}, up to date check=md5, } +\expandafter\def\csname tikzexternal@driver@pgfsys-pdftex.def\endcsname{% + \pgfutil@IfUndefined{directlua}{% + \pgfkeyssetvalue{/tikz/external/system call}{% + pdflatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% + }% + }{% + \pgfkeyssetvalue{/tikz/external/system call}{% + lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% + }% + }% +}% +%-------------------------------------------------- +% \expandafter\def\csname tikzexternal@driver@pgfsys-dvipdfm.def\endcsname{% +% \pgfkeyssetvalue{/tikz/external/system call}{% +% latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% +% && dvipdfm "\image".dvi % +% }% +% }% +%-------------------------------------------------- +\expandafter\def\csname tikzexternal@driver@pgfsys-xetex.def\endcsname{% + \pgfkeyssetvalue{/tikz/external/system call}{% + xelatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"% + }% +}% +\expandafter\def\csname tikzexternal@driver@pgfsys-dvips.def\endcsname{% + \pgfkeyssetvalue{/tikz/external/system call}{% + latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" % + && dvips -o "\image".ps "\image".dvi % + }% +}% + +% Auto-select a suitable default value fo 'system call': +\pgfutil@ifundefined{tikzexternal@driver@\pgfsysdriver}{% + % fallback. We do not know the driver here. + \csname tikzexternal@driver@pgfsys-pdftex.def\endcsname +}{% + \csname tikzexternal@driver@\pgfsysdriver\endcsname +}% + + \def\tikzsetfigurename#1{\pgfkeyssetvalue{/tikz/external/figure name}{#1}}% \def\tikzappendtofigurename#1{\pgfkeys{/tikz/external/figure name/.add={}{#1}}} @@ -472,6 +509,9 @@ % '\ref,\pageref,\cite'. % % For use in the aux lock handling only. +% +% ATTENTION: this is used if and only if *all* references are broken +% (because the .aux file is NOT read at all)! \def\tikzexternalauxlock@handleref{% \let\pgf@external@grab@refundefinedtrue=\pgf@external@grab@refundefinedtrue@orig % @@ -498,11 +538,18 @@ \fi \fi }% -\def\tikzexternalauxlock@handleref@repl#1{\pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@repl@{#1}}{\tikzexternalauxlock@handleref@repl@{#1}[]}}% -\def\tikzexternalauxlock@handleref@repl@#1[#2]#3{% +\def\tikzexternalauxlock@handleref@repl#1{% + \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}% +}% +% silently discard the options. We merely need to generate a warning. +\def\tikzexternalauxlock@handleref@gobble@opt#1[#2]{% + % there may be more than one set of options (biblatex's \cite): + \pgfutil@ifnextchar[{\tikzexternalauxlock@handleref@gobble@opt{#1}}{\tikzexternalauxlock@handleref@repl@{#1}}% +}% +\def\tikzexternalauxlock@handleref@repl@#1#2{% \tikzifexternalizingcurrent{% % note that '#1' is NO control sequence! it is a protected string - \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#3}% + \csname tikzexternalauxlock@handleref@orig@#1\endcsname{#2}% \begingroup \def\n{\pgfexternal@hat\pgfexternal@hat J}% \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% @@ -510,7 +557,7 @@ \pgfexternalstorecommand{% \noexpand\begingroup \noexpand\toks0={\pgf@tempa}% - \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#3}{\noexpand\the\noexpand\toks0}}% + \noexpand\immediate\noexpand\write16{\tikzexternalauxlock@handleref@warning{#2}{\noexpand\the\noexpand\toks0}}% \noexpand\G@refundefinedtrue \noexpand\endgroup }% @@ -927,14 +974,16 @@ % Will write something to the make file. If the makefile is not yet % opened, #1 will be written as soon as it *is* opened. \def\tikzexternalwritetomakefile#1{% - \pgfutil@ifundefined{tikzexternal@outmakefile}{% - \expandafter\gdef\expandafter\tikzexternal@outmakefile@pendingcommands\expandafter{% - \tikzexternal@outmakefile@pendingcommands + \if\tikzexternal@opmode5% mode='list and make' + \pgfutil@ifundefined{tikzexternal@outmakefile}{% + \expandafter\gdef\expandafter\tikzexternal@outmakefile@pendingcommands\expandafter{% + \tikzexternal@outmakefile@pendingcommands + \immediate\write\tikzexternal@outmakefile{#1}% + }% + }{% \immediate\write\tikzexternal@outmakefile{#1}% }% - }{% - \immediate\write\tikzexternal@outmakefile{#1}% - }% + \fi }% \def\tikzexternal@dep@file@name{} @@ -955,33 +1004,67 @@ % could be auto-generated: empty file name means "picture % won't be externalized". Skip it. \else - \edef\tikzpicturedependsonfile@name{#1.\tikzexternaldepext}% - \ifx\tikzexternal@dep@file@name\tikzpicturedependsonfile@name - % file is open and ready. - \else - % create new output file. - \pgfutil@ifundefined{tikzexternal@dep@file}{% - \begingroup - % this makes \tikzexternal@dep@file global: - \globaldefs=1 - % this gets round '\outer\newwrite' in plain TeX: - \csname newwrite\endcsname\tikzexternal@dep@file - \endgroup - }{}% - \ifx\tikzexternal@dep@file@name\pgfutil@empty - \else - % it is already open. Close it. - \immediate\closeout\tikzexternal@dep@file - \fi - \global\let\tikzexternal@dep@file@name=\tikzpicturedependsonfile@name - \immediate\openout\tikzexternal@dep@file=\tikzexternal@dep@file@name\relax - \fi - \immediate\write\tikzexternal@dep@file{#1\tikzexternalimgextension: #2}% + % if we encounter any dependencies while we externalize a + % picture, we have to write these things into the image's .dep + % file. + \tikzifexternalizingcurrent + {\tikzexternalfiledependsonfile@append@to@dep@file{#1}{#2}}% + {\tikzexternalfiledependsonfile@append@to@makefile{#1}{#2}}% \fi \endgroup }% \def\tikzexternalfiledependsonfile#1#2{}% NO-OP until \tikzexternalize has been called. +% sub-routine of \tikzexternalfiledependsonfile which appends stuff to +% the pictures .dep file. +% +% The file #1.dep is generated during the externalization of #1. If +% you change and/or overwrite it in any other context, its information +% might get lost (because #1 won't be regenerated). +% +% Consequently, this here has to be called if and only if #1 is about +% to be externalized. +\def\tikzexternalfiledependsonfile@append@to@dep@file#1#2{% + % write every dependency which is defined *INSIDE* of the current + % picture into the .dep file of the current picture: + \tikzexternalgetcurrentfilename\tikzpicturedependsonfile@name + \edef\tikzpicturedependsonfile@name{\tikzpicturedependsonfile@name.\tikzexternaldepext}% + %\edef\tikzpicturedependsonfile@name{#1.\tikzexternaldepext}% + \ifx\tikzexternal@dep@file@name\tikzpicturedependsonfile@name + % file is open and ready. + \else + % create new output file. + \pgfutil@ifundefined{tikzexternal@dep@file}{% + \begingroup + % this makes \tikzexternal@dep@file global: + \globaldefs=1 + % this gets round '\outer\newwrite' in plain TeX: + \csname newwrite\endcsname\tikzexternal@dep@file + \endgroup + }{}% + \ifx\tikzexternal@dep@file@name\pgfutil@empty + \else + % it is already open. Close it. + \immediate\closeout\tikzexternal@dep@file + \fi + \global\let\tikzexternal@dep@file@name=\tikzpicturedependsonfile@name + \immediate\openout\tikzexternal@dep@file=\tikzexternal@dep@file@name\relax + \fi + \immediate\write\tikzexternal@dep@file{#1\tikzexternalimgextension: #2}% +} + +% sub-routine of \tikzexternalfiledependsonfile which appends stuff to +% the makefile of the current \jobname . +% +% This is used for dependencies which are recomputed by every run of +% tex; we must not write them into #1.dep (for reasons explained in +% the documentation of +% \tikzexternalfiledependsonfile@append@to@dep@file) +\def\tikzexternalfiledependsonfile@append@to@makefile#1#2{% + \edef\tikzexternal@temp{#1\tikzexternalimgextension: #2}% + \expandafter\tikzexternalwritetomakefile\expandafter{\tikzexternal@temp}% +} + % Adds a dependency for the NEXT picture which is about to be % externalized. If we are currently inside of a picture, the % dependency is added for this current picture. @@ -1163,6 +1246,7 @@ \immediate\write16{A tikzpicture has been optimized away. Use '/tikz/external/optimize=false' to disable this.}% \fi \tikzexternal@closeenvironments + \pgfkeysvalueof{/tikz/external/optimize away text/.@cmd}tikzpicture\pgfeov% } % Processes tikzpicture normally; without any externalization. @@ -1203,10 +1287,25 @@ } \long\def\tikzexternal@forcegraphics@@#1{\tikzexternal@forcegraphics@@@}% \def\tikzexternal@forcegraphics@@@{% + \if5\tikzexternal@opmode + \let\tikz@refundefinedtrue@@=\G@refundefinedtrue + \gdef\G@refundefinedtrue{% + \tikz@refundefinedtrue@@ + \tikzexternal@forceremake@undefined@reference@handler + }% + \fi \expandafter\pgfincludeexternalgraphics\expandafter{\tikzexternal@curfilename}% + \if5\tikzexternal@opmode + \global\let\G@refundefinedtrue=\tikz@refundefinedtrue@@ + \fi \tikzexternal@closeenvironments } +\def\tikzexternal@forceremake@undefined@reference@handler{% + \immediate\write16{===== 'mode=list and make': encountered undefined reference in current picture. Adding dependency to FORCEREMAKE. Rerun make to update the picture.' ========^^J}% + \tikzpicturedependsonfile{FORCEREMAKE}% +}% + % Simply replaces the complete picture by some placeholder text. % It is used by 'mode=list only' to reduce runtime. \def\tikzexternal@listmodepicture{% @@ -1260,6 +1359,9 @@ \def\endtikzpicture{% \tikzexternal@origendpicture \pgf@externalend + % + \tikzexternal@ensure@nonempty@floats + % \let\tikzpicture=\tikzexternal@tikzpicture@replacement \let\endtikzpicture=\tikzexternal@origendpicture \iftikzexternal@optimize @@ -1271,6 +1373,21 @@ \tikzpicture }% +% If a sequence of floats containing JUST tikzpictures is +% externalized, this results in EMPTY floats. Empty floats, in turn, +% can confuse latex; it thinks it did something wrong. +% +% Solution: Avoid empty floats by writing junk into it. +% +% Note that this method is only invoked if \ifpgf@external@grabshipout +% is true and if the text is OUTSIDE of the original shipout routine. +% In other words: this text is being thrown away. +% +% see +% http://tex.stackexchange.com/questions/54625/why-is-fixltx2e-incompatible-with-tikzexternalize +\def\tikzexternal@ensure@nonempty@floats{% + tikzexternal: picture has been externalized. This text is required to avoid empty floats. +}% % 1. Discards the current picture in this document. % 2. Checks whether an image exists already. If that is the case: acquire it. @@ -1404,11 +1521,18 @@ \fi } +\pgfutil@IfUndefined{pdfmdfivesum}{% +}{% + % predefine to this value. This does only make sense for pdftex. + % note that the latex library for 'external' loads \usepackage{pdftexcmds} which \let's this to \pdf@mdfivesum: + \let\tikzexternal@mdfivesum=\pdfmdfivesum +}% + \long\def\tikzexternal@computemdfivesum#1{% \t@tikzexternal@tmpb={#1}% \edef\tikzexternal@temp{\the\t@tikzexternal@tmpb}% % \meaning results in a string of catcode 12 - which is expandable. - \edef\pgfretval{\pdfmdfivesum{\meaning\tikzexternal@temp}}% + \edef\pgfretval{\tikzexternal@mdfivesum{\meaning\tikzexternal@temp}}% } \long\def\tikzexternal@computemdfivesum@diff@fallback#1{% \t@tikzexternal@tmpb={#1}% @@ -1442,8 +1566,25 @@ \def\tikzexternal@check@uptodate@ext{.md5} +\def\tikzexternal@check@uptodate@mode@warn@fallback{% + \message{! Package tikz Warning: The key 'up to date check=md5' is impossible, there is no macro to compute MD5. Falling back to 'up to date check=diff'.}% + % + % warn only once: + \global\let\tikzexternal@check@uptodate@mode@warn@fallback=\relax +}% + % assigns the boolean \iftikzexternal@file@isuptodate \long\def\tikzexternal@check@uptodate@mode#1{% + \if1\tikzexternal@uptodate@mode + % up to date check=md5: + % check if we CAN compute MD5 sums: + \pgfutil@IfUndefined{tikzexternal@mdfivesum}{% + % we cannot compute md5 sums - fallback to diff. + \tikzexternal@check@uptodate@mode@warn@fallback + \def\tikzexternal@uptodate@mode{2}% + }{}% + \fi + % \ifcase\tikzexternal@uptodate@mode % up to date check=simple % nothing to do -- file existance is checked anyway. @@ -1530,7 +1671,7 @@ \xdef\pgf@tempa{\noexpand\pgf@findfile\pgfsys@imagesuffixlist:+{\tikzexternal@curfilename}}% \pgf@tempa \ifx\pgf@filename\pgfutil@empty% - \PackageError{tikz}{Sorry, the system call '#1' did NOT result in a usable output file '\tikzexternal@curfilename' (expected one of \pgfsys@imagesuffixlist). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in '\tikzexternal@curfilename.log'. If you continue now, I'll try to typeset the picture}% + \tikzerror{Sorry, the system call '#1' did NOT result in a usable output file '\tikzexternal@curfilename' (expected one of \pgfsys@imagesuffixlist). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in '\tikzexternal@curfilename.log'. If you continue now, I'll try to typeset the picture}{}% \fi }% @@ -1540,18 +1681,18 @@ \begingroup \tikzexternal@assemble@systemcall{\pgfactualjobname}{\pgf@tempa}% \toks0=\expandafter{\pgf@tempa}% - \PackageError{tikz}{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname', but it seems there is no such image in the document!? + \tikzerror{Sorry, image externalization failed: the resulting image was EMPTY. I tried to externalize '\pgfactualjobname', but it seems there is no such image in the document!? \if\tikzexternal@opmode4 ^^J \space\space You are currently using 'mode=convert with system call'. This problem can happen if the image (or one of the images preceeding it) was declared inside of a \string\label{} (i.e. in the .aux file): 'convert with system call' has no access to the main aux file.^^J \space\space Possible solutions in this case:^^J -\space\space a) Try using 'mode=list and make',^^J -\space\space b) Issue the externalization command '\the\toks0' *manually* (also check the preceeding externalized images, perhaps the file name sequence is not correct).^^J +\space\space (a) Try using 'mode=list and make',^^J +\space\space (b) Issue the externalization command '\the\toks0' *manually* (also check the preceeding externalized images, perhaps the file name sequence is not correct).^^J \space\space Repeat: the resulting image was EMPTY, your attention is required \else \if\tikzexternal@opmode5 ^^J \space\space You are currently using 'mode=list and make'. Possible solutions:^^J -\space\space a) Try to delete `\tikzexternal@realjob.makefile'. Perhaps it is not up-to-date.^^J -\space\space b) Perhaps pictures are declared inside of \string\label{} and the .aux file is not up-to-date. Re-run latex, perhaps re-generate the graphics as well.^^J +\space\space (a) Try to delete `\tikzexternal@realjob.makefile'. Perhaps it is not up-to-date.^^J +\space\space (b) Perhaps pictures are declared inside of \string\label{} and the .aux file is not up-to-date. Re-run latex, perhaps re-generate the graphics as well.^^J \space\space Repeat: the resulting image was EMPTY, your attention is required \fi \fi}% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex index bcef9c1eda1..7e41bce2e56 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_tikzlibraryexternal.code.tex @@ -13,6 +13,11 @@ %%% This copy has been modified in the following ways: %%% - nested \input commands have been updated %%% +% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Date of this copy: Di 25. Dez 18:14:20 CET 2012 %%% diff --git a/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_trig_format.code.tex b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_trig_format.code.tex new file mode 100644 index 00000000000..4937d000e0a --- /dev/null +++ b/Master/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_trig_format.code.tex @@ -0,0 +1,343 @@ +% This file contains patches to support 'trig format' +% +%%% This file is a copy of some part of PGF/Tikz. +%%% It has been copied here to provide : +%%% - compatibility with older PGF versions +%%% - availability of PGF contributions by Christian Feuersaenger +%%% which are necessary or helpful for pgfplots. +%%% +%%% This file contains just the functionality for trig format (written by Christian Feuersaenger). +%%% +% Support for the contents of this file will NOT be done by the PGF/TikZ team. +% Please contact the author and/or maintainer of pgfplots (Christian Feuersaenger) if you need assistance in conjunction +% with the deployment of this patch or partial content of PGF. Note that the author and/or maintainer of pgfplots has no obligation to fix anything: +% This file comes without any warranty as the rest of pgfplots; there is no obligation for help. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\pgfkeys{ + /pgf/trig format/.is choice, + /pgf/trig format/deg/.code={\def\pgfmath@trig@format@choice{0}}, + /pgf/trig format/rad/.code={\def\pgfmath@trig@format@choice{1}}, + /pgf/trig format/deg, +} + +% Executes #1 if 'trig format=deg' and #2 otherwise. +\def\pgfmathiftrigonometricusesdeg#1#2{% + \if0\pgfmath@trig@format@choice + #1% + \else + #2% + \fi +}% + +\def\pgfmath@scale@rad@to@deg#1{% + #1=57.29577#1\relax% 57.29577 = 360/(2*pi) +}% +\def\pgfmath@scale@deg@to@rad#1{% + #1=3.14159#1% + \divide#1180\relax% +}% + +\def\pgfmathsin@#1{% + % Let #1 = a.b + % Then sin(#1) \approx (1-b)*sin(a) + b*sin(a+1) + % + \begingroup% + \expandafter\pgfmath@x#1pt\relax% + \if1\pgfmath@trig@format@choice + % trig format=rad + \pgfmath@scale@rad@to@deg\pgfmath@x + \fi + \advance\pgfmath@x-90pt\relax% + \afterassignment\pgfmath@gobbletilpgfmath@ + \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@ + \divide\c@pgfmath@counta360\relax% + \multiply\c@pgfmath@counta-360\relax% + \advance\pgfmath@x\c@pgfmath@counta pt\relax% + \ifdim\pgfmath@x<0pt\relax\pgfmath@x-\pgfmath@x\fi% + \ifdim\pgfmath@x<180pt\relax% + \else + \pgfmath@x-\pgfmath@x% + \advance\pgfmath@x360pt\relax% + \fi% + % Now 0 <= x < 179. So split x into integer and decimal... + % + \afterassignment\pgfmath@xa% + \expandafter\c@pgfmath@counta\the\pgfmath@x\relax% + % + % ...if #1 is an integer, don't do anything fancy. + \ifdim\pgfmath@xa=0pt% + \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname pt\relax% + \else% + \pgfmath@x-\pgfmath@xa% + \advance\pgfmath@x1pt\relax% + \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@x% + \advance\c@pgfmath@counta1\relax% + \ifnum\c@pgfmath@counta=181\relax\c@pgfmath@counta179\relax\fi% + \expandafter\advance\expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@xa% + \fi% + \pgfmath@returnone\pgfmath@x% + \endgroup +} + +% \pgfmathcos +% +% Calculate the cosine of #1 (in degrees). +% +\def\pgfmathcos@#1{% + % Let x = a.b + % Then cos(x) \approx (1-b)*cos(a) + b*cos(a+1) + % + \begingroup% + \expandafter\pgfmath@x#1pt\relax% + \if1\pgfmath@trig@format@choice + % trig format=rad + \pgfmath@scale@rad@to@deg\pgfmath@x + \fi + \afterassignment\pgfmath@gobbletilpgfmath@% + \expandafter\c@pgfmath@counta\the\pgfmath@x\relax\pgfmath@% + \divide\c@pgfmath@counta360\relax% + \multiply\c@pgfmath@counta-360\relax% + \advance\pgfmath@x\c@pgfmath@counta pt\relax% + \ifdim\pgfmath@x<0pt\relax\pgfmath@x-\pgfmath@x\fi% + \ifdim\pgfmath@x<180pt\relax% + \else% + \pgfmath@x-\pgfmath@x% + \advance\pgfmath@x360pt\relax% + \fi% + % Now 0 <= x < 179. So split x into integer and decimal... + % + \afterassignment\pgfmath@xa% + \expandafter\c@pgfmath@counta\the\pgfmath@x\relax% + % + % ...if #1 is an integer, don't do anything fancy. + \ifdim\pgfmath@xa=0pt% + \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname pt% + \else% + \pgfmath@x-\pgfmath@xa% + \advance\pgfmath@x1pt\relax% + \expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@x% + \advance\c@pgfmath@counta1\relax% + \ifnum\c@pgfmath@counta=181\relax\c@pgfmath@counta179\relax\fi% + \expandafter\advance\expandafter\pgfmath@x\csname pgfmath@cos@\the\c@pgfmath@counta\endcsname\pgfmath@xa% + \fi% + \pgfmath@returnone\pgfmath@x% + \endgroup% +} + +\def\pgfmathasin@#1{% + \begingroup% + \pgfmath@x=#1pt % + \pgfmath@xa\pgfmath@x% + \edef\pgf@temp{\pgf@sys@tonumber\pgfmath@x}% + % compute lossless '*1000' operation: + \expandafter\pgfmath@multiply@thousand\pgf@temp 000\relax + \pgfmath@x=\pgfmathresult pt % + \ifdim\pgfmath@x<0pt\relax% + \pgfmath@x-\pgfmath@x% + \fi% + \pgfmath@table@lookup{\pgfmath@x}{pgfmath@acos@}{1001}% + \pgfmath@x=-\pgfmath@x + \advance\pgfmath@x90pt\relax% + \ifdim\pgfmath@xa<0pt\relax% + \pgfmath@x-\pgfmath@x% + \fi% + \if1\pgfmath@trig@format@choice + % trig format=rad + \pgfmath@scale@deg@to@rad\pgfmath@x + \fi + \pgfmath@returnone\pgfmath@x% + \endgroup% +} +\def\pgfmathacos@#1{% + \begingroup% + \pgfmath@x#1pt\relax% + \pgfmath@xa\pgfmath@x% + \edef\pgf@temp{\pgf@sys@tonumber\pgfmath@x}% + % compute lossless '*1000' operation: + \expandafter\pgfmath@multiply@thousand\pgf@temp 000\relax + \pgfmath@x=\pgfmathresult pt % + \ifdim\pgfmath@x<0pt\relax% + \pgfmath@x-\pgfmath@x% + \fi% + \pgfmath@table@lookup{\pgfmath@x}{pgfmath@acos@}{1001}% + \ifdim\pgfmath@xa<0pt\relax% + \pgfmath@x-\pgfmath@x% + \advance\pgfmath@x by180pt\relax% + \fi% + \if1\pgfmath@trig@format@choice + % trig format=rad + \pgfmath@scale@deg@to@rad\pgfmath@x + \fi + \pgfmath@returnone\pgfmath@x% + \endgroup% +} + +\def\pgfmathatan@#1{% + \begingroup% + \expandafter\pgfmath@x#1pt\relax% + \pgfmath@xa\pgfmath@x% + \ifdim\pgfmath@x<0pt\relax% + \pgfmath@x-\pgfmath@x% + \fi% + \pgfmath@xb\pgfmath@x% + \ifdim\pgfmath@x>1pt\relax% + \edef\pgfmath@temp{\pgfmath@tonumber{\pgfmath@x}}% + \pgfmathreciprocal@{\pgfmath@temp}% + \pgfmath@x\pgfmathresult pt\relax% + \fi% + % compute lossless '*1000' operation: + \edef\pgf@temp{\pgf@sys@tonumber\pgfmath@x}% + \expandafter\pgfmath@multiply@thousand\pgf@temp 000\relax + \pgfmath@x=\pgfmathresult pt % + \pgfmath@table@lookup{\pgfmath@x}{pgfmath@atan@}{1001}%xxx + \ifdim\pgfmath@xb>1pt\relax% + \pgfmath@x=-\pgfmath@x% + \advance\pgfmath@x90pt% + \fi% + \ifdim\pgfmath@xa<0pt\relax% + \pgfmath@x-\pgfmath@x% + \fi% + \if1\pgfmath@trig@format@choice + % trig format=rad + \pgfmath@scale@deg@to@rad\pgfmath@x + \fi + \pgfmath@returnone\pgfmath@x% + \endgroup% +} + +\expandafter\def\csname pgfmathatan2@\endcsname#1#2{% + % Note: first parameter is y (!), second is x (!) + \begingroup% + \pgfmath@y=#1pt\relax% + \ifdim\pgfmath@y<0pt\relax% + \pgfmath@y=-\pgfmath@y% + \fi% + \ifdim\pgfmath@y<0.001pt\relax% + \ifdim#2pt<0pt\relax% + \pgfmath@x=-180pt\relax% + \else% + \ifdim#2pt>0pt\relax% + \pgfmath@x=0pt\relax% + \else% + \ifdim#1pt<0pt% + \pgfmath@x=-90pt\relax% + \else% + \pgfmath@x=90pt\relax% + \fi% + \fi% + \fi% + \else% + \pgfmathabs@{#1}\let\pgfmath@tempa\pgfmathresult% + \pgfmathabs@{#2}\let\pgfmath@tempb\pgfmathresult% + \ifdim\pgfmath@tempa pt>\pgfmath@tempb pt% + \pgfmathdivide@{#2}{\pgfmath@tempa}% + \expandafter\pgfmathatan@\expandafter{\pgfmathresult}% + \pgfmath@x=90pt% + \advance\pgfmath@x by-\pgfmathresult pt\relax% + \else% + \pgfmathdivide@{\pgfmath@tempa}{#2}% + \expandafter\pgfmathatan@\expandafter{\pgfmathresult}% + \pgfmath@x=\pgfmathresult pt\relax% + \ifdim#2pt<0pt% + \advance\pgfmath@x by180pt\relax% + \fi% + \fi% + \ifdim#1pt<0pt\relax% + \pgfmath@x=-\pgfmath@x% + \fi% + \fi% + \if1\pgfmath@trig@format@choice + % trig format=rad + \pgfmath@scale@deg@to@rad\pgfmath@x + \fi + \pgfmath@returnone\pgfmath@x% + \endgroup% +} + +% FPU: + + +\let\pgfmath@basic@sin@=\pgfmathsin@ +\let\pgfmath@basic@cos@=\pgfmathcos@ +\let\pgfmath@basic@tan@=\pgfmathtan@ +\let\pgfmath@basic@atan@=\pgfmathatan@ +\let\pgfmath@basic@asin@=\pgfmathasin@ +\let\pgfmath@basic@acos@=\pgfmathacos@ +\let\pgfmath@basic@cot@=\pgfmathcot@ +\let\pgfmath@basic@sec@=\pgfmathsec@ +\let\pgfmath@basic@cosec@=\pgfmathcosec@ + +% Computes #1(#2) where #1 is a trigonometric function, i.e. +% #1(#2) = #1( #2 + r*360 ) +% +% #1 is a one-argument macro which assigns \pgfmathresult. +\def\pgfmathfloatTRIG@#1#2{% + \if0\pgfmath@trig@format@choice + % trig format=deg + \expandafter\ifx\csname pgfmathfloatTRIG@NUM\endcsname\relax% + % Lazy evaluation: + \pgfmathfloatcreate{1}{3.6}{2}% + \global\let\pgfmathfloatTRIG@NUM=\pgfmathresult + \pgfmathfloatcreate{1}{2.77777777777778}{-3}% + \global\let\pgfmathfloatTRIG@NUM@INV=\pgfmathresult + \fi + \pgfmathfloatmodknowsinverse@{#2}{\pgfmathfloatTRIG@NUM}{\pgfmathfloatTRIG@NUM@INV}% + \else + % trig format=rad + \expandafter\ifx\csname pgfmathfloatTRIG@rad@NUM\endcsname\relax% + % Lazy evaluation: + \pgfmathfloatcreate{1}{6.28318530717959}{0}% + \global\let\pgfmathfloatTRIG@rad@NUM=\pgfmathresult + \pgfmathfloatcreate{1}{1.59154943091895}{-1}% + \global\let\pgfmathfloatTRIG@rad@NUM@INV=\pgfmathresult + \fi + \pgfmathfloatmodknowsinverse@{#2}{\pgfmathfloatTRIG@rad@NUM}{\pgfmathfloatTRIG@rad@NUM@INV}% + \fi + \pgfmathfloattofixed@{\pgfmathresult}% + \expandafter#1\expandafter{\pgfmathresult}% + \pgfmathfloatparsenumber{\pgfmathresult}% +}% + +\def\pgfmathfloatsin@#1{\pgfmathfloatTRIG@\pgfmath@basic@sin@{#1}} +\let\pgfmathfloatsin=\pgfmathfloatsin@ +\def\pgfmathfloatcos@#1{\pgfmathfloatTRIG@\pgfmath@basic@cos@{#1}} +\let\pgfmathfloatcos=\pgfmathfloatcos@ +\def\pgfmathfloatsec@#1{\pgfmathfloatTRIG@\pgfmath@basic@cos@{#1}\pgfmathfloatreciprocal@{\pgfmathresult}} +\let\pgfmathfloatsec=\pgfmathfloatsec@ +\def\pgfmathfloatcosec@#1{\pgfmathfloatTRIG@\pgfmath@basic@sin@{#1}\pgfmathfloatreciprocal@{\pgfmathresult}} +\let\pgfmathfloatcosec=\pgfmathfloatcosec@ + +\def\pgfmathfloatatan@#1{% + \begingroup + \expandafter\ifx\csname pgfmathfloatatan@TMP\endcsname\relax% + \pgfmathfloatcreate{1}{1.6}{4}% + \global\let\pgfmathfloatatan@TMP=\pgfmathresult + \pgfmathfloatcreate{2}{1.6}{4}% + \global\let\pgfmathfloatatan@TMPB=\pgfmathresult + \fi + \pgfmathfloatgreaterthan@{#1}{\pgfmathfloatatan@TMP}% + \ifpgfmathfloatcomparison + \pgfmathiftrigonometricusesdeg{% + \pgfmathfloatcreate{1}{9.0}{1}% + }{% + \pgfmathfloatcreate{1}{1.570796326794}{0}% + }% + \else + \pgfmathfloatlessthan{#1}{\pgfmathfloatatan@TMPB}% + \ifpgfmathfloatcomparison + \pgfmathiftrigonometricusesdeg{% + \pgfmathfloatcreate{2}{9.0}{1}% + }{% + \pgfmathfloatcreate{2}{1.570796326794}{0}% + }% + \else + \pgfmathfloattofixed@{#1}% + \expandafter\pgfmath@basic@atan@\expandafter{\pgfmathresult}% + \pgfmathfloatparsenumber{\pgfmathresult}% + \fi + \fi + \pgfmath@smuggleone\pgfmathresult + \endgroup +}% +\endinput |