-
Notifications
You must be signed in to change notification settings - Fork 2
/
graphics.cfg
70 lines (68 loc) · 1.4 KB
/
graphics.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
% https://creativecommons.org/publicdomain/zero/1.0/
\ProvidesFile{graphics.cfg}%
[2023/04/17 v1.12 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
}%
% check HiTeX
\@ifundefined{HINTversion}{}{%
\chardef\x=5\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}%
\or
% HiTeX is running
\def\Gin@driver{hitex.def}%
\DeclareOption{hitex}{\def\Gin@driver{hitex.def}}
\ExecuteOptions{hitex}%
\else
\PackageError{graphics}{Unexpected configuration}{}
\fi
\endinput