summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex56
1 files changed, 55 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex b/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
index cc79af2d013..f4bd3054304 100644
--- a/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
+++ b/Master/texmf-dist/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
@@ -23,8 +23,62 @@
%
%--------------------------------------------
+% NOTE: tex4ht support is lousy. For example, \tikz \node {$10^{-6}$};
+% will already break -- because SVG does not support the html tag
+% − produced by tex4ht (and TikZ apparently does not know how to
+% escape it somehow).
\def\pgfplots@sys@beforenode{%
\pgfkeysifdefined{/tikz/tex4ht node/escape/.@cmd}{%
- \tikzset{tex4ht node/escape=true}%
+ \ifpgfplots@has@cell@picture
+ \tikzset{tex4ht node/escape=true}%
+ \pgfplots@warning{ATTENTION: you may want to use '\string\pgfplotsset{cell picture=false}' in your preamble. Otherwise, tex4ht will produce TWO SVG files per plot.^^J}%
+ \fi
}{}%
}%
+
+% see compat/show suggested version
+\newif\ifpgfplots@show@suggested@version
+\pgfplots@show@suggested@versiontrue
+
+\def\pgfplots@show@suggested@compat@value{%
+ \ifpgfplots@show@suggested@version
+ \begingroup
+ \pgfkeysgetvalue{/pgfplots/compat/current}\current
+ \pgfkeysgetvalue{/pgfplots/compat/mostrecent}\mostrecent
+ %
+ \def\b@isnewest{0}%
+ \def\b@shouldupgrade{0}%
+ \ifx\current\mostrecent
+ \def\b@isnewest{1}%
+ \else
+ \def\pgfplots@loc@TMPa{newest}%
+ \ifx\current\pgfplots@loc@TMPa
+ \def\b@isnewest{1}%
+ \else
+ \expandafter\pgfplotsutilifstringequal\expandafter{\current}{pre 1.3}{%
+ \def\b@shouldupgrade{1}%
+ }{}%
+ \expandafter\pgfplotsutilifstringequal\expandafter{\current}{default}{%
+ \def\b@shouldupgrade{1}%
+ }{}%
+ \fi
+ \fi
+ \if1\b@isnewest
+ \pgfplots@message{Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set (\string\pgfplotsset{compat=\mostrecent}).^^J}%
+ \else
+ \if1\b@shouldupgrade
+ \pgfplots@warning{running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \string\pgfplotsset{compat=\mostrecent} into your preamble.^^J}%
+ \else
+ \pgfplots@message{Package pgfplots notification 'compat/show suggested version=true': you might benefit from \string\pgfplotsset{compat=\mostrecent} (current compat level: \current).^^J}%
+ \fi
+ \fi
+ \endgroup
+ \fi
+}
+
+\pgfutil@ifundefined{AtBeginDocument}{%
+}{%
+ \AtBeginDocument{%
+ \pgfplots@show@suggested@compat@value
+ }%
+}%