Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver overwrite added #3

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
21 changes: 20 additions & 1 deletion graphics.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
% https://creativecommons.org/publicdomain/zero/1.0/

\ProvidesFile{graphics.cfg}%
[2016/06/04 v1.11 sample graphics configuration]%
[2024/02/28 v1.12 sample graphics configuration]%

% Using l3 would be nicer here, but this one also works with very old LaTeX
\def\Gin@DeclareEngineClashs#1{%
komascript marked this conversation as resolved.
Show resolved Hide resolved
\@for \@tempa:=#1 \do {%
\DeclareOption{\@tempa}{%
\PackageWarningNoLine{graphics}{%
Explicte driver option \CurrentOption\space ignored,\MessageBreak
komascript marked this conversation as resolved.
Show resolved Hide resolved
because detected engine does not support it.\MessageBreak
We recommend to remove the explicite driver option.\MessageBreak
Still staying with driver \Gin@driver
}%
}%
}%
}

% Select an appropriate default driver
\begingroup
Expand Down Expand Up @@ -39,22 +53,27 @@
% default case
\def\Gin@driver{dvips.def}%
\ExecuteOptions{dvips}%
\Gin@DeclareEngineClashs{pdftex,vtex,xetex,luatex}%
\or
% pdfTeX is running in pdf mode
\def\Gin@driver{pdftex.def}%
\ExecuteOptions{pdftex}%
\Gin@DeclareEngineClashs{dvips,xdvi,dvipdf,dvipdfm,dvipdftmx,xetex,luatex,dvisvgm,dvipsone,dviwindo,emtex,dviwin,oztex,textures,pctexwin,pctexhp,pctex32,truetex,tcidvi,vtex}%
\or
% VTeX is running
\def\Gin@driver{vtex.def}%
\ExecuteOptions{vtex}%
\Gin@DeclareEngineClashs{dvips,xdvi,dvipdf,dvipdfm,dvipdftmx,xetex,pdftex,luatex,dvisvgm,dvipsone,dviwindo,emtex,dviwin,oztex,textures,pctexwin,pctexhp,pctex32,truetex,tcidvi}%
\or
% XeTeX is running
\def\Gin@driver{xetex.def}%
\ExecuteOptions{xetex}%
\Gin@DeclareEngineClashs{dvips,xdvi,dvipdf,dvipdfm,dvipdftmx,pdftex,luatex,dvisvgm,dvipsone,dviwindo,emtex,dviwin,oztex,textures,pctexwin,pctexhp,pctex32,truetex,tcidvi,vtex}%
\or
% luatex (> 0.85)
\def\Gin@driver{luatex.def}%
\ExecuteOptions{luatex}%
\Gin@DeclareEngineClashs{dvips,xdvi,dvipdf,dvipdfm,dvipdftmx,xetex,pdftex,dvisvgm,dvipsone,dviwindo,emtex,dviwin,oztex,textures,pctexwin,pctexhp,pctex32,truetex,tcidvi,vtex}%
\else
\PackageError{graphics}{Unexpected configuration}{}
\fi
Expand Down