tl2017 luatex discretionaries
[latex2e.git] / latex2e-20170101 / support / color.cfg
blobfd0687958d08f1fef73919e906f7f3c5f19ae250
1 % https://creativecommons.org/publicdomain/zero/1.0/
3 \ProvidesFile{color.cfg}%
4   [2016/01/02 v1.6 sample color configuration]
6 % Select an appropriate default driver
7 \begingroup
8   \chardef\x=0\relax
9   % check luatex
10   \ifx\luatexversion\@undefined
11   % check pdfTeX
12   \@ifundefined{pdfoutput}{}{%
13     \ifnum\pdfoutput<1 %
14     \else
15       \chardef\x=1\relax
16     \fi
17   }%
18   % check VTeX
19   \@ifundefined{OpMode}{}{%
20     \chardef\x=2\relax
21   }%
22   % check XeTeX
23   \@ifundefined{XeTeXversion}{}{%
24     \chardef\x=3\relax
25   }%
26   \else
27     \ifnum\luatexversion>85
28       \ifnum\outputmode>0
29       \chardef\x=4\relax
30       \fi
31     \else
32       \ifnum\pdfoutput>0
33       \chardef\x=1\relax
34       \fi
35     \fi
36   \fi
37 \expandafter\endgroup
38 \ifcase\x
39   % default case
40   \def\Gin@driver{dvips.def}%
41   \ExecuteOptions{dvips}%
42 \or
43   % pdfTeX is running in pdf mode
44   \def\Gin@driver{pdftex.def}%
45   \ExecuteOptions{pdftex}%
46 \or
47   % VTeX is running
48   \def\Gin@driver{vtex.def}%
49   \ExecuteOptions{vtex}%
50 \or
51   % XeTeX is running
52   \def\Gin@driver{xetex.def}%
53   \ExecuteOptions{xetex}%
54 \or
55   % luatex (> 0.85)
56   \def\Gin@driver{luatex.def}%
57   \ExecuteOptions{luatex}%
58 \else
59   \PackageError{color}{Unexpected configuration}{}
60 \fi
61 \endinput