Debian Codegraph @

texmf-dist/source/latex/epstopdf-pkg/epstopdf.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: epstopdf.dtx
4 % Version: 2020-01-24 v2.11
5 % Info: Conversion with epstopdf on the fly
6 %
7 % Copyright (C)
8 % 2001-2010 Heiko Oberdiek
9 % 2016-2020 Oberdiek Package Support Group
10 %
11 % This work may be distributed and/or modified under the
12 % conditions of the LaTeX Project Public License, either
13 % version 1.3c of this license or (at your option) any later
14 % version. This version of this license is in
15 % https://www.latex-project.org/lppl/lppl-1-3c.txt
16 % and the latest version of this license is in
17 % https://www.latex-project.org/lppl.txt
18 % and version 1.3 or later is part of all distributions of
19 % LaTeX version 2005/12/01 or later.
20 %
21 % This work has the LPPL maintenance status "maintained".
22 %
23 % The Current Maintainers of this work are
24 % Heiko Oberdiek and the Oberdiek Package Support Group
25 % https://github.com/ho-tex/epstopdf/issues
26 %
27 % This work consists of the main source file epstopdf.dtx
28 % and the derived files
29 % epstopdf.sty, epstopdf.pdf, epstopdf.ins, epstopdf.drv,
30 % epstopdf-base.sty, epstopdf-test1.tex.
31 %
32 % Distribution:
33 % CTAN:macros/latex/contrib/epstopdf-pkg/epstopdf.dtx
34 % CTAN:macros/latex/contrib/epstopdf-pkg/epstopdf.pdf
35 %
36 % Unpacking:
37 % (a) If epstopdf.ins is present:
38 % tex epstopdf.ins
39 % (b) Without epstopdf.ins:
40 % tex epstopdf.dtx
41 % (c) If you insist on using LaTeX
42 % latex \let\install=y\input{epstopdf.dtx}
43 % (quote the arguments according to the demands of your shell)
44 %
45 % Documentation:
46 % (a) If epstopdf.drv is present:
47 % latex epstopdf.drv
48 % (b) Without epstopdf.drv:
49 % latex epstopdf.dtx; ...
50 % The class ltxdoc loads the configuration file ltxdoc.cfg
51 % if available. Here you can specify further options, e.g.
52 % use A4 as paper format:
53 % \PassOptionsToClass{a4paper}{article}
54 %
55 % Programm calls to get the documentation (example):
56 % pdflatex epstopdf.dtx
57 % makeindex -s gind.ist epstopdf.idx
58 % pdflatex epstopdf.dtx
59 % makeindex -s gind.ist epstopdf.idx
60 % pdflatex epstopdf.dtx
61 %
62 % Installation:
63 % TDS:tex/latex/epstopdf/epstopdf.sty
64 % TDS:tex/latex/epstopdf/epstopdf-base.sty
65 % TDS:doc/latex/epstopdf/epstopdf.pdf
66 % TDS:source/latex/epstopdf/epstopdf.dtx
67 %
68 %<*ignore>
69 \begingroup
70 \catcode123=1 %
71 \catcode125=2 %
72 \def\x{LaTeX2e}%
73 \expandafter\endgroup
74 \ifcase 0\ifx\install y1\fi\expandafter
75 \ifx\csname processbatchFile\endcsname\relax\else1\fi
76 \ifx\fmtname\x\else 1\fi\relax
77 \else\csname fi\endcsname
78 %</ignore>
79 %<*install>
80 \input docstrip.tex
81 \Msg{************************************************************************}
82 \Msg{* Installation}
83 \Msg{* Package: epstopdf 2020-01-24 v2.11 Conversion with epstopdf on the fly (HO)}
84 \Msg{************************************************************************}
85
86 \keepsilent
87 \askforoverwritefalse
88
89 \let\MetaPrefix\relax
90 \preamble
91
92 This is a generated file.
93
94 Project: epstopdf
95 Version: 2020-01-24 v2.11
96
97 Copyright (C)
98 2001-2010 Heiko Oberdiek
99 2016-2019 Oberdiek Package Support Group
100
101 This work may be distributed and/or modified under the
102 conditions of the LaTeX Project Public License, either
103 version 1.3c of this license or (at your option) any later
104 version. This version of this license is in
105 https://www.latex-project.org/lppl/lppl-1-3c.txt
106 and the latest version of this license is in
107 https://www.latex-project.org/lppl.txt
108 and version 1.3 or later is part of all distributions of
109 LaTeX version 2005/12/01 or later.
110
111 This work has the LPPL maintenance status "maintained".
112
113 The Current Maintainers of this work are
114 Heiko Oberdiek and the Oberdiek Package Support Group
115 https://github.com/ho-tex/epstopdf/issues
116
117
118 This work consists of the main source file epstopdf.dtx
119 and the derived files
120 epstopdf.sty, epstopdf.pdf, epstopdf.ins, epstopdf.drv,
121 epstopdf-base.sty.
122
123 \endpreamble
124 \let\MetaPrefix\DoubleperCent
125
126 \generate{%
127 \file{epstopdf.ins}{\from{epstopdf.dtx}{install}}%
128 \file{epstopdf.drv}{\from{epstopdf.dtx}{driver}}%
129 \usedir{tex/latex/epstopdf}%
130 \file{epstopdf.sty}{\from{epstopdf.dtx}{package}}%
131 \file{epstopdf-base.sty}{\from{epstopdf.dtx}{base}}%
132 }
133
134 \catcode32=13\relax% active space
135 \let =\space%
136 \Msg{************************************************************************}
137 \Msg{*}
138 \Msg{* To finish the installation you have to move the following}
139 \Msg{* files into a directory searched by TeX:}
140 \Msg{*}
141 \Msg{* epstopdf.sty, epstopdf-base.sty}
142 \Msg{*}
143 \Msg{* To produce the documentation run the file `epstopdf.drv'}
144 \Msg{* through LaTeX.}
145 \Msg{*}
146 \Msg{* Happy TeXing!}
147 \Msg{*}
148 \Msg{************************************************************************}
149
150 \endbatchfile
151 %</install>
152 %<*ignore>
153 \fi
154 %</ignore>
155 %<*driver>
156 \NeedsTeXFormat{LaTeX2e}
157 \ProvidesFile{epstopdf.drv}%
158 [2020-01-24 v2.11 Conversion with epstopdf on the fly (HO)]%
159 \documentclass{ltxdoc}
160 \usepackage{holtxdoc}[2011/11/22]
161 \begin{document}
162 \DocInput{epstopdf.dtx}%
163 \end{document}
164 %</driver>
165 % \fi
166 %
167 %
168 % \GetFileInfo{epstopdf.drv}
169 %
170 % \title{The \xpackage{epstopdf} package}
171 % \date{2020-01-24 v2.11}
172 % \author{Heiko Oberdiek\thanks
173 % {Please report any issues at \url{https://github.com/ho-tex/epstopdf/issues}}}
174 %
175 % \maketitle
176 %
177 % \begin{abstract}
178 % This packages adds support of handling eps images
179 % to package \xpackage{graphics} or \xpackage{graphicx}
180 % with option \xoption{pdftex}. If an eps image is detected,
181 % epstopdf is automatically called to convert it to pdf format.
182 % \end{abstract}
183 %
184 % \tableofcontents
185 %
186 % \providecommand*{\xprogram}[1]{\textsf{#1}}
187 %
188 % \section{Documentation}
189 %
190 % \subsection{Introduction}
191 %
192 % \LaTeX\ provides its graphics bundle to include graphics files.
193 % Both packages \xpackage{graphics} or \xpackage{graphicx} may
194 % be used. the latter one loads the first and adds options
195 % in key value style for \cs{includegraphics}.
196 %
197 % Usually the drivers do not support all kind of graphics files.
198 % Other image types must be converted, before they become
199 % usuable. In case of driver \xprogram{dvips}, the graphics
200 % rule may contain a conversion rule. Then all that package
201 % \xpackage{graphics} must know is the bounding box, the command
202 % is passed to \xprogram{dvips} that calls it and embeds the
203 % converted image.
204 %
205 % However, \pdfTeX\ has its driver for PDF output already
206 % build in. It's graphics inclusion commands (\cs{pdfximage})
207 % does not allow the execution of external commands.
208 % Therefore commands in the last argument of
209 % \cs{DeclareGraphicsRule} were of no use.
210 % But external programs can be called within \pdfTeX.
211 % This feature is called ``shell escape'' or ``write 18''
212 % and must usually enabled explicitely because of security reasons.
213 % Now, this package \xpackage{epstopdf} hooks
214 % into package \xpackage{graphics}' code to catch
215 % that argument with the external command and executes it
216 % to convert the graphics file to a supported format and
217 % passes the control of graphics inclusion back to package
218 % \xpackage{graphics}.
219 %
220 % \subsection{Requirements}
221 %
222 % \begin{itemize}
223 % \item
224 % The feature \cs{write18} must be enabled. This allows the
225 % running of external programs during \TeX's compile run.
226 % Keep in mind that this is a security risk. The feature is an
227 % addition to \TeX. Mik\TeX\ and \TeX\ Live support it.
228 % In Web2C based \TeX\ distributions (\TeX\ Live) it can be
229 % enabled in the configuration file \xfile{texmf.cnf}:
230 % \begin{quote}
231 % |shell_escape = 1|
232 % \end{quote}
233 % Because of the security risk, it is better to do it on the
234 % command line only:
235 % \begin{quote}
236 % \texttt{--shell-escape} (\TeX\ Live)\\
237 % \texttt{--enable-write18} (MiK\TeX)
238 % \end{quote}
239 % Example:
240 % \begin{quote}
241 % |pdflatex -shell-escape test.tex|
242 % \end{quote}
243 % \item
244 % The program \xprogram{epstopdf} for the conversion from EPS
245 % to PDF. However, other programs can
246 % be used and configured by \cs{DeclareGraphicsRule}.
247 % Example:
248 % \begin{quote}
249 % |\epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{%|\\
250 % | ps2pdf -dEPSCrop #1 \OutputFile|\\
251 % |}|
252 % \end{quote}
253 % \end{itemize}
254 %
255 % \subsection{Usage}
256 %
257 % The package is loaded after graphic\{s,x\}, e.g.:
258 % \begin{quote}
259 % |\usepackage[pdftex]{graphicx}|\\
260 % |\usepackage{epstopdf}|
261 % \end{quote}
262 % Now images with file name extension \xfile{.eps} are detected
263 % and supported using \cs{includegraphics}.
264 %
265 % If the graphics file name is explicitly specified with extension
266 % \xfile{.eps} the new rule for EPS files is called and
267 % the conversion performed. If option \xoption{update} is in force
268 % then the conversion step is dropped if the target file already
269 % exists and is not older then the EPS file.
270 %
271 % The situation is more complicate if the graphics file is
272 % given without file name extension. Then the \xpackage{graphics}
273 % package must search for a supported image file.
274 % The possible extensions are stored in the graphics extension
275 % list, that can be set by \cs{DeclareGraphicsExtensions}.
276 % The algorithm:
277 % \begin{quote}
278 % \def\>{\mbox{}\quad}
279 % function search( \meta{filebase} )\\
280 % \>foreach \meta{ext} in \meta{graphics extensions}\\
281 % \>\>foreach \meta{dir} in \meta{current directory}, \meta{\cs{graphicspath}}\\
282 % \>\>\>\meta{file} := \meta{dir} + \meta{filebase} + \meta{ext}\\
283 % \>\>\>if exist \meta{file}\\
284 % \>\>\>\>return found\\
285 % \>return not found
286 % \end{quote}
287 % Package \xpackage{epstopdf} puts \xfile{.eps} at the end of the
288 % graphics extension search list. This is the behaviour of option
289 % \xoption{append} that is enabled by default.
290 % That means, the conversion is called last
291 % unless a supported file type cannot be found earlier. This avoids
292 % unnecessary conversion steps that slow down the \LaTeX\ run.
293 % If you want to use option \xoption{update} and your \pdfTeX\ supports
294 % it, then an outdated PDF file also would be found earlier unless
295 % \xoption{suffix} is used that is the default since version 2.0.
296 %
297 % With an empty option \xoption{suffix} and option
298 % \xoption{prepend} there is a risk that an original PDF file is overwritten:
299 %
300 % If the original image file is the PDF file and there is also a generated
301 % EPS file, then the original PDF file can be regenerated (depending
302 % on the option settings) and the original PDF file gets lost.
303 % Therefore option \xoption{suffix} is introduced in version 1.9
304 % to create a separate name space for generated output files.
305 %
306 % \textbf{Note:} Usually the conversion program needs the exact location
307 % of the image file. Usually the current directory works.
308 % Also if the image file is found using \cs{graphicspath}, the
309 % location is known. However, if the image is somewhere
310 % in a directory of environment variable |TEXINPUTS|, then
311 % the package does not know the exact location and the
312 % conversion program will not find the image file unless it
313 % implements a search using |TEXINPUTS| (program \xprogram{kpsewhich}
314 % may be of help in this task).
315 %
316 % \subsection{Options}
317 %
318 % Options can be given as package options or later using:
319 % \begin{declcs}{epstopdfsetup} \M{key value list}
320 % \end{declcs}
321 % \LaTeX\ expands the option list before passing the option list
322 % to the package's option handling code. This can fail
323 % for option \xoption{suffix} if it contains some of the macros
324 % described below. Use \cs{epstopdfsetup} after the package is loaded.
325 % Or load package \xpackage{kvoptions-patch} before. This package
326 % is also loaded by option \xoption{patch} of package \xpackage{kvoptions}.
327 % \LaTeX's option code is redefined to respect key value options and
328 % let the values untouched.
329 %
330 % \begin{description}
331 % \def\It#1{\item[\xoption{#1}:]}^^A
332 % \It{update}
333 % The conversion program is only called, if the target file
334 % does not exist or is older than the source image file.
335 % \It{append}
336 % Puts the extension \xfile{.eps} at the end of the graphics extension list
337 % (default).
338 % \It{prepend}
339 % Puts the extension \xfile{.eps} at the begin of the graphics extension list.
340 % \It{outdir}
341 % The converted file may put in an other output directory.
342 % The value of \xoption{outdir} must include the directory separator.
343 % Example for the current directory:
344 % \begin{quote}
345 % |\epstopdfsetup{outdir=./}|
346 % \end{quote}
347 % For other directories ensure, that they can be found.
348 % See \cs{graphicspath} or |TEXINPUTS|.
349 % \It{suffix}
350 % This option takes a string that is put between the file name base
351 % and the extension of the output file. Rationale: It can happen,
352 % that a PDF file is the original file and the EPS file the
353 % generated file. If now the package thinks, that the PDF file
354 % is the generated file, it will `regnerate' it. But in reality
355 % the original file is lost. Therefore I recommend to use this
356 % option always to generate a separate name space for generated
357 % files. Proposed value is \texttt{-generated} or \texttt{.generated}.
358 % The suffix \texttt{.generated} will also work here without the need for
359 % package \xpackage{grffile}).
360 %
361 % Example:
362 % \begin{quote}
363 % |\epstopdfsetup{suffix=-generated}|\\
364 % Then \xfile{foo.eps} is converted to \xfile{foo-generated.pdf}.
365 % \end{quote}
366 % \cs{SourceExt} can be used inside the suffix string.
367 % It's will be replaced by the extension of the image source
368 % file without the leading dot, for instance:
369 % \begin{quote}
370 % |\epstopdfsetup{suffix=-\SourceExt-converted-to}|\\
371 % \xfile{foo.eps} $\Rightarrow$ \xfile{foo-eps-converted-to.pdf}
372 % \end{quote}
373 % See also the next option \xoption{prefersuffix} that
374 % modifies the behaviour of option \xoption{suffix} in some
375 % cases.
376 %
377 % Default for \xoption{suffix} is `|-\SourceExt-converted-to|'.
378 %
379 % \It{prefersuffix}
380 % If a suffix is set by option \xoption{suffix}, then there can be
381 % two image file names that could be taken into account for inclusion:
382 % A image file name with the suffix string inside
383 % its name and a image file name without; e.g. for \xfile{foo.eps}
384 % the names could be:
385 % \begin{quote}
386 % \xfile{foo-suffix.pdf}, \xfile{foo.pdf}
387 % \end{quote}
388 % If option \xoption{perfersuffix} is turned on, the
389 % file \xfile{foo-suffix.pdf} and its generation is preferred
390 % over using \xfile{foo.pdf}. Otherwise \xfile{foo.pdf} is included
391 % without generating \xfile{foo-suffix.pdf}.
392 % The default of option \xoption{prefersuffix} is \texttt{true}.
393 % \It{program@epstopdf}
394 % The name for the conversion program from EPS to PDF,
395 % default is `|epstopdf|'.
396 % \It{verbose}
397 % It prints some information about the image in the \xfile{.log} file
398 % (default).
399 % \end{description}
400 %
401 % \subsection{Configuration}
402 %
403 % \subsubsection{System configuration file \xfile{epstopdf-sys.cfg}}
404 %
405 % If \xfile{epstopdf-sys} exists it is loaded at the end of the
406 % package \xpackage{epstopdf-base} and before the user configuration
407 % file. It's intended for TeX distributors. Thus they could add
408 % additional conversion rules (e.g., .gif -> .png) or set options.
409 %
410 % \subsubsection{User configuration file \xfile{epstopdf.cfg}}
411 %
412 % A configuration file \xfile{epstopdf.cfg} is loaded at the end
413 % of the package if it exists. It can be used for changing
414 % the default option setting. Example:
415 % \begin{quote}
416 % |\epstopdfsetup{verbose=false}|
417 % \end{quote}
418 %
419 % \subsubsection{Conversion program}
420 %
421 % You can use \cs{DeclareGraphicsRule} in a similar way as the
422 % route via \xprogram{dvips} to specify the conversion
423 % command line.
424 % The conversion argument starts with a back tick, followed
425 % by the conversion command including parameters.
426 %
427 % The whole conversion argument should also be wrapped inside
428 % \cs{epstopdfcall}. This reduces the problem with packages
429 % (e.g. \xpackage{pst-pdf}) that use the conversion argument
430 % and expands it. Macros \cs{SourceFile}, \cs{OutputFile}, and
431 % \cs{SourceExt} are not defined outside \xpackage{epstopdf-base}'s
432 % \cs{Gin@setfile} and error messages because of undefined
433 % command names are the result. If \cs{epstopdfcall} detects that
434 % it is called outside \xpackage{epstopdf-base}'s \cs{Gin@setfile}
435 % then it replaces the conversion argument by
436 % package \xpackage{graphics}'s
437 % default, usually the image file.
438 %
439 % The following macros are available inside:
440 % \begin{description}
441 % \def\It#1{\item[\cs{#1}:]}
442 % \It{OutputFile}: output file name (with known path and extension)
443 % \It{SourceFile}: source file name (with known path and extension),
444 % usually the same as |#1|,
445 % \It{SourceExt}: source extension without leading dot.
446 % \end{description}
447 %
448 % \paragraph{Conversion from EPS to PDF.}
449 % Other programs than \xprogram{epstopdf} can be used to convert from
450 % EPS to PDF. Example that uses \xprogram{Ghostscript}:
451 % \begin{quote}
452 % |\DeclareGraphicsRule{.eps}{pdf}{.pdf}{%|\\
453 % | \epstopdfcall{`ps2pdf -dEPSCrop #1 \noexpand\OutputFile}%|\\
454 % |}|
455 % \end{quote}
456 % \cs{DeclareGraphicsRule} expands the argument, therefore \cs{noexpand}
457 % is necessary. As convenience package \xpackage{epstopdf-base} defines
458 % \cs{epstopdfDeclareGraphicsRule}. Then the conversion argument
459 % is not expanded, \cs{epstopdfcall} and the back tick are added:
460 % \begin{quote}
461 % |\epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{%|\\
462 % | ps2pdf -dEPSCrop #1 \OutputFile|\\
463 % |}|
464 % \end{quote}
465 %
466 % Also \cs{OutputFile} respects the setting of option \xoption{outdir}.
467 %
468 % \subsection{Other image formats}
469 %
470 % The support that package \xpackage{epstopdf} implements is not
471 % limited to EPS files. Other image conversions can be declared.
472 % The following example shows it for GIF images under Unix with
473 % ImageMagick's \xprogram{convert}:
474 %\begin{quote}
475 %\begin{verbatim}
476 %\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{%
477 % convert #1 \OutputFile
478 %}
479 %\end{verbatim}
480 %\end{quote}
481 % The file extension \xfile{.gif} can be added to the extension list that
482 % package \xpackage{graphics} searches if the file extension
483 % is not given in \cs{includegraphics}.
484 % The list can be set by \cs{GraphicsExtensions}.
485 % \begin{quote}
486 % |\AppendGraphicsExtensions{.gif}|\\
487 % or\\
488 % |\PrependGraphicsExtensions{.gif}|
489 % \end{quote}
490 %
491 % \StopEventually{
492 % }
493 %
494 % \section{Implementation}
495 %
496 % \begin{macrocode}
497 %<*package>
498 % \end{macrocode}
499 %
500 % \subsection{Wrapper package}
501 %
502 % Reload check, especially if the package is not used with \LaTeX.
503 % \begin{macrocode}
504 \begingroup\catcode61\catcode48\catcode32=10\relax%
505 \catcode13=5 % ^^M
506 \endlinechar=13 %
507 \catcode35=6 % #
508 \catcode39=12 % '
509 \catcode44=12 % ,
510 \catcode45=12 % -
511 \catcode46=12 % .
512 \catcode58=12 % :
513 \catcode64=11 % @
514 \catcode123=1 % {
515 \catcode125=2 % }
516 \expandafter\let\expandafter\x\csname [email protected]\endcsname
517 \ifx\x\relax % plain-TeX, first loading
518 \else
519 \def\empty{}%
520 \ifx\x\empty % LaTeX, first loading,
521 % variable is initialized, but \ProvidesPackage not yet seen
522 \else
523 \expandafter\ifx\csname PackageInfo\endcsname\relax
524 \def\x#1#2{%
525 \immediate\write-1{Package #1 Info: #2.}%
526 }%
527 \else
528 \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
529 \fi
530 \x{epstopdf}{The package is already loaded}%
531 \aftergroup\endinput
532 \fi
533 \fi
534 \endgroup%
535 % \end{macrocode}
536 % Package identification:
537 % \begin{macrocode}
538 \begingroup\catcode61\catcode48\catcode32=10\relax%
539 \catcode13=5 % ^^M
540 \endlinechar=13 %
541 \catcode35=6 % #
542 \catcode39=12 % '
543 \catcode40=12 % (
544 \catcode41=12 % )
545 \catcode44=12 % ,
546 \catcode45=12 % -
547 \catcode46=12 % .
548 \catcode47=12 % /
549 \catcode58=12 % :
550 \catcode64=11 % @
551 \catcode91=12 % [
552 \catcode93=12 % ]
553 \catcode123=1 % {
554 \catcode125=2 % }
555 \expandafter\ifx\csname ProvidesPackage\endcsname\relax
556 \def\x#1#2#3[#4]{\endgroup
557 \immediate\write-1{Package: #3 #4}%
558 \xdef#1{#4}%
559 }%
560 \else
561 \def\x#1#2[#3]{\endgroup
562 #2[{#3}]%
563 \ifx#1\@undefined
564 \xdef#1{#3}%
565 \fi
566 \ifx#1\relax
567 \xdef#1{#3}%
568 \fi
569 }%
570 \fi
571 \expandafter\x\csname [email protected]\endcsname
572 \ProvidesPackage{epstopdf}%
573 [2020-01-24 v2.11 Conversion with epstopdf on the fly (HO)]%
574 % \end{macrocode}
575 % Larger catcode set because of configuration files needed.
576 % \begin{macrocode}
577 \begingroup\catcode61\catcode48\catcode32=10\relax%
578 \catcode13=5 % ^^M
579 \endlinechar=13 %
580 \catcode123=1 % {
581 \catcode125=2 % }
582 \catcode64=11 % @
583 \def\x{\endgroup
584 \expandafter\edef\csname ETE@AtEnd\endcsname{%
585 \endlinechar=\the\endlinechar\relax
586 \catcode13=\the\catcode13\relax
587 \catcode32=\the\catcode32\relax
588 \catcode35=\the\catcode35\relax
589 \catcode61=\the\catcode61\relax
590 \catcode64=\the\catcode64\relax
591 \catcode123=\the\catcode123\relax
592 \catcode125=\the\catcode125\relax
593 }%
594 }%
595 \x\catcode61\catcode48\catcode32=10\relax%
596 \catcode13=5 % ^^M
597 \endlinechar=13 %
598 \catcode35=6 % #
599 \catcode64=11 % @
600 \catcode123=1 % {
601 \catcode125=2 % }
602 \def\TMP@EnsureCode#1#2{%
603 \edef\ETE@AtEnd{%
604 \ETE@AtEnd
605 \catcode#1=\the\catcode#1\relax
606 }%
607 \catcode#1=#2\relax
608 }
609 \TMP@EnsureCode{39}{12}% '
610 \TMP@EnsureCode{40}{12}% (
611 \TMP@EnsureCode{41}{12}% )
612 \TMP@EnsureCode{42}{12}% *
613 \TMP@EnsureCode{45}{12}% -
614 \TMP@EnsureCode{47}{12}% /
615 \TMP@EnsureCode{91}{12}% [
616 \TMP@EnsureCode{93}{12}% ]
617 \edef\ETE@AtEnd{\ETE@AtEnd\noexpand\endinput}
618 % \end{macrocode}
619 %
620 % Ensure packages loaded by the full \xpackage{epstopdf}, for compatibility.
621 % \begin{macrocode}
622 \let\ETE@SavedAtEnd\ETE@AtEnd
623 \RequirePackage{infwarerr}[2007/09/09]
624 \RequirePackage{grfext}\relax
625 \RequirePackage{kvoptions}[2007/10/02]
626 \RequirePackage{pdftexcmds}[2007/11/11]
627 \RequirePackage{epstopdf-base}[2019/11/27]
628 \let\ETE@AtEnd\ETE@SavedAtEnd
629 % \end{macrocode}
630 %
631 % \subsubsection{Option handling}
632 %
633 % \begin{macrocode}
634 \DeclareOption*{%
635 \expandafter\epstopdfsetup\expandafter{\CurrentOption}%
636 }
637 \ProcessOptions*\relax
638 % \end{macrocode}
639 %
640 % \begin{macrocode}
641 \ETE@AtEnd%
642 %</package>
643 % \end{macrocode}
644 %
645 % \subsection{Base package}
646 %
647 % \begin{macrocode}
648 %<*base>
649 % \end{macrocode}
650 %
651 % \subsection{Preparations}
652 %
653 % \subsubsection{Relead check and identification}
654 %
655 % Reload check, especially if the package is not used with \LaTeX.
656 % \begin{macrocode}
657 \begingroup\catcode61\catcode48\catcode32=10\relax%
658 \catcode13=5 % ^^M
659 \endlinechar=13 %
660 \catcode35=6 % #
661 \catcode39=12 % '
662 \catcode44=12 % ,
663 \catcode45=12 % -
664 \catcode46=12 % .
665 \catcode58=12 % :
666 \catcode64=11 % @
667 \catcode123=1 % {
668 \catcode125=2 % }
669 \expandafter\let\expandafter\x\csname [email protected]\endcsname
670 \ifx\x\relax % plain-TeX, first loading
671 \else
672 \def\empty{}%
673 \ifx\x\empty % LaTeX, first loading,
674 % variable is initialized, but \ProvidesPackage not yet seen
675 \else
676 \expandafter\ifx\csname PackageInfo\endcsname\relax
677 \def\x#1#2{%
678 \immediate\write-1{Package #1 Info: #2.}%
679 }%
680 \else
681 \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
682 \fi
683 \x{epstopdf-base}{The package is already loaded}%
684 \aftergroup\endinput
685 \fi
686 \fi
687 \endgroup%
688 % \end{macrocode}
689 % Package identification:
690 % \begin{macrocode}
691 \begingroup\catcode61\catcode48\catcode32=10\relax%
692 \catcode13=5 % ^^M
693 \endlinechar=13 %
694 \catcode35=6 % #
695 \catcode39=12 % '
696 \catcode40=12 % (
697 \catcode41=12 % )
698 \catcode44=12 % ,
699 \catcode45=12 % -
700 \catcode46=12 % .
701 \catcode47=12 % /
702 \catcode58=12 % :
703 \catcode64=11 % @
704 \catcode91=12 % [
705 \catcode93=12 % ]
706 \catcode123=1 % {
707 \catcode125=2 % }
708 \expandafter\ifx\csname ProvidesPackage\endcsname\relax
709 \def\x#1#2#3[#4]{\endgroup
710 \immediate\write-1{Package: #3 #4}%
711 \xdef#1{#4}%
712 }%
713 \else
714 \def\x#1#2[#3]{\endgroup
715 #2[{#3}]%
716 \ifx#1\@undefined
717 \xdef#1{#3}%
718 \fi
719 \ifx#1\relax
720 \xdef#1{#3}%
721 \fi
722 }%
723 \fi
724 \expandafter\x\csname [email protected]\endcsname
725 \ProvidesPackage{epstopdf-base}%
726 [2020-01-24 v2.11 Base part for package epstopdf]%
727 % \end{macrocode}
728 %
729 % \subsubsection{Catcodes}
730 %
731 % \begin{macrocode}
732 \begingroup\catcode61\catcode48\catcode32=10\relax%
733 \catcode13=5 % ^^M
734 \endlinechar=13 %
735 \catcode123=1 % {
736 \catcode125=2 % }
737 \catcode64=11 % @
738 \def\x{\endgroup
739 \expandafter\edef\csname ETE@AtEnd\endcsname{%
740 \endlinechar=\the\endlinechar\relax
741 \catcode13=\the\catcode13\relax
742 \catcode32=\the\catcode32\relax
743 \catcode35=\the\catcode35\relax
744 \catcode61=\the\catcode61\relax
745 \catcode64=\the\catcode64\relax
746 \catcode123=\the\catcode123\relax
747 \catcode125=\the\catcode125\relax
748 }%
749 }%
750 \x\catcode61\catcode48\catcode32=10\relax%
751 \catcode13=5 % ^^M
752 \endlinechar=13 %
753 \catcode35=6 % #
754 \catcode64=11 % @
755 \catcode123=1 % {
756 \catcode125=2 % }
757 \def\TMP@EnsureCode#1#2{%
758 \edef\ETE@AtEnd{%
759 \ETE@AtEnd
760 \catcode#1=\the\catcode#1\relax
761 }%
762 \catcode#1=#2\relax
763 }
764 \TMP@EnsureCode{33}{12}% !
765 \TMP@EnsureCode{39}{12}% '
766 \TMP@EnsureCode{42}{12}% *
767 \TMP@EnsureCode{44}{12}% ,
768 \TMP@EnsureCode{45}{12}% -
769 \TMP@EnsureCode{46}{12}% .
770 \TMP@EnsureCode{47}{12}% /
771 \TMP@EnsureCode{58}{12}% :
772 \TMP@EnsureCode{60}{12}% <
773 \TMP@EnsureCode{62}{12}% >
774 \TMP@EnsureCode{96}{12}% `
775 \edef\ETE@AtEnd{\ETE@AtEnd\noexpand\endinput}
776 % \end{macrocode}
777 %
778 % \subsubsection{Load packages}
779 %
780 % This package is split into \xpackage{epstopdf-base} and \xpackage{epstopdf}
781 % The base version is called directly by the \xpackage{graphics} package. Unfortunately
782 % it still includes many contributed packages which breaks the layering of the core
783 % \LaTeX\ graphics release.
784 %
785 % Compatibility concerns mean refactoring the package to only have options
786 % in \xpackage{epstopdf} is tricky, so from release 2.8, if no options have been passed in
787 % to \xpackage{epstopdf-base}, the package loading and option setting are skipped and the default
788 % settings are set directly. In the case of Lua\TeX, the Lua portion of \xpackage{pdftexcmds}
789 % is used to provide the file handling functionality.
790 % \begin{macrocode}
791 \ifx\@curroptions\@empty
792 \ifx\@PackageInfo\@undefined
793 \let\@PackageInfo\PackageInfo
794 \let\@PackageWarningNoLine\PackageWarningNoLine
795 \def\@PackageInfoNoLine#1#2{\PackageInfo{#1}{#2\@gobble}}
796 \let\@PackageError\PackageError
797 \fi
798 \ifx\pdf@strcmp\@undefined
799 \ifx\directlua\@undefined
800 \def\pdf@strcmp{\pdfstrcmp}
801 \def\pdf@filemoddate{\pdffilemoddate}
802 \def\pdf@filesize{\pdffilesize}
803 \def\pdf@system#{\immediate\write18 }
804 \else
805 \directlua{require('pdftexcmds')}
806 \long\def\pdf@strcmp#1#2{\directlua{%
807 oberdiek.pdftexcmds.strcmp('\luaescapestring{#1}',
808 '\luaescapestring{#2}')}}%
809 \def\pdf@filemoddate#1{\directlua{%
810 oberdiek.pdftexcmds.filemoddate('\luaescapestring{#1}')}}
811 \def\pdf@filesize#1{\directlua{%
812 oberdiek.pdftexcmds.filesize('\luaescapestring{#1}')}}
813 \def\pdf@system#1{\directlua{%
814 oberdiek.pdftexcmds.system('\luaescapestring{#1}')}}
815 \fi
816 \fi
817 \else
818 % \end{macrocode}
819 %
820 % \begin{macrocode}
821 \RequirePackage{infwarerr}[2007/09/09]
822 \RequirePackage{grfext}\relax
823 \RequirePackage{kvoptions}[2007/10/02]
824 \RequirePackage{pdftexcmds}[2007/11/11]
825 % \end{macrocode}
826 %
827 % \begin{macrocode}
828 \fi
829 % \end{macrocode}
830 %
831 % \subsection{Checks}
832 %
833 % Check, whether package graphics is loaded
834 % (also graphicx loads graphics).
835 % Because miniltx.tex does not know \cs{@ifpackageloaded}
836 % we test for \cs{Gin@setfile} instead.
837 % \begin{macrocode}
838 \begingroup\expandafter\expandafter\expandafter\endgroup
839 \expandafter\ifx\csname Gin@setfile\endcsname\relax
840 \@PackageWarningNoLine{epstopdf}{%
841 No graphics package \string`graphic{s,x}\string' loaded%
842 }%
843 \newcommand*{\epstopdfsetup}[1]{}%
844 \expandafter\ETE@AtEnd
845 \fi%
846 % \end{macrocode}
847 %
848 % Check, whether pdftex.def is loaded. \cs{[email protected]} is not
849 % available with miniltx.tex, thus we test for \cs{Gin@driver}.
850 % \begin{macrocode}
851 \begingroup
852 \def\x{luatex.def}%
853 \ifx\Gin@driver\x
854 \else
855 \def\x{pdftex.def}%
856 \ifx\Gin@driver\x
857 \else
858 \@PackageWarningNoLine{epstopdf}{%
859 Drivers other than `pdftex' and `luatex' are not supported%
860 }%
861 \endgroup
862 \newcommand*{\epstopdfsetup}[1]{}%
863 \expandafter\expandafter\expandafter\ETE@AtEnd
864 \fi%
865 \fi%
866 \endgroup
867 % \end{macrocode}
868 %
869 % Check, whether the shell escape feature is enabled.
870 %
871 % \begin{macrocode}
872 \begingroup
873 \expandafter\ifx\csname pdf@shellescape\endcsname\relax
874 \else
875 \ifnum\pdf@shellescape>0 %
876 \else
877 \@PackageWarningNoLine{epstopdf}{%
878 Shell escape feature is not enabled%
879 }%
880 \fi
881 \fi
882 \endgroup
883 % \end{macrocode}
884 %
885 % \subsection{Options}
886 % As noted above, if no options have been passed in (typically if called directly
887 % from \verb|pdftex.def|) then the \xpackage{kvoptions} handling is not loaded
888 % and the defaults are set directly.
889 % \begin{macrocode}
890 \newif\ifETE@prepend
891 \ifx\SetupKeyvalOptions\@undefined
892 \def\ETE@let#1#2{%
893 \expandafter\let\csname ifETE@#1\expandafter\endcsname
894 \csname if#2\endcsname}
895 \ETE@let{verbose}{true}
896 \ETE@let{disable}{false}
897 \ETE@let{update}{true}
898 \ETE@let{prepend}{false}
899 \ETE@let{prefersuffix}{true}
900 \def\ETE@outdir{}
901 \def\ETE@suffix{-\SourceExt-converted-to}
902 \def\ETE@program@epstopdf{\epstopdf@sys@cmd}
903 \newcommand*{\epstopdfsetup}[1]{}%
904 \else
905 % \end{macrocode}
906 %
907 % \begin{macrocode}
908 \SetupKeyvalOptions{family=ETE,prefix=ETE@}
909 \DeclareBoolOption{update}
910 \DeclareBoolOption{verbose}
911 \DeclareVoidOption{prepend}{\ETE@prependtrue}
912 \DeclareVoidOption{append}{\ETE@prependfalse}
913 \DeclareStringOption{outdir}
914 \DeclareStringOption{suffix}
915 \DeclareBoolOption{prefersuffix}
916 \DeclareStringOption{program@epstopdf}
917 % \end{macrocode}
918 % Options \xoption{disable} and \xoption{enable} are for testing
919 % only. Therefore they are not documented on purpose.
920 % \begin{macrocode}
921 \DeclareBoolOption{disable}
922 \DeclareComplementaryOption{enable}{disable}
923 % \end{macrocode}
924 % \begin{macrocode}
925 \newcommand*{\epstopdfsetup}{\setkeys{ETE}}
926 % \end{macrocode}
927 %
928 % \subsubsection{Default setting}
929 %
930 % \begin{macrocode}
931 \epstopdfsetup{%
932 verbose,%
933 enable,%
934 append,%
935 update,%
936 prefersuffix,%
937 suffix=-\SourceExt-converted-to,%
938 program@epstopdf=epstopdf%
939 }
940 % \end{macrocode}
941 %
942 % \begin{macrocode}
943 \fi
944 % \end{macrocode}
945 %
946 % \subsection{Make and verbose}
947 %
948 % \begin{macrocode}
949 \begingroup\expandafter\expandafter\expandafter\endgroup
950 \expandafter\ifx\csname pdf@filemoddate\endcsname\relax
951 \def\ETE@Make#1#2{%
952 \ifETE@update
953 \ETE@WarnModDate
954 \fi
955 \@firstofone
956 }%
957 \def\ETE@WarnModDate{%
958 \@PackageWarningNoLine{epstopdf}{%
959 \string\pdffilemoddate\space is not available,\MessageBreak
960 option `update' will be ignored%
961 }%
962 \global\let\ETE@WarnModDate\relax
963 }%
964 \def\ETE@FileInfo#1#2{#1 file: <#2>}%
965 \else
966 \def\ETE@Make#1#2{%
967 \ifETE@update
968 \ifnum\pdf@strcmp{\pdf@filemoddate{#1}}{\pdf@filemoddate{#2}}>0 %
969 \expandafter\expandafter\expandafter\@firstofone
970 \else
971 \@PackageInfoNoLine{epstopdf}{%
972 Output file is already uptodate%
973 }%
974 \expandafter\expandafter\expandafter\@gobble
975 \fi
976 \else
977 \expandafter\@firstofone
978 \fi
979 }%
980 \def\ETE@FileInfo#1#2{%
981 #1 file: <#2>%
982 \expandafter\expandafter\expandafter
983 \ETE@Date\pdf@filemoddate{#2}\@nil
984 \expandafter\expandafter\expandafter
985 \ETE@Size\pdf@filesize{#2}\@nil
986 }%
987 \def\ETE@Date#1\@nil{%
988 \ifx\\#1\\%
989 \else
990 \ETE@@Date#1\@nil
991 \fi
992 }%
993 \def\ETE@@Date#1:#2#3#4#5#6#7#8#9{%
994 \MessageBreak
995 \@spaces\space\space\space date: #2#3#4#5-#6#7-#8#9 %
996 \ETE@@Time
997 }%
998 \def\ETE@@Time#1#2#3#4#5#6#7\@nil{%
999 #1#2:#3#4:#5#6%
1000 }%
1001 \def\ETE@Size#1\@nil{%
1002 \ifx\\#1\\%
1003 \else
1004 \MessageBreak
1005 \@spaces\space\space\space size: #1 bytes%
1006 \fi
1007 }%
1008 \fi
1009 % \end{macrocode}
1010 %
1011 % \subsection{Adding conversion support}
1012 %
1013 % Patch \cs{Gin@setfile} to execute |#3|, if it contains
1014 % a command.
1015 % \begin{macrocode}
1016 \expandafter\ifx\csname ETE@OrgGin@setfile\endcsname\relax
1017 \let\ETE@OrgGin@setfile\Gin@setfile
1018 \else
1019 \@PackageError{epstopdf}{%
1020 Command \string\ETE@OrgGin@setfile\space
1021 already defined.\MessageBreak
1022 }{%
1023 Probably some package has included the code of this package%
1024 \MessageBreak
1025 instead of using \string\RequirePackage{epstopdf}.%
1026 \MessageBreak
1027 \@ehc
1028 }%
1029 \fi
1030 \def\ETE@IfFileExists{%
1031 \begingroup\expandafter\expandafter\expandafter\endgroup
1032 \expandafter\ifx\csname grffile@IfFileExists\endcsname\relax
1033 \expandafter\IfFileExists
1034 \else
1035 \global\let\ETE@IfFileExists\grffile@IfFileExists
1036 \expandafter\grffile@IfFileExists
1037 \fi
1038 }
1039 \def\ETE@Skip#1#2\x\fi\fi{%
1040 \fi
1041 \fi
1042 \endgroup
1043 \fi
1044 \fi
1045 #1%
1046 }
1047 \newif\ifETE@InsideSetfile
1048 \newcommand*{\epstopdfcall}[1]{%
1049 \ifETE@InsideSetfile
1050 \expandafter\@firstoftwo
1051 \else
1052 \expandafter\@secondoftwo
1053 \fi
1054 {`#1}%
1055 {\Gin@base\Gin@ext}%
1056 }
1057 \def\ETE@DefCommandLine#1{%
1058 \edef\CommandLine{\expandafter\fi\if`#1}%
1059 }
1060 \def\ETE@DefX#1{%
1061 \expandafter\expandafter\expandafter\def
1062 \expandafter\expandafter\expandafter\x
1063 \expandafter\expandafter\expandafter{%
1064 \expandafter\fi\if`#1\relax\else
1065 }%
1066 }
1067 \def\ETE@Gin@setfile#1#2#3{%
1068 \ifETE@disable
1069 \ETE@OrgGin@setfile{#1}{#2}{#3}%
1070 \else
1071 \begingroup
1072 \ETE@InsideSetfiletrue
1073 \ETE@DefX{#3}%
1074 \expandafter\endgroup
1075 \ifx\x\@empty
1076 \ETE@OrgGin@setfile{#1}{#2}{#3}%
1077 \else
1078 \begingroup
1079 \ETE@InsideSetfiletrue
1080 \def\GraphicsType{#1}%
1081 \def\GraphicsRead{#2}%
1082 \ifETE@prefersuffix
1083 \else
1084 \ifx\ETE@suffix\@empty
1085 \else
1086 \ETE@IfFileExists{\Gin@base\GraphicsRead}{%
1087 \ETE@Skip{%
1088 \ETE@OrgGin@setfile{#1}{#2}{\Gin@base#2}%
1089 }%
1090 }{%
1091 \let\next\relax
1092 }%
1093 \next
1094 \fi
1095 \fi
1096 \ifx\Gin@ext\relax
1097 \let\SourceExt\Gin@eext
1098 \def\SourceFile{\Gin@base\Gin@eext}%
1099 \else
1100 \let\SourceExt\Gin@ext
1101 \def\SourceFile{\Gin@base\Gin@ext}%
1102 \fi
1103 \edef\SourceExt{% remove dot
1104 \expandafter\@cdr\SourceExt\@empty\@nil
1105 }%
1106 \let\OutputDirectory\ETE@outdir
1107 \ifx\OutputDirectory\@empty
1108 \edef\OutputFile{\ETE@GenerateName{\Gin@base}{#2}}%
1109 \else
1110 \begingroup
1111 \filename@parse{\Gin@base#2}%
1112 \edef\x{\endgroup
1113 \def\noexpand\OutputFile{%
1114 \ETE@GenerateName{%
1115 \OutputDirectory\filename@base
1116 }{#2}%
1117 }%
1118 }%
1119 \x
1120 \fi
1121 \ETE@DefCommandLine{#3}%
1122 \ifETE@verbose
1123 \@PackageInfo{epstopdf}{%
1124 \ETE@FileInfo{Source}\SourceFile\MessageBreak
1125 \ETE@FileInfo{Output}\OutputFile\MessageBreak
1126 Command: <\CommandLine>\MessageBreak
1127 \string\includegraphics
1128 }%
1129 \fi
1130 \ETE@Make\SourceFile\OutputFile{%
1131 \pdf@system{\CommandLine}%
1132 \ifETE@verbose
1133 \@PackageInfoNoLine{epstopdf}{%
1134 \ETE@FileInfo{Result}\OutputFile
1135 }%
1136 \fi
1137 }%
1138 \edef\x{\endgroup
1139 \ifx\OutputDirectory\@empty
1140 \else
1141 \def\noexpand\Gin@base{%
1142 \OutputDirectory\noexpand\filename@base
1143 }%
1144 \fi
1145 \ifx\ETE@suffix\@empty
1146 \else
1147 \edef\noexpand\Gin@base{%
1148 \noexpand\Gin@base\ETE@suffix
1149 }%
1150 \fi
1151 \noexpand\ETE@OrgGin@setfile{%
1152 \GraphicsType
1153 }{%
1154 \GraphicsRead
1155 }{%
1156 \OutputFile
1157 }%
1158 }%
1159 \x
1160 \fi
1161 \fi
1162 }
1163 \let\Gin@setfile\ETE@Gin@setfile
1164 \def\ETE@GenerateName#1#2{%
1165 #1\ETE@suffix#2%
1166 }
1167 % \end{macrocode}
1168 %
1169 % \subsection{Declare graphics rule}
1170 %
1171 % \begin{macrocode}
1172 \newcommand*{\epstopdfDeclareGraphicsRule}[4]{%
1173 \ifx\\#4\\%
1174 \@PackageError{epstopdf-base}{%
1175 Conversion command is missing%
1176 }\@ehc
1177 \else
1178 \begingroup
1179 \@ifundefined{Gin@rule@#1}{%
1180 }{%
1181 \@PackageInfo{epstopdf-base}{%
1182 Redefining graphics rule for `#1'%
1183 }%
1184 }%
1185 \endgroup
1186 \@namedef{Gin@rule@#1}##1{{#2}{#3}{\epstopdfcall{#4}}}%
1187 \fi
1188 }
1189 % \end{macrocode}
1190 %
1191 % \cs{DeclareGraphicsRule} for .eps
1192 % \begin{macrocode}
1193 \epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{%
1194 \ETE@epstopdf{#1}%
1195 }
1196 \def\ETE@epstopdf#1{%
1197 \ETE@program@epstopdf\space
1198 \ifcase\ifx\OutputDirectory\@empty
1199 \ifx\ETE@suffix\@empty
1200 1%
1201 \fi
1202 \fi
1203 0 %
1204 --outfile=\OutputFile\space
1205 \fi
1206 #1%
1207 }
1208 % \end{macrocode}
1209 %
1210 % \begin{macrocode}
1211 \ifx\AppendGraphicsExtensions\@undefined\else
1212 % \end{macrocode}
1213 %
1214 % \begin{macrocode}
1215 \ifETE@prepend
1216 \expandafter\PrependGraphicsExtensions
1217 \else
1218 \expandafter\AppendGraphicsExtensions
1219 \fi
1220 {.eps}
1221 % \end{macrocode}
1222 %
1223 % \begin{macrocode}
1224 \fi
1225 % \end{macrocode}
1226 %
1227 % \begin{macrocode}
1228 \let\ETE@prepend\@undefined
1229 % \end{macrocode}
1230 %
1231 % \begin{macrocode}
1232 \ifx\SetupKeyvalOptions\@undefined
1233 \else
1234 % \end{macrocode}
1235 %
1236 % \begin{macrocode}
1237 \DeclareVoidOption{prepend}{%
1238 \PrependGraphicsExtensions{.eps}%
1239 }
1240 \let\ETE@append\@undefined
1241 \DeclareVoidOption{append}{%
1242 \AppendGraphicsExtensions{.eps}%
1243 }
1244 % \end{macrocode}
1245 %
1246 % \begin{macrocode}
1247 \fi
1248 % \end{macrocode}
1249 %
1250 % \begin{macrocode}
1251 \InputIfFileExists{epstopdf-sys.cfg}{}{}
1252 \InputIfFileExists{epstopdf.cfg}{}{}
1253 % \end{macrocode}
1254 %
1255 % Use \texttt{epstpdf} if the cfg files have not set a default.
1256 % \begin{macrocode}
1257 \expandafter\ifx\csname epstopdf@sys@cmd\endcsname\relax
1258 \def\epstopdf@sys@cmd{epstopdf}
1259 \fi
1260 % \end{macrocode}
1261 %
1262 %
1263 % \begin{macrocode}
1264 \ETE@AtEnd%
1265 %</base>
1266 % \end{macrocode}
1267 % \section{Installation}
1268 %
1269 % \subsection{Download}
1270 %
1271 % \paragraph{Package.} This package is available on
1272 % CTAN\footnote{\CTANpkg{epstopdf-pkg}}:
1273 % \begin{description}
1274 % \item[\CTAN{macros/latex/contrib/epstopdf-pkg/epstopdf.dtx}] The source file.
1275 % \item[\CTAN{macros/latex/contrib/epstopdf-pkg/epstopdf.pdf}] Documentation.
1276 % \end{description}
1277 %
1278 %
1279 % \paragraph{Bundle.} All the packages of the bundle `epstopdf'
1280 % are also available in a TDS compliant ZIP archive. There
1281 % the packages are already unpacked and the documentation files
1282 % are generated. The files and directories obey the TDS standard.
1283 % \begin{description}
1284 % \item[\CTANinstall{install/macros/latex/contrib/epstopdf-pkg.tds.zip}]
1285 % \end{description}
1286 % \emph{TDS} refers to the standard ``A Directory Structure
1287 % for \TeX\ Files'' (\CTANpkg{tds}). Directories
1288 % with \xfile{texmf} in their name are usually organized this way.
1289 %
1290 % \subsection{Bundle installation}
1291 %
1292 % \paragraph{Unpacking.} Unpack the \xfile{epstopdf.tds.zip} in the
1293 % TDS tree (also known as \xfile{texmf} tree) of your choice.
1294 % Example (linux):
1295 % \begin{quote}
1296 % |unzip epstopdf.tds.zip -d ~/texmf|
1297 % \end{quote}
1298 %
1299 % \subsection{Package installation}
1300 %
1301 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
1302 % \docstrip\ archive. The files are extracted by running the
1303 % \xfile{.dtx} through \plainTeX:
1304 % \begin{quote}
1305 % \verb|tex epstopdf.dtx|
1306 % \end{quote}
1307 %
1308 % \paragraph{TDS.} Now the different files must be moved into
1309 % the different directories in your installation TDS tree
1310 % (also known as \xfile{texmf} tree):
1311 % \begin{quote}
1312 % \def\t{^^A
1313 % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
1314 % epstopdf.sty & tex/latex/epstopdf/epstopdf.sty\\
1315 % epstopdf-base.sty & tex/latex/epstopdf/epstopdf-base.sty\\
1316 % epstopdf.pdf & doc/latex/epstopdf/epstopdf.pdf\\
1317 % epstopdf.dtx & source/latex/epstopdf/epstopdf.dtx\\
1318 % \end{tabular}^^A
1319 % }^^A
1320 % \sbox0{\t}^^A
1321 % \ifdim\wd0>\linewidth
1322 % \begingroup
1323 % \advance\linewidth by\leftmargin
1324 % \advance\linewidth by\rightmargin
1325 % \edef\x{\endgroup
1326 % \def\noexpand\lw{\the\linewidth}^^A
1327 % }\x
1328 % \def\lwbox{^^A
1329 % \leavevmode
1330 % \hbox to \linewidth{^^A
1331 % \kern-\leftmargin\relax
1332 % \hss
1333 % \usebox0
1334 % \hss
1335 % \kern-\rightmargin\relax
1336 % }^^A
1337 % }^^A
1338 % \ifdim\wd0>\lw
1339 % \sbox0{\small\t}^^A
1340 % \ifdim\wd0>\linewidth
1341 % \ifdim\wd0>\lw
1342 % \sbox0{\footnotesize\t}^^A
1343 % \ifdim\wd0>\linewidth
1344 % \ifdim\wd0>\lw
1345 % \sbox0{\scriptsize\t}^^A
1346 % \ifdim\wd0>\linewidth
1347 % \ifdim\wd0>\lw
1348 % \sbox0{\tiny\t}^^A
1349 % \ifdim\wd0>\linewidth
1350 % \lwbox
1351 % \else
1352 % \usebox0
1353 % \fi
1354 % \else
1355 % \lwbox
1356 % \fi
1357 % \else
1358 % \usebox0
1359 % \fi
1360 % \else
1361 % \lwbox
1362 % \fi
1363 % \else
1364 % \usebox0
1365 % \fi
1366 % \else
1367 % \lwbox
1368 % \fi
1369 % \else
1370 % \usebox0
1371 % \fi
1372 % \else
1373 % \lwbox
1374 % \fi
1375 % \else
1376 % \usebox0
1377 % \fi
1378 % \end{quote}
1379 % If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
1380 % TDS installing feature, then some files can already be in the right
1381 % place, see the documentation of \docstrip.
1382 %
1383 % \subsection{Refresh file name databases}
1384 %
1385 % If your \TeX~distribution
1386 % (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
1387 % these. For example, \TeX\,Live\ users run \verb|texhash| or
1388 % \verb|mktexlsr|.
1389 %
1390 % \subsection{Some details for the interested}
1391 %
1392 % \paragraph{Unpacking with \LaTeX.}
1393 % The \xfile{.dtx} chooses its action depending on the format:
1394 % \begin{description}
1395 % \item[\plainTeX:] Run \docstrip\ and extract the files.
1396 % \item[\LaTeX:] Generate the documentation.
1397 % \end{description}
1398 % If you insist on using \LaTeX\ for \docstrip\ (really,
1399 % \docstrip\ does not need \LaTeX), then inform the autodetect routine
1400 % about your intention:
1401 % \begin{quote}
1402 % \verb|latex \let\install=y\input{epstopdf.dtx}|
1403 % \end{quote}
1404 % Do not forget to quote the argument according to the demands
1405 % of your shell.
1406 %
1407 % \paragraph{Generating the documentation.}
1408 % You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
1409 % the documentation. The process can be configured by the
1410 % configuration file \xfile{ltxdoc.cfg}. For instance, put this
1411 % line into this file, if you want to have A4 as paper format:
1412 % \begin{quote}
1413 % \verb|\PassOptionsToClass{a4paper}{article}|
1414 % \end{quote}
1415 % An example follows how to generate the
1416 % documentation with pdf\LaTeX:
1417 % \begin{quote}
1418 %\begin{verbatim}
1419 %pdflatex epstopdf.dtx
1420 %makeindex -s gind.ist epstopdf.idx
1421 %pdflatex epstopdf.dtx
1422 %makeindex -s gind.ist epstopdf.idx
1423 %pdflatex epstopdf.dtx
1424 %\end{verbatim}
1425 % \end{quote}
1426 %
1427 % \begin{History}
1428 % \begin{Version}{2001/01/06 v1.0}
1429 % \item
1430 % First public version,
1431 % published in the \pdfTeX\ mailing list.
1432 % \end{Version}
1433 % \begin{Version}{2001/02/04 v1.1}
1434 % \item
1435 % Minor documentation update.
1436 % \item
1437 % CTAN.
1438 % \end{Version}
1439 % \begin{Version}{2006/02/20 v1.2}
1440 % \item
1441 % DTX framework.
1442 % \item
1443 % Compatibility for \xfile{miniltx.tex}.
1444 % \end{Version}
1445 % \begin{Version}{2006/08/26 v1.3}
1446 % \item
1447 % Check for \cs{write18} if available and print a warning
1448 % if the feature is not enabled.
1449 % \end{Version}
1450 % \begin{Version}{2007/04/26 v1.4}
1451 % \item
1452 % Documentation rewritten and extended.
1453 % \end{Version}
1454 % \begin{Version}{2007/10/02 v1.5}
1455 % \item
1456 % New option \xoption{update}: If the converted file exists, it will be only
1457 % converted if it is out of date.
1458 % \item
1459 % Updating the extension list is delegated to package \xpackage{grfext}.
1460 % Fine tuning is done by the new options \xoption{append}, \xoption{prepend}.
1461 % \item
1462 % New option \xoption{outdir} for changing the output directory.
1463 % \item
1464 % New option \xoption{verbose}.
1465 % \item
1466 % \cs{SourceFile} and \cs{OutputFile} introduced.
1467 % \item
1468 % Configuration file support added.
1469 % \end{Version}
1470 % \begin{Version}{2007/11/11 v1.6}
1471 % \item
1472 % Use of package \xpackage{pdftexcmds} for \LuaTeX\ support.
1473 % \end{Version}
1474 % \begin{Version}{2008/05/06 v1.7}
1475 % \item
1476 % Warning messages uses ``loaded'' instead of ``found''.
1477 % \end{Version}
1478 % \begin{Version}{2009/03/01 v1.8}
1479 % \item
1480 % Warning message for missing \xfile{pdftex.def} changed.
1481 % \end{Version}
1482 % \begin{Version}{2009/07/06 v1.9}
1483 % \item
1484 % Option \xoption{suffix} added.
1485 % \end{Version}
1486 % \begin{Version}{2009/07/07 v1.10}
1487 % \item
1488 % \cs{SourceExt} added.
1489 % \item
1490 % If option \xoption{suffix} is set, the inclusion of
1491 % an image without the suffix namespace is preferred over generating the
1492 % the image within the suffix namespace.
1493 % \end{Version}
1494 % \begin{Version}{2009/07/12 v2.0}
1495 % \item
1496 % New default settings.
1497 % \item
1498 % Package is split into \xpackage{epstopdf} that only takes package
1499 % options and loads \xpackage{epstopdf-base} that does the work.
1500 % \item
1501 % \cs{epstopdfDeclareGraphicsRule} and \cs{epstopdfcall} added.
1502 % \item
1503 % \xfile{epstopdf-sys.cfg} is loaded before \xfile{epstopdf.cfg}
1504 % if \xfile{epstopdf-sys.cfg} exists.
1505 % \end{Version}
1506 % \begin{Version}{2009/07/15 v2.1}
1507 % \item
1508 % Default setting: \xoption{verbose} is now turned on as the
1509 % documentation for v2.0 said.
1510 % \item
1511 % Documentation fixes.
1512 % \end{Version}
1513 % \begin{Version}{2009/07/16 v2.2}
1514 % \item
1515 % Fixed redefined \cs{Gin@setfile}.
1516 % \item
1517 % Documentation extended for package options.
1518 % \end{Version}
1519 % \begin{Version}{2009/09/24 v2.3}
1520 % \item
1521 % Bug fix for the case that both option \xoption{suffix} and
1522 % \xoption{outdir} are used.
1523 % \end{Version}
1524 % \begin{Version}{2009/10/17 v2.4}
1525 % \item
1526 % The name of the program `epstopdf' can be configured via
1527 % the new option \xoption{program@epstopdf}.
1528 % \end{Version}
1529 % \begin{Version}{2016/05/15 v2.5}
1530 % \item
1531 % Wording of warning message fixed (Karl Berry).
1532 % \item
1533 % \cs{ETE@Gin@setfile} added (Karl Berry).
1534 % \end{Version}
1535 % \begin{Version}{2016/05/15 v2.6}
1536 % \item
1537 % luaTeX compatibility
1538 % \end{Version}
1539 % \begin{Version}{2019/11/24 v2.7}
1540 % \item
1541 % New epstopdf repository.
1542 % \end{Version}
1543 % \begin{Version}{2019/11/27 v2.8}
1544 % \item
1545 % The base package configured not to require additional
1546 % packages if called with no arguments.
1547 % \item
1548 % Code re-arranged to avoid:
1549 % \verb|\end occurred when \ifx on line 165 was incomplete| warning in dvi mode.
1550 % \end{Version}
1551 % \begin{Version}{2019-11-30 v2.9}
1552 % \item Read the \verb|epstopdf.cfg| file even in the base code is being used.
1553 % \end{Version}
1554 % \begin{Version}{2020-01-24 v2.11}
1555 % \item use \verb|'| not \verb|"| for Lua strings, as the latter not made safe.
1556 % \end{Version}
1557 % \begin{Version}{2020-01-24 v2.11}
1558 % \item Ensure that \verb|\epstopdf@sys@cmd| is defined even if no \texttt{cfg} file is found.
1559 % \end{Version}
1560 % \end{History}
1561 %
1562 % \PrintIndex
1563 %
1564 % \Finale
1565 \endinput