| 1 | % https://creativecommons.org/publicdomain/zero/1.0/ |
| 2 | |
| 3 | \ProvidesFile{color.cfg}% |
| 4 | [2023/04/17 v1.7 sample color configuration] |
| 5 | |
| 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 | % check HiTeX |
| 27 | \@ifundefined{HINTversion}{}{% |
| 28 | \chardef\x=5\relax |
| 29 | }% |
| 30 | \else |
| 31 | \ifnum\luatexversion>85 |
| 32 | \ifnum\outputmode>0 |
| 33 | \chardef\x=4\relax |
| 34 | \fi |
| 35 | \else |
| 36 | \ifnum\pdfoutput>0 |
| 37 | \chardef\x=1\relax |
| 38 | \fi |
| 39 | \fi |
| 40 | \fi |
| 41 | \expandafter\endgroup |
| 42 | \ifcase\x |
| 43 | % default case |
| 44 | \def\Gin@driver{dvips.def}% |
| 45 | \ExecuteOptions{dvips}% |
| 46 | \or |
| 47 | % pdfTeX is running in pdf mode |
| 48 | \def\Gin@driver{pdftex.def}% |
| 49 | \ExecuteOptions{pdftex}% |
| 50 | \or |
| 51 | % VTeX is running |
| 52 | \def\Gin@driver{vtex.def}% |
| 53 | \ExecuteOptions{vtex}% |
| 54 | \or |
| 55 | % XeTeX is running |
| 56 | \def\Gin@driver{xetex.def}% |
| 57 | \ExecuteOptions{xetex}% |
| 58 | \or |
| 59 | % luatex (> 0.85) |
| 60 | \def\Gin@driver{luatex.def}% |
| 61 | \ExecuteOptions{luatex}% |
| 62 | \or |
| 63 | % HiTeX is running |
| 64 | \def\Gin@driver{hitex.def}% |
| 65 | \DeclareOption{hitex}{\def\Gin@driver{hitex.def}} |
| 66 | \ExecuteOptions{hitex}% |
| 67 | \else |
| 68 | \PackageError{color}{Unexpected configuration}{} |
| 69 | \fi |
| 70 | \endinput |