Debian Codegraph @

texmf-dist/source/latex/grfext/grfext.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: grfext.dtx
4 % Version: 2019/12/03 v1.3
5 % Info: Manage graphics extensions
6 %
7 % Copyright (C)
8 % 2007, 2010 Heiko Oberdiek
9 % 2016-2019 Oberdiek Package Support Group
10 % https://github.com/ho-tex/grfext/issues
11 %
12 % This work may be distributed and/or modified under the
13 % conditions of the LaTeX Project Public License, either
14 % version 1.3c of this license or (at your option) any later
15 % version. This version of this license is in
16 % https://www.latex-project.org/lppl/lppl-1-3c.txt
17 % and the latest version of this license is in
18 % https://www.latex-project.org/lppl.txt
19 % and version 1.3 or later is part of all distributions of
20 % LaTeX version 2005/12/01 or later.
21 %
22 % This work has the LPPL maintenance status "maintained".
23 %
24 % The Current Maintainers of this work are
25 % Heiko Oberdiek and the Oberdiek Package Support Group
26 % https://github.com/ho-tex/grfext/issues
27 %
28 % This work consists of the main source file grfext.dtx
29 % and the derived files
30 % grfext.sty, grfext.pdf, grfext.ins, grfext.drv,
31 %
32 % Distribution:
33 % CTAN:macros/latex/contrib/grfext/grfext.dtx
34 % CTAN:macros/latex/contrib/grfext/grfext.pdf
35 %
36 % Unpacking:
37 % (a) If grfext.ins is present:
38 % tex grfext.ins
39 % (b) Without grfext.ins:
40 % tex grfext.dtx
41 % (c) If you insist on using LaTeX
42 % latex \let\install=y\input{grfext.dtx}
43 % (quote the arguments according to the demands of your shell)
44 %
45 % Documentation:
46 % (a) If grfext.drv is present:
47 % latex grfext.drv
48 % (b) Without grfext.drv:
49 % latex grfext.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 grfext.dtx
57 % makeindex -s gind.ist grfext.idx
58 % pdflatex grfext.dtx
59 % makeindex -s gind.ist grfext.idx
60 % pdflatex grfext.dtx
61 %
62 % Installation:
63 % TDS:tex/latex/grfext/grfext.sty
64 % TDS:doc/latex/grfext/grfext.pdf
65 % TDS:source/latex/grfext/grfext.dtx
66 %
67 %<*ignore>
68 \begingroup
69 \catcode123=1 %
70 \catcode125=2 %
71 \def\x{LaTeX2e}%
72 \expandafter\endgroup
73 \ifcase 0\ifx\install y1\fi\expandafter
74 \ifx\csname processbatchFile\endcsname\relax\else1\fi
75 \ifx\fmtname\x\else 1\fi\relax
76 \else\csname fi\endcsname
77 %</ignore>
78 %<*install>
79 \input docstrip.tex
80 \Msg{************************************************************************}
81 \Msg{* Installation}
82 \Msg{* Package: grfext 2019/12/03 v1.3 Manage graphics extensions (HO)}
83 \Msg{************************************************************************}
84
85 \keepsilent
86 \askforoverwritefalse
87
88 \let\MetaPrefix\relax
89 \preamble
90
91 This is a generated file.
92
93 Project: grfext
94 Version: 2019/12/03 v1.3
95
96 Copyright (C)
97 2007, 2010 Heiko Oberdiek
98 2016-2019 Oberdiek Package Support Group
99
100 This work may be distributed and/or modified under the
101 conditions of the LaTeX Project Public License, either
102 version 1.3c of this license or (at your option) any later
103 version. This version of this license is in
104 https://www.latex-project.org/lppl/lppl-1-3c.txt
105 and the latest version of this license is in
106 https://www.latex-project.org/lppl.txt
107 and version 1.3 or later is part of all distributions of
108 LaTeX version 2005/12/01 or later.
109
110 This work has the LPPL maintenance status "maintained".
111
112 The Current Maintainers of this work are
113 Heiko Oberdiek and the Oberdiek Package Support Group
114 https://github.com/ho-tex/grfext/issues
115
116
117 This work consists of the main source file grfext.dtx
118 and the derived files
119 grfext.sty, grfext.pdf, grfext.ins, grfext.drv.
120
121 \endpreamble
122 \let\MetaPrefix\DoubleperCent
123
124 \generate{%
125 \file{grfext.ins}{\from{grfext.dtx}{install}}%
126 \file{grfext.drv}{\from{grfext.dtx}{driver}}%
127 \usedir{tex/latex/grfext}%
128 \file{grfext.sty}{\from{grfext.dtx}{package}}%
129 % \usedir{doc/latex/grfext/test}%
130 % \file{grfext-test1.tex}{\from{grfext.dtx}{test1}}%
131 % \file{grfext-test2.tex}{\from{grfext.dtx}{test2}}%
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{* file into a directory searched by TeX:}
140 \Msg{*}
141 \Msg{* grfext.sty}
142 \Msg{*}
143 \Msg{* To produce the documentation run the file `grfext.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{grfext.drv}%
158 [2019/12/03 v1.3 Manage graphics extensions (HO)]%
159 \documentclass{ltxdoc}
160 \usepackage{holtxdoc}[2011/11/22]
161 \begin{document}
162 \DocInput{grfext.dtx}%
163 \end{document}
164 %</driver>
165 % \fi
166 %
167 %
168 %
169 % \GetFileInfo{grfext.drv}
170 %
171 % \title{The \xpackage{grfext} package}
172 % \date{2019/12/03 v1.3}
173 % \author{Heiko Oberdiek\thanks
174 % {Please report any issues at \url{https://github.com/ho-tex/grfext/issues}}}
175 %
176 % \maketitle
177 %
178 % \begin{abstract}
179 % This package provides macros for adding and reordering
180 % graphics extensions of package \xpackage{graphics}.
181 % \end{abstract}
182 %
183 % \tableofcontents
184 %
185 % \section{Documentation}
186 %
187 % \subsection{Introduction}
188 %
189 % If you are not familiar with \LaTeX's graphics bundle, please
190 % read its documentation \xfile{grffile} \cite{graphics}.
191 % The bundle contains two packages for graphics inclusion:
192 % \xpackage{graphics} and \xpackage{graphicx}. The first one
193 % is loaded by the second one that adds a key value interface.
194 %
195 % Graphics files are included in both cases by macro
196 % \cs{includegraphics}. The file name extension can be omitted.
197 % Then the graphics package goes through a list of known
198 % extensions until it finds the graphics file. This extension list
199 % is set by \cs{DeclareGraphicsExtensions}. The previous contents
200 % of the list is overwritten.
201 %
202 % \subsection{User interface}
203 %
204 % This package \xpackage{grfext} provides macros that adds entries
205 % to the list or remove them. The list may be empty or even
206 % undefined before. It is always defined afterwards, but can
207 % be empty (especially after removing entries).
208 %
209 % \begin{declcs}{AppendGraphicsExtensions} * \M{ext-list}\\
210 % \cs{PrependGraphicsExtensions} * \M{ext-list}
211 % \end{declcs}
212 % The argument \meta{ext-list} is a comma separated list whose
213 % entries are file name extensions including the dot.
214 % But first the entries are removed from
215 % \xpackage{graphics}' extension list to avoid multiple
216 % occurences of the same extension.
217 %
218 % Then macro \cs{AppendGraphicsExtensions} adds the entries
219 % after the end of \xpackage{graphics}' list, whereas
220 % macro \cs{PrependGraphicsExtensions} puts them in front
221 % of the list.
222 % The order matters if a graphics file is available in
223 % different acceptable formats. Then the first extension
224 % wins.
225 %
226 % The star version of these commands only adds an extensions,
227 % if a specific graphics rule exists for that extension.
228 %
229 % \begin{declcs}{RemoveGraphicsExtensions} \M{ext-list}
230 % \end{declcs}
231 % All occurences of file extensions in \meta{ext-list} are
232 % removed from \xpackage{graphics}' extension list.
233 %
234 % \subsection{Package loading}
235 %
236 % The package does not define any options. It is loaded
237 % as usual in \LaTeX, e.g.:
238 % \begin{quote}
239 % |\usepackage{grfext}|
240 % \end{quote}
241 %
242 % \begin{declcs}{PrintGraphicsExtensions}
243 % \end{declcs}
244 % Macro \cs{PrintGraphicsExtensions} writes the current
245 % graphics extensions list in the \xfile{.log} file.
246 % The macros described before do this automatically
247 % after their operation.
248 %
249 % \subsection{Option support for package \xpackage{graphicx}}
250 %
251 % Package \xpackage{graphicx} uses the interface of package
252 % \xpackage{keyval} in order to specify options for
253 % \cs{includegraphics}. The options can also be set using
254 % \begin{quote}
255 % |\setkeys{Gin}{|\meta{options}|}|
256 % \end{quote}
257 % The four user macros with the two star forms are available
258 % as options in family |Gin| as well:
259 % \begin{quote}
260 % |AppendGraphicsExtensions={|\meta{ext-list}|}|\\
261 % |AppendGraphicsExtensions*={|\meta{ext-list}|}|\\
262 % |PrependGraphicsExtensions={|\meta{ext-list}|}|\\
263 % |PrependGraphicsExtensions*{|\meta{ext-list}|}|\\
264 % |RemoveGraphicsExtensions={|\meta{ext-list}|}|\\
265 % |PrintGraphicsExtensions|
266 % \end{quote}
267 % This makes it easier to locally change the extension list
268 % for an included graphics, e.g.:
269 % \begin{quote}
270 % |\includegraphics[RemoveGraphicsExtensions={.pdf,PDF}]{image}|
271 % \end{quote}
272 %
273 % \subsection{\plainTeX}
274 %
275 % \LaTeX's graphics packages can also be used with \plainTeX.
276 % The necessary basic \LaTeX\ macros are defined in
277 % \xfile{miniltx.tex}. This package \xpackage{grfext} also
278 % relies on it. Example:
279 %\begin{quote}
280 %\begin{verbatim}
281 %\input miniltx.tex\relax
282 %\def\Gin@driver{pdftex.def}
283 %\input graphicx.sty\relax
284 %\input grfext.sty\relax
285 %\resetatcatcode
286 %\end{verbatim}
287 %\end{quote}
288 %
289 % \StopEventually{
290 % }
291 %
292 % \section{Implementation}
293 %
294 % \begin{macrocode}
295 %<*package>
296 % \end{macrocode}
297 %
298 % \subsection{Relead check and identification}
299 % Reload check, especially if the package is not used with \LaTeX.
300 % \begin{macrocode}
301 \begingroup\catcode61\catcode48\catcode32=10\relax%
302 \catcode13=5 % ^^M
303 \endlinechar=13 %
304 \catcode35=6 % #
305 \catcode39=12 % '
306 \catcode44=12 % ,
307 \catcode45=12 % -
308 \catcode46=12 % .
309 \catcode58=12 % :
310 \catcode64=11 % @
311 \catcode123=1 % {
312 \catcode125=2 % }
313 \expandafter\let\expandafter\x\csname [email protected]\endcsname
314 \ifx\x\relax % plain-TeX, first loading
315 \else
316 \def\empty{}%
317 \ifx\x\empty % LaTeX, first loading,
318 % variable is initialized, but \ProvidesPackage not yet seen
319 \else
320 \expandafter\ifx\csname PackageInfo\endcsname\relax
321 \def\x#1#2{%
322 \immediate\write-1{Package #1 Info: #2.}%
323 }%
324 \else
325 \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
326 \fi
327 \x{grfext}{The package is already loaded}%
328 \aftergroup\endinput
329 \fi
330 \fi
331 \endgroup%
332 % \end{macrocode}
333 % Package identification:
334 % \begin{macrocode}
335 \begingroup\catcode61\catcode48\catcode32=10\relax%
336 \catcode13=5 % ^^M
337 \endlinechar=13 %
338 \catcode35=6 % #
339 \catcode39=12 % '
340 \catcode40=12 % (
341 \catcode41=12 % )
342 \catcode44=12 % ,
343 \catcode45=12 % -
344 \catcode46=12 % .
345 \catcode47=12 % /
346 \catcode58=12 % :
347 \catcode64=11 % @
348 \catcode91=12 % [
349 \catcode93=12 % ]
350 \catcode123=1 % {
351 \catcode125=2 % }
352 \expandafter\ifx\csname ProvidesPackage\endcsname\relax
353 \def\x#1#2#3[#4]{\endgroup
354 \immediate\write-1{Package: #3 #4}%
355 \xdef#1{#4}%
356 }%
357 \else
358 \def\x#1#2[#3]{\endgroup
359 #2[{#3}]%
360 \ifx#1\@undefined
361 \xdef#1{#3}%
362 \fi
363 \ifx#1\relax
364 \xdef#1{#3}%
365 \fi
366 }%
367 \fi
368 \expandafter\x\csname [email protected]\endcsname
369 \ProvidesPackage{grfext}%
370 [2019/12/03 v1.3 Manage graphics extensions (HO)]%
371 % \end{macrocode}
372 %
373 % \subsection{Catcodes}
374 %
375 % \begin{macrocode}
376 \begingroup\catcode61\catcode48\catcode32=10\relax%
377 \catcode13=5 % ^^M
378 \endlinechar=13 %
379 \catcode123=1 % {
380 \catcode125=2 % }
381 \catcode64=11 % @
382 \def\x{\endgroup
383 \expandafter\edef\csname grfext@AtEnd\endcsname{%
384 \endlinechar=\the\endlinechar\relax
385 \catcode13=\the\catcode13\relax
386 \catcode32=\the\catcode32\relax
387 \catcode35=\the\catcode35\relax
388 \catcode61=\the\catcode61\relax
389 \catcode64=\the\catcode64\relax
390 \catcode123=\the\catcode123\relax
391 \catcode125=\the\catcode125\relax
392 }%
393 }%
394 \x\catcode61\catcode48\catcode32=10\relax%
395 \catcode13=5 % ^^M
396 \endlinechar=13 %
397 \catcode35=6 % #
398 \catcode64=11 % @
399 \catcode123=1 % {
400 \catcode125=2 % }
401 \def\TMP@EnsureCode#1#2{%
402 \edef\grfext@AtEnd{%
403 \grfext@AtEnd
404 \catcode#1=\the\catcode#1\relax
405 }%
406 \catcode#1=#2\relax
407 }
408 \TMP@EnsureCode{42}{12}% *
409 \TMP@EnsureCode{44}{12}% ,
410 \TMP@EnsureCode{47}{12}% /
411 \TMP@EnsureCode{58}{12}% :
412 \TMP@EnsureCode{60}{12}% <
413 \TMP@EnsureCode{62}{12}% >
414 \TMP@EnsureCode{91}{12}% [
415 \TMP@EnsureCode{93}{12}% ]
416 \edef\grfext@AtEnd{\grfext@AtEnd\noexpand\endinput}
417 % \end{macrocode}
418 %
419 % \subsection{\plainTeX}
420 %
421 % \begin{macro}{\@expandtwoargs}
422 % Requirement is \xfile{miniltx.tex}, but we need also
423 % \LaTeX's \cs{@expandtwoargs}.
424 % \begin{macrocode}
425 \@ifundefined{@expandtwoargs}{%
426 \def\@expandtwoargs#1#2#3{%
427 \edef\reserved@a{\noexpand#1{#2}{#3}}%
428 \reserved@a
429 }%
430 }{}
431 % \end{macrocode}
432 % \end{macro}
433 %
434 % \subsection{Add}
435 %
436 % \begin{macro}{\AppendGraphicsExtensions}
437 % \begin{macrocode}
438 \newcommand*{\AppendGraphicsExtensions}{%
439 \@ifundefined{Gin@extensions}{%
440 \let\Gin@extensions\@empty
441 }{}%
442 \@ifstar{\grfext@Append\grfext@Check}{\grfext@Append\grfext@@Add}%
443 }%
444 % \end{macrocode}
445 % \end{macro}
446 % \begin{macro}{\grfext@Append}
447 % \begin{macrocode}
448 \def\grfext@Append#1#2{%
449 \let\grfext@Print\@gobble
450 \edef\grfext@next{%
451 \noexpand\grfext@Add\noexpand#1{%
452 \zap@space#2 \@empty
453 }{\noexpand\Gin@extensions,}{}%
454 }%
455 \grfext@next
456 \let\grfext@Print\grfext@@Print
457 \grfext@Print\AppendGraphicsExtensions
458 }
459 % \end{macrocode}
460 % \end{macro}
461 %
462 % \begin{macro}{\PrependGraphicsExtensions}
463 % \begin{macrocode}
464 \newcommand*{\PrependGraphicsExtensions}{%
465 \@ifundefined{Gin@extensions}{%
466 \let\Gin@extensions\@empty
467 }{}%
468 \@ifstar{\grfext@Prepend\grfext@Check}{\grfext@Prepend\grfext@@Add}%
469 }%
470 % \end{macrocode}
471 % \end{macro}
472 % \begin{macro}{\grfext@Prepend}
473 % \begin{macrocode}
474 \def\grfext@Prepend#1#2{%
475 \let\grfext@Print\@gobble
476 \edef\grfext@next{%
477 \noexpand\grfext@Add\noexpand#1{%
478 \zap@space#2 \@empty
479 }{}{,\noexpand\Gin@extensions}%
480 }%
481 \grfext@next
482 \let\grfext@Print\grfext@@Print
483 \grfext@Print\PrependGraphicsExtensions
484 }
485 % \end{macrocode}
486 % \end{macro}
487 %
488 % \begin{macro}{\grfext@Add}
489 % \begin{macrocode}
490 \def\grfext@Add#1#2{%
491 #1{#2}%
492 }
493 % \end{macrocode}
494 % \end{macro}
495 % \begin{macro}{\grfext@@Add}
496 % \begin{macrocode}
497 \def\grfext@@Add#1#2#3{%
498 \RemoveGraphicsExtensions{#1}%
499 \ifx\Gin@extensions\@empty
500 \def\Gin@extensions{#1}%
501 \else
502 \edef\Gin@extensions{#2#1#3}%
503 \fi
504 }
505 % \end{macrocode}
506 % \end{macro}
507 %
508 % \subsection{Check}
509 %
510 % \begin{macro}{\grfext@Check}
511 % \begin{macrocode}
512 \def\grfext@Check#1{%
513 \let\grfext@tmp\@empty
514 \@for\grfext@ext:=#1\do{%
515 \@ifundefined{Gin@rule@\grfext@ext}{%
516 }{%
517 \ifx\grfext@tmp\@empty
518 \let\grfext@tmp\grfext@ext
519 \else
520 \edef\grfext@tmp{\grfext@tmp,\grfext@ext}%
521 \fi
522 }%
523 }%
524 \ifx\grfext@tmp\@empty
525 \def\grfext@next##1##2{}%
526 \else
527 \edef\grfext@next{%
528 \noexpand\grfext@@Add{\grfext@tmp}%
529 }%
530 \fi
531 \grfext@next
532 }
533 % \end{macrocode}
534 % \end{macro}
535 %
536 % \subsection{Remove}
537 %
538 % \begin{macro}{\RemoveGraphicsExtensions}
539 % \begin{macrocode}
540 \newcommand*{\RemoveGraphicsExtensions}[1]{%
541 \@ifundefined{Gin@extensions}{%
542 \def\Gin@extensions{}%
543 }{%
544 \edef\grfext@tmp{\zap@space#1 \@empty}%
545 \@for\grfext@ext:=\grfext@tmp\do{%
546 \def\grfext@next{%
547 \let\grfext@tmp\Gin@extensions
548 \@expandtwoargs
549 \@removeelement\grfext@ext\Gin@extensions\Gin@extensions
550 \ifx\grfext@tmp\Gin@extensions
551 \let\grfext@next\relax
552 \fi
553 \grfext@next
554 }%
555 \grfext@next
556 }%
557 }%
558 \grfext@Print\RemoveGraphicsExtensions
559 }
560 % \end{macrocode}
561 % \end{macro}
562 %
563 % \subsection{Print}
564 %
565 % \begin{macrocode}
566 \RequirePackage{infwarerr}[2007/09/09]
567 % \end{macrocode}
568 %
569 % \begin{macro}{\PrintGraphicsExtensions}
570 % \begin{macrocode}
571 \def\PrintGraphicsExtensions{%
572 \grfext@Print\PrintGraphicsExtensions
573 }
574 % \end{macrocode}
575 % \end{macro}
576 % \begin{macro}{\grfext@Print}
577 % \begin{macrocode}
578 \def\grfext@Print#1{%
579 \@PackageInfo{grfext}{%
580 Graphics extension search list:\MessageBreak
581 \@ifundefined{Gin@extensions}{%
582 <unavailable>%
583 }{%
584 [\Gin@extensions]%
585 }\MessageBreak
586 \string#1%
587 }%
588 }
589 % \end{macrocode}
590 % \end{macro}
591 % \begin{macro}{\grfext@@Print}
592 % \begin{macrocode}
593 \let\grfext@@Print\grfext@Print
594 % \end{macrocode}
595 % \end{macro}
596 %
597 % \subsection{Defining options for package \xpackage{graphicx}}
598 %
599 % \begin{macrocode}
600 \RequirePackage{kvdefinekeys}[2010/03/01]
601 \kv@define@key{Gin}{AppendGraphicsExtensions}{%
602 \AppendGraphicsExtensions{#1}%
603 }
604 \kv@define@key{Gin}{AppendGraphicsExtensions*}{%
605 \AppendGraphicsExtensions*{#1}%
606 }
607 \kv@define@key{Gin}{PrependGraphicsExtensions}{%
608 \PrependGraphicsExtensions{#1}%
609 }
610 \kv@define@key{Gin}{PrependGraphicsExtensions*}{%
611 \PrependGraphicsExtensions*{#1}%
612 }
613 \kv@define@key{Gin}{RemoveGraphicsExtensions}{%
614 \RemoveGraphicsExtensions{#1}%
615 }
616 \kv@define@key{Gin}{PrintGraphicsExtensions}[]{%
617 \PrintGraphicsExtensions
618 }
619 % \end{macrocode}
620 %
621 % \begin{macrocode}
622 \grfext@AtEnd%
623 %</package>
624 % \end{macrocode}
625 % \section{Installation}
626 %
627 % \subsection{Download}
628 %
629 % \paragraph{Package.} This package is available on
630 % CTAN\footnote{\CTANpkg{grfext}}:
631 % \begin{description}
632 % \item[\CTAN{macros/latex/contrib/grfext/grfext.dtx}] The source file.
633 % \item[\CTAN{macros/latex/contrib/grfext/grfext.pdf}] Documentation.
634 % \end{description}
635 %
636 %
637 % \paragraph{Bundle.} All the packages of the bundle `grfext'
638 % are also available in a TDS compliant ZIP archive. There
639 % the packages are already unpacked and the documentation files
640 % are generated. The files and directories obey the TDS standard.
641 % \begin{description}
642 % \item[\CTANinstall{install/macros/latex/contrib/grfext.tds.zip}]
643 % \end{description}
644 % \emph{TDS} refers to the standard ``A Directory Structure
645 % for \TeX\ Files'' (\CTANpkg{tds}). Directories
646 % with \xfile{texmf} in their name are usually organized this way.
647 %
648 % \subsection{Bundle installation}
649 %
650 % \paragraph{Unpacking.} Unpack the \xfile{grfext.tds.zip} in the
651 % TDS tree (also known as \xfile{texmf} tree) of your choice.
652 % Example (linux):
653 % \begin{quote}
654 % |unzip grfext.tds.zip -d ~/texmf|
655 % \end{quote}
656 %
657 % \subsection{Package installation}
658 %
659 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
660 % \docstrip\ archive. The files are extracted by running the
661 % \xfile{.dtx} through \plainTeX:
662 % \begin{quote}
663 % \verb|tex grfext.dtx|
664 % \end{quote}
665 %
666 % \paragraph{TDS.} Now the different files must be moved into
667 % the different directories in your installation TDS tree
668 % (also known as \xfile{texmf} tree):
669 % \begin{quote}
670 % \def\t{^^A
671 % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
672 % grfext.sty & tex/latex/grfext/grfext.sty\\
673 % grfext.pdf & doc/latex/grfext/grfext.pdf\\
674 % grfext.dtx & source/latex/grfext/grfext.dtx\\
675 % \end{tabular}^^A
676 % }^^A
677 % \sbox0{\t}^^A
678 % \ifdim\wd0>\linewidth
679 % \begingroup
680 % \advance\linewidth by\leftmargin
681 % \advance\linewidth by\rightmargin
682 % \edef\x{\endgroup
683 % \def\noexpand\lw{\the\linewidth}^^A
684 % }\x
685 % \def\lwbox{^^A
686 % \leavevmode
687 % \hbox to \linewidth{^^A
688 % \kern-\leftmargin\relax
689 % \hss
690 % \usebox0
691 % \hss
692 % \kern-\rightmargin\relax
693 % }^^A
694 % }^^A
695 % \ifdim\wd0>\lw
696 % \sbox0{\small\t}^^A
697 % \ifdim\wd0>\linewidth
698 % \ifdim\wd0>\lw
699 % \sbox0{\footnotesize\t}^^A
700 % \ifdim\wd0>\linewidth
701 % \ifdim\wd0>\lw
702 % \sbox0{\scriptsize\t}^^A
703 % \ifdim\wd0>\linewidth
704 % \ifdim\wd0>\lw
705 % \sbox0{\tiny\t}^^A
706 % \ifdim\wd0>\linewidth
707 % \lwbox
708 % \else
709 % \usebox0
710 % \fi
711 % \else
712 % \lwbox
713 % \fi
714 % \else
715 % \usebox0
716 % \fi
717 % \else
718 % \lwbox
719 % \fi
720 % \else
721 % \usebox0
722 % \fi
723 % \else
724 % \lwbox
725 % \fi
726 % \else
727 % \usebox0
728 % \fi
729 % \else
730 % \lwbox
731 % \fi
732 % \else
733 % \usebox0
734 % \fi
735 % \end{quote}
736 % If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
737 % TDS installing feature, then some files can already be in the right
738 % place, see the documentation of \docstrip.
739 %
740 % \subsection{Refresh file name databases}
741 %
742 % If your \TeX~distribution
743 % (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
744 % these. For example, \TeX\,Live\ users run \verb|texhash| or
745 % \verb|mktexlsr|.
746 %
747 % \subsection{Some details for the interested}
748 %
749 % \paragraph{Unpacking with \LaTeX.}
750 % The \xfile{.dtx} chooses its action depending on the format:
751 % \begin{description}
752 % \item[\plainTeX:] Run \docstrip\ and extract the files.
753 % \item[\LaTeX:] Generate the documentation.
754 % \end{description}
755 % If you insist on using \LaTeX\ for \docstrip\ (really,
756 % \docstrip\ does not need \LaTeX), then inform the autodetect routine
757 % about your intention:
758 % \begin{quote}
759 % \verb|latex \let\install=y\input{grfext.dtx}|
760 % \end{quote}
761 % Do not forget to quote the argument according to the demands
762 % of your shell.
763 %
764 % \paragraph{Generating the documentation.}
765 % You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
766 % the documentation. The process can be configured by the
767 % configuration file \xfile{ltxdoc.cfg}. For instance, put this
768 % line into this file, if you want to have A4 as paper format:
769 % \begin{quote}
770 % \verb|\PassOptionsToClass{a4paper}{article}|
771 % \end{quote}
772 % An example follows how to generate the
773 % documentation with pdf\LaTeX:
774 % \begin{quote}
775 %\begin{verbatim}
776 %pdflatex grfext.dtx
777 %makeindex -s gind.ist grfext.idx
778 %pdflatex grfext.dtx
779 %makeindex -s gind.ist grfext.idx
780 %pdflatex grfext.dtx
781 %\end{verbatim}
782 % \end{quote}
783 %
784 % \begin{thebibliography}{9}
785 %
786 % \bibitem{graphics}
787 % David Carlisle, Sebastian Rahtz: \textit{The \xpackage{graphics} package};
788 % 2006/02/20 v1.0o;
789 % \CTAN{macros/latex/required/graphics/graphics.dtx}.
790 %
791 % \end{thebibliography}
792 %
793 % \begin{History}
794 % \begin{Version}{2007/09/30 v1.0}
795 % \item
796 % First public version.
797 % \end{Version}
798 % \begin{Version}{2010/08/19 v1.1}
799 % \item
800 % User macros are also made available as keyval options for
801 % package \xpackage{graphicx}.
802 % \end{Version}
803 % \begin{Version}{2016/05/16 v1.2}
804 % \item
805 % Documentation updates.
806 % \end{Version}
807 % \begin{Version}{2019/12/03 v1.3}
808 % \item
809 % Documentation updates.
810 % \end{Version}
811 % \end{History}
812 %
813 % \PrintIndex
814 %
815 % \Finale
816 \endinput