summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/graphics/graphics.cfg
blob: d9fe21767e6808b3092978654d299446ec38108f (plain)
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
\ProvidesFile{graphics.cfg}%
  [2005/10/12 v1.3b graphics configuration of teTeX/TeXLive, extended for XeTeX]

% 2005/10/12 moved this here to avoid shipping modified graphics.sty
\DeclareOption{xetex}{\def\Gin@driver{xetex.def}}

% Select an appropriate default driver
\begingroup
  \chardef\x=0\relax
  % check pdfTeX
  \@ifundefined{pdfoutput}{}{%
    \ifcase\pdfoutput
    \else
      \chardef\x=1\relax
    \fi
  }%
  % check VTeX
  \@ifundefined{OpMode}{}{%
    \chardef\x=2\relax
  }%
  % check XeTeX
  \@ifundefined{XeTeXversion}{}{%
    \chardef\x=3\relax
  }%
\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}%
\else
  % XeTeX is running
  \def\Gin@driver{xetex.def}%
  \ExecuteOptions{xetex}%
\fi

% Fix for dvips and xdvi versions that can uncompress
% graphic files without an explicite call of gunzip.
% (The fix is not applied for miniltx.tex, because
% \AtEndOfPackage is not available in plainTeX.)
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname AtEndOfPackage\endcsname\relax
\else
  \AtEndOfPackage{%
    \begingroup
    \@ifundefined{DeclareGraphicsRule}{%
      \endgroup
    }{%
      \def\x{dvips.def}%
      \expandafter\endgroup
      \ifx\x\Gin@driver
        \DeclareGraphicsRule{.pz}{eps}{.bb}{}%
        \DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}%
        \DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}%
        \DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}%
        \DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}%
      \fi
    }%
  }%
\fi
\endinput