summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty')
-rw-r--r--Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty25
1 files changed, 25 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
index 4486315128a..6a0874f0bf9 100644
--- a/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
+++ b/Master/texmf-dist/tex/latex/pgfplots/pgfplots.sty
@@ -33,6 +33,8 @@
}
\ProvidesPackage{pgfplots}[\pgfplotsversiondate\space v\pgfplotsversion\space Data Visualization (\pgfplotsrevision)]
+\RequirePackage{graphicx}
+
% ATTENTION:
% you MAY need one of
% \def\pgfsysdriver{pgfsys-dvipdfm.def}
@@ -46,6 +48,29 @@
% 'pdftex' for 'pdflatex'
% -> dvipdfm needs special attention.
+\IfFileExists{pgfsys-luatex.def}{%
+ % OK, proceed as usual
+}{%
+ % hm. check if we need it:
+ \def\pgfplots@glob@TMPa{luatex.def}%
+ \edef\pgfplots@glob@TMPb{\Gin@driver}%
+ \ifx\pgfplots@glob@TMPb\pgfplots@glob@TMPa
+ % hm. probably
+ \@ifundefined{pgfsysdriver}{%
+ % use a patch shipped with pgfplots:
+ \def\pgfsysdriver{pgfsys-luatexpatch.def}%
+ \immediate\write16{Package pgfplots external lib: activating patch for pgfsys-luatex.def driver (PGF is too old)}
+ }{%
+ \def\pgfplots@glob@TMPa{pgfsys-luatex.def}%
+ \ifx\pgfsysdriver\pgfplots@glob@TMPa
+ % use a patch shipped with pgfplots:
+ \def\pgfsysdriver{pgfsys-luatexpatch.def}%
+ \immediate\write16{Package pgfplots external lib: activating patch for pgfsys-luatex.def driver (PGF is too old)}
+ \fi
+ }%
+ \fi
+}
+
\RequirePackage{tikz}
% This is *identical* to \pgfutil@IfUndefined . I copied it here