summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/graphics-cfg
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/graphics-cfg
Initial commit
Diffstat (limited to 'macros/latex/contrib/graphics-cfg')
-rw-r--r--macros/latex/contrib/graphics-cfg/README.md30
-rw-r--r--macros/latex/contrib/graphics-cfg/color.cfg61
-rw-r--r--macros/latex/contrib/graphics-cfg/graphics.cfg61
3 files changed, 152 insertions, 0 deletions
diff --git a/macros/latex/contrib/graphics-cfg/README.md b/macros/latex/contrib/graphics-cfg/README.md
new file mode 100644
index 0000000000..9a7bf16b2e
--- /dev/null
+++ b/macros/latex/contrib/graphics-cfg/README.md
@@ -0,0 +1,30 @@
+# graphics-cfg
+Sample configuration files for LaTeX2e color and graphics
+
+Note that these files are, as far as possible, in the public domain
+and may be edited to suit the distribution being used.
+
+Specifically they are released under the CC0 1.0 Universal licence
+ https://creativecommons.org/publicdomain/zero/1.0/
+
+
+They may be edited by end users, but more commonly should be edited
+by maintainers of TeX distributions to detect a suitable range of
+package options for the tex systems and dvi drivers available.
+
+
+These color and graphics configurations will make the color and
+graphics packages default option be
+luatex, pdftex, vtex, xetex or dvips.
+Note that pdftex option is used for luatex versions older than
+luatex 0.87.
+
+
+
+These files are currently maintained by the LaTeX3 project but
+incorporating work by Thomas Esser, Heiko Oberdiek, Sebastian Rahtz,
+Karl Berry and others.
+
+Issues and change suggestions may be raised at github:
+
+https://github.com/latex3/graphics-cfg/issues
diff --git a/macros/latex/contrib/graphics-cfg/color.cfg b/macros/latex/contrib/graphics-cfg/color.cfg
new file mode 100644
index 0000000000..fd0687958d
--- /dev/null
+++ b/macros/latex/contrib/graphics-cfg/color.cfg
@@ -0,0 +1,61 @@
+% https://creativecommons.org/publicdomain/zero/1.0/
+
+\ProvidesFile{color.cfg}%
+ [2016/01/02 v1.6 sample color configuration]
+
+% Select an appropriate default driver
+\begingroup
+ \chardef\x=0\relax
+ % check luatex
+ \ifx\luatexversion\@undefined
+ % check pdfTeX
+ \@ifundefined{pdfoutput}{}{%
+ \ifnum\pdfoutput<1 %
+ \else
+ \chardef\x=1\relax
+ \fi
+ }%
+ % check VTeX
+ \@ifundefined{OpMode}{}{%
+ \chardef\x=2\relax
+ }%
+ % check XeTeX
+ \@ifundefined{XeTeXversion}{}{%
+ \chardef\x=3\relax
+ }%
+ \else
+ \ifnum\luatexversion>85
+ \ifnum\outputmode>0
+ \chardef\x=4\relax
+ \fi
+ \else
+ \ifnum\pdfoutput>0
+ \chardef\x=1\relax
+ \fi
+ \fi
+ \fi
+\expandafter\endgroup
+\ifcase\x
+ % default case
+ \def\Gin@driver{dvips.def}%
+ \ExecuteOptions{dvips}%
+\or
+ % pdfTeX is running in pdf mode
+ \def\Gin@driver{pdftex.def}%
+ \ExecuteOptions{pdftex}%
+\or
+ % VTeX is running
+ \def\Gin@driver{vtex.def}%
+ \ExecuteOptions{vtex}%
+\or
+ % XeTeX is running
+ \def\Gin@driver{xetex.def}%
+ \ExecuteOptions{xetex}%
+\or
+ % luatex (> 0.85)
+ \def\Gin@driver{luatex.def}%
+ \ExecuteOptions{luatex}%
+\else
+ \PackageError{color}{Unexpected configuration}{}
+\fi
+\endinput
diff --git a/macros/latex/contrib/graphics-cfg/graphics.cfg b/macros/latex/contrib/graphics-cfg/graphics.cfg
new file mode 100644
index 0000000000..7a6d9ac737
--- /dev/null
+++ b/macros/latex/contrib/graphics-cfg/graphics.cfg
@@ -0,0 +1,61 @@
+% https://creativecommons.org/publicdomain/zero/1.0/
+
+\ProvidesFile{graphics.cfg}%
+ [2016/06/04 v1.11 sample graphics configuration]%
+
+% Select an appropriate default driver
+\begingroup
+ \chardef\x=0\relax
+ % check luatex
+ \ifx\luatexversion\@undefined
+ % check pdfTeX
+ \@ifundefined{pdfoutput}{}{%
+ \ifnum\pdfoutput<1 %
+ \else
+ \chardef\x=1\relax
+ \fi
+ }%
+ % check VTeX
+ \@ifundefined{OpMode}{}{%
+ \chardef\x=2\relax
+ }%
+ % check XeTeX
+ \@ifundefined{XeTeXversion}{}{%
+ \chardef\x=3\relax
+ }%
+ \else
+ \ifnum\luatexversion>85
+ \ifnum\outputmode>0
+ \chardef\x=4\relax
+ \fi
+ \else
+ \ifnum\pdfoutput>0
+ \chardef\x=1\relax
+ \fi
+ \fi
+ \fi
+\expandafter\endgroup
+\ifcase\x
+ % default case
+ \def\Gin@driver{dvips.def}%
+ \ExecuteOptions{dvips}%
+\or
+ % pdfTeX is running in pdf mode
+ \def\Gin@driver{pdftex.def}%
+ \ExecuteOptions{pdftex}%
+\or
+ % VTeX is running
+ \def\Gin@driver{vtex.def}%
+ \ExecuteOptions{vtex}%
+\or
+ % XeTeX is running
+ \def\Gin@driver{xetex.def}%
+ \ExecuteOptions{xetex}%
+\or
+ % luatex (> 0.85)
+ \def\Gin@driver{luatex.def}%
+ \ExecuteOptions{luatex}%
+\else
+ \PackageError{graphics}{Unexpected configuration}{}
+\fi
+\endinput