diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex b/Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex index 4f414535eec..7ab01a3b03e 100644 --- a/Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex +++ b/Master/texmf-dist/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex @@ -39,7 +39,7 @@ \expandafter\pgfkeys@spdef\expandafter\pgf@temp\expandafter{\pgf@temp}% \ifx\pgf@temp\pgfutil@empty \else - \expandafter\ifx\csname pgfp@library@\pgf@temp @loaded\endcsname\relax% + \pgfplotsiflibraryloaded{\pgf@temp}{}{% \expandafter\global\expandafter\let\csname pgfp@library@\pgf@temp @loaded\endcsname=\pgfutil@empty% \expandafter\edef\csname tikz@library@#1@atcode\endcsname{\the\catcode`\@} \expandafter\edef\csname tikz@library@#1@barcode\endcsname{\the\catcode`\|} @@ -50,11 +50,45 @@ \input pgflibrarypgfplots.\pgf@temp.code.tex}% \catcode`\@=\csname tikz@library@#1@atcode\endcsname \catcode`\|=\csname tikz@library@#1@barcode\endcsname - \fi% + \expandafter\ifx\csname pgfp@library@#1@loadoptions\endcsname\relax + \else + \expandafter\let\expandafter\pgfplots@glob@TMPa\csname pgfp@library@\pgf@temp @loadoptions\endcsname + \expandafter\pgfplotsset\expandafter{\pgfplots@glob@TMPa}% + \fi + }% \fi }% } +\pgfkeys{ + % #1: library name + % #2: compatiblity presets which are controlled by the + % compatibility system but which belong to the library. + % + % FIXME : now as I wrote it, it might have been better to reverse + % the dependency... !? + /pgfplots/compat/library hook/.code 2 args={% + \pgfplotsiflibraryloaded{#1}{% + \pgfkeysalso{#2}% + }{% + \expandafter\ifx\csname pgfp@library@#1@loadoptions\endcsname\relax + \expandafter\def\csname pgfp@library@#1@loadoptions\endcsname{#2}% + \else + \t@pgfplots@toka=\expandafter\expandafter\expandafter{\csname pgfp@library@#1@loadoptions\endcsname}% + \t@pgfplots@tokb={#2}% + \expandafter\edef\csname pgfp@library@#1@loadoptions\endcsname{\the\t@pgfplots@toka,\the\t@pgfplots@tokb}% + \fi + }% + }, +} + +\def\pgfplotsiflibraryloaded#1#2#3{% + \expandafter\ifx\csname pgfp@library@#1@loaded\endcsname\relax% + #3\relax + \else + #2\relax + \fi% +}% % Default loaded libraries: % Currently none |