Debian Codegraph @

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

raw
1 % \iffalse meta-comment
2 %
3 % File: pdfcol.dtx
4 % Version: 2022-09-21 v1.7
5 % Info: Handle new color stacks for pdfTeX
6 %
7 % Copyright (C)
8 % 2007 Heiko Oberdiek
9 % 2016-2022 Oberdiek Package Support Group
10 % https://github.com/ho-tex/pdfcol/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/pdfcol/issues
27 %
28 % The Base Interpreter refers to any `TeX-Format',
29 % because some files are installed in TDS:tex/generic//.
30 %
31 % This work consists of the main source file pdfcol.dtx
32 % and the derived files
33 % pdfcol.sty, pdfcol.pdf, pdfcol.ins, pdfcol.drv, pdfcol-test1.tex,
34 % pdfcol-test2.tex, pdfcol-test3.tex, pdfcol-test4.tex.
35 %
36 % Distribution:
37 % CTAN:macros/latex/contrib/pdfcol/pdfcol.dtx
38 % CTAN:macros/latex/contrib/pdfcol/pdfcol.pdf
39 %
40 % Unpacking:
41 % (a) If pdfcol.ins is present:
42 % tex pdfcol.ins
43 % (b) Without pdfcol.ins:
44 % tex pdfcol.dtx
45 % (c) If you insist on using LaTeX
46 % latex \let\install=y\input{pdfcol.dtx}
47 % (quote the arguments according to the demands of your shell)
48 %
49 % Documentation:
50 % (a) If pdfcol.drv is present:
51 % latex pdfcol.drv
52 % (b) Without pdfcol.drv:
53 % latex pdfcol.dtx; ...
54 % The class ltxdoc loads the configuration file ltxdoc.cfg
55 % if available. Here you can specify further options, e.g.
56 % use A4 as paper format:
57 % \PassOptionsToClass{a4paper}{article}
58 %
59 % Programm calls to get the documentation (example):
60 % pdflatex pdfcol.dtx
61 % makeindex -s gind.ist pdfcol.idx
62 % pdflatex pdfcol.dtx
63 % makeindex -s gind.ist pdfcol.idx
64 % pdflatex pdfcol.dtx
65 %
66 % Installation:
67 % TDS:tex/generic/pdfcol/pdfcol.sty
68 % TDS:doc/latex/pdfcol/pdfcol.pdf
69 % TDS:source/latex/pdfcol/pdfcol.dtx
70 %
71 %<*ignore>
72 \begingroup
73 \catcode123=1 %
74 \catcode125=2 %
75 \def\x{LaTeX2e}%
76 \expandafter\endgroup
77 \ifcase 0\ifx\install y1\fi\expandafter
78 \ifx\csname processbatchFile\endcsname\relax\else1\fi
79 \ifx\fmtname\x\else 1\fi\relax
80 \else\csname fi\endcsname
81 %</ignore>
82 %<*install>
83 \input docstrip.tex
84 \Msg{************************************************************************}
85 \Msg{* Installation}
86 \Msg{* Package: pdfcol 2022-09-21 v1.7 Handle new color stacks for pdfTeX (HO)}
87 \Msg{************************************************************************}
88
89 \keepsilent
90 \askforoverwritefalse
91
92 \let\MetaPrefix\relax
93 \preamble
94
95 This is a generated file.
96
97 Project: pdfcol
98 Version: 2022-09-21 v1.7
99
100 Copyright (C)
101 2007 Heiko Oberdiek
102 2016-2022 Oberdiek Package Support Group
103
104 This work may be distributed and/or modified under the
105 conditions of the LaTeX Project Public License, either
106 version 1.3c of this license or (at your option) any later
107 version. This version of this license is in
108 https://www.latex-project.org/lppl/lppl-1-3c.txt
109 and the latest version of this license is in
110 https://www.latex-project.org/lppl.txt
111 and version 1.3 or later is part of all distributions of
112 LaTeX version 2005/12/01 or later.
113
114 This work has the LPPL maintenance status "maintained".
115
116 The Current Maintainers of this work are
117 Heiko Oberdiek and the Oberdiek Package Support Group
118 https://github.com/ho-tex/pdfcol/issues
119
120
121 The Base Interpreter refers to any `TeX-Format',
122 because some files are installed in TDS:tex/generic//.
123
124 This work consists of the main source file pdfcol.dtx
125 and the derived files
126 pdfcol.sty, pdfcol.pdf, pdfcol.ins, pdfcol.drv, pdfcol-test1.tex,
127 pdfcol-test2.tex, pdfcol-test3.tex, pdfcol-test4.tex.
128
129 \endpreamble
130 \let\MetaPrefix\DoubleperCent
131
132 \generate{%
133 \file{pdfcol.ins}{\from{pdfcol.dtx}{install}}%
134 \file{pdfcol.drv}{\from{pdfcol.dtx}{driver}}%
135 \usedir{tex/generic/pdfcol}%
136 \file{pdfcol.sty}{\from{pdfcol.dtx}{package}}%
137 % \usedir{doc/latex/pdfcol/test}%
138 % \file{pdfcol-test1.tex}{\from{pdfcol.dtx}{test1}}%
139 % \file{pdfcol-test2.tex}{\from{pdfcol.dtx}{test2}}%
140 % \file{pdfcol-test3.tex}{\from{pdfcol.dtx}{test3}}%
141 % \file{pdfcol-test4.tex}{\from{pdfcol.dtx}{test4}}%
142 }
143
144 \catcode32=13\relax% active space
145 \let =\space%
146 \Msg{************************************************************************}
147 \Msg{*}
148 \Msg{* To finish the installation you have to move the following}
149 \Msg{* file into a directory searched by TeX:}
150 \Msg{*}
151 \Msg{* pdfcol.sty}
152 \Msg{*}
153 \Msg{* To produce the documentation run the file `pdfcol.drv'}
154 \Msg{* through LaTeX.}
155 \Msg{*}
156 \Msg{* Happy TeXing!}
157 \Msg{*}
158 \Msg{************************************************************************}
159
160 \endbatchfile
161 %</install>
162 %<*ignore>
163 \fi
164 %</ignore>
165 %<*driver>
166 \NeedsTeXFormat{LaTeX2e}
167 \ProvidesFile{pdfcol.drv}%
168 [2022-09-21 v1.7 Handle new color stacks for pdfTeX (HO)]%
169 \documentclass{ltxdoc}
170 \usepackage{holtxdoc}[2011/11/22]
171 \begin{document}
172 \DocInput{pdfcol.dtx}%
173 \end{document}
174 %</driver>
175 % \fi
176 %
177 %
178 %
179 % \GetFileInfo{pdfcol.drv}
180 %
181 % \title{The \xpackage{pdfcol} package}
182 % \date{2022-09-21 v1.7}
183 % \author{Heiko Oberdiek\thanks
184 % {Please report any issues at \url{https://github.com/ho-tex/pdfcol/issues}}}
185 %
186 % \maketitle
187 %
188 % \begin{abstract}
189 % Since version 1.40 \pdfTeX\ supports color stacks.
190 % The driver file \xfile{pdftex.def} for package \xpackage{color}
191 % defines and uses a main color stack since version v0.04b.
192 % Package \xpackage{pdfcol} is intended for package writers.
193 % It defines macros for setting and maintaining new color stacks.
194 % It works also with lua\TeX.
195 % \end{abstract}
196 %
197 % \tableofcontents
198 %
199 % \section{Documentation}
200 %
201 % Version 1.40 of \pdfTeX\ adds new primitives \cs{pdfcolorstackinit}
202 % and \cs{pdfcolorstack}. Now color stacks can be defined and used.
203 % A main color stack is maintained by the driver file \xfile{pdftex.def}
204 % similar to dvips or dvipdfm. However the number of color stacks
205 % is not limited to one in \pdfTeX. Thus further color problems
206 % can now be solved, such as footnotes across pages or text
207 % that is set in parallel columns (e.g. packages \xpackage{parallel}
208 % or \xpackage{parcolumn}). Unlike the main color stack,
209 % the support by additional color stacks cannot be done in
210 % a transparent manner.
211 %
212 % This package \xpackage{pdfcol} provides an easier interface to
213 % additional color stacks without the need to use the
214 % low level primitives.
215 %
216 % \subsection{Requirements}
217 % \label{sec:req}
218 %
219 % \begin{itemize}
220 % \item
221 % \pdfTeX\ 1.40 or greater or lua\TeX.
222 % \item
223 % \pdfTeX or lua\TeX\ in PDF mode. (I don't know a DVI driver that
224 % support several color stacks.)
225 % \item
226 % \xfile{pdftex.def} or \xfile{luatex.def} newer than 2007.
227 % \end{itemize}
228 % Package \xpackage{pdfcol} checks the requirements and
229 % sets switch \cs{ifpdfcolAvailable} accordingly.
230 %
231 % \subsection{Interface}
232 %
233 % \begin{declcs}{ifpdfcolAvailable}
234 % \end{declcs}
235 % If the requirements of section \ref{sec:req} are met the
236 % switch \cs{ifpdfcolAvailable} behaves as \cs{iftrue}.
237 % Otherwise the other interface macros in this section will
238 % be disabled with a message. Also the first use of such a
239 % macro will print a message. The messages are print to
240 % the \xext{log} file only if \pdfTeX\ and lua\TeX\ not used in PDF mode.
241 %
242 % \begin{declcs}{pdfcolErrorNoStacks}
243 % \end{declcs}
244 % The first call of \cs{pdfcolErrorNoStacks} prints an error
245 % message, if color stacks are not available.
246 %
247 % \begin{declcs}{pdfcolInitStack} \M{name}
248 % \end{declcs}
249 % A new color stack is initialized by \cs{pdfcolInitStack}.
250 % The \meta{name} is used for identifying the stack. It usually
251 % consists of letters and digits. (The name must survive a \cs{csname}.)
252 %
253 % The intension of the macro is the definition of an additional
254 % color stack. Thus the stack is not page bounded like the
255 % main color stack. Black (\texttt{0 g 0 G}) is used as initial
256 % color value. And colors are written with modifier \texttt{direct}
257 % that means without setting the current transfer matrix and changing
258 % the current point (see documentation of \pdfTeX\ for
259 % |\pdfliteral direct{...}|).
260 %
261 % \begin{declcs}{pdfcolIfStackExists} \M{name} \M{then} \M{else}
262 % \end{declcs}
263 % Macro \cs{pdfcolIfStackExists} checks whether color stack \meta{name}
264 % exists. In case of success argument \meta{then} is executed
265 % and \meta{else} otherwise.
266 %
267 % \begin{declcs}{pdfcolSwitchStack} \M{name}
268 % \end{declcs}
269 % Macro \cs{pdfcolSwitchStack} switches the color stack. The color macros
270 % of package \xpackage{color} (or \xpackage{xcolor}) now uses the
271 % new color stack with name \meta{name}.
272 %
273 % \begin{declcs}{pdfcolSetCurrentColor}
274 % \end{declcs}
275 % Macro \cs{pdfcolSetCurrentColor} replaces the topmost
276 % entry of the stack by the current color (\cs{current@color}).
277 %
278 % \begin{declcs}{pdfcolSetCurrent} \M{name}
279 % \end{declcs}
280 % Macro \cs{pdfcolSetCurrent} sets the color that is read in
281 % the top-most entry of color stack \meta{name}. If \meta{name}
282 % is empty, the default color stack is used.
283 %
284 % \StopEventually{
285 % }
286 %
287 % \section{Implementation}
288 %
289 % \begin{macrocode}
290 %<*package>
291 % \end{macrocode}
292 %
293 % \subsection{Reload check and package identification}
294 % Reload check, especially if the package is not used with \LaTeX.
295 % \begin{macrocode}
296 \begingroup\catcode61\catcode48\catcode32=10\relax%
297 \catcode13=5 % ^^M
298 \endlinechar=13 %
299 \catcode35=6 % #
300 \catcode39=12 % '
301 \catcode44=12 % ,
302 \catcode45=12 % -
303 \catcode46=12 % .
304 \catcode58=12 % :
305 \catcode64=11 % @
306 \catcode123=1 % {
307 \catcode125=2 % }
308 \expandafter\let\expandafter\x\csname [email protected]\endcsname
309 \ifx\x\relax % plain-TeX, first loading
310 \else
311 \def\empty{}%
312 \ifx\x\empty % LaTeX, first loading,
313 % variable is initialized, but \ProvidesPackage not yet seen
314 \else
315 \expandafter\ifx\csname PackageInfo\endcsname\relax
316 \def\x#1#2{%
317 \immediate\write-1{Package #1 Info: #2.}%
318 }%
319 \else
320 \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
321 \fi
322 \x{pdfcol}{The package is already loaded}%
323 \aftergroup\endinput
324 \fi
325 \fi
326 \endgroup%
327 % \end{macrocode}
328 % Package identification:
329 % \begin{macrocode}
330 \begingroup\catcode61\catcode48\catcode32=10\relax%
331 \catcode13=5 % ^^M
332 \endlinechar=13 %
333 \catcode35=6 % #
334 \catcode39=12 % '
335 \catcode40=12 % (
336 \catcode41=12 % )
337 \catcode44=12 % ,
338 \catcode45=12 % -
339 \catcode46=12 % .
340 \catcode47=12 % /
341 \catcode58=12 % :
342 \catcode64=11 % @
343 \catcode91=12 % [
344 \catcode93=12 % ]
345 \catcode123=1 % {
346 \catcode125=2 % }
347 \expandafter\ifx\csname ProvidesPackage\endcsname\relax
348 \def\x#1#2#3[#4]{\endgroup
349 \immediate\write-1{Package: #3 #4}%
350 \xdef#1{#4}%
351 }%
352 \else
353 \def\x#1#2[#3]{\endgroup
354 #2[{#3}]%
355 \ifx#1\@undefined
356 \xdef#1{#3}%
357 \fi
358 \ifx#1\relax
359 \xdef#1{#3}%
360 \fi
361 }%
362 \fi
363 \expandafter\x\csname [email protected]\endcsname
364 \ProvidesPackage{pdfcol}%
365 [2022-09-21 v1.7 Handle new color stacks for pdfTeX (HO)]%
366 % \end{macrocode}
367 %
368 % \subsection{Catcodes}
369 %
370 % \begin{macrocode}
371 \begingroup\catcode61\catcode48\catcode32=10\relax%
372 \catcode13=5 % ^^M
373 \endlinechar=13 %
374 \catcode123=1 % {
375 \catcode125=2 % }
376 \catcode64=11 % @
377 \def\x{\endgroup
378 \expandafter\edef\csname PDFCOL@AtEnd\endcsname{%
379 \endlinechar=\the\endlinechar\relax
380 \catcode13=\the\catcode13\relax
381 \catcode32=\the\catcode32\relax
382 \catcode35=\the\catcode35\relax
383 \catcode61=\the\catcode61\relax
384 \catcode64=\the\catcode64\relax
385 \catcode123=\the\catcode123\relax
386 \catcode125=\the\catcode125\relax
387 }%
388 }%
389 \x\catcode61\catcode48\catcode32=10\relax%
390 \catcode13=5 % ^^M
391 \endlinechar=13 %
392 \catcode35=6 % #
393 \catcode64=11 % @
394 \catcode123=1 % {
395 \catcode125=2 % }
396 \def\TMP@EnsureCode#1#2{%
397 \edef\PDFCOL@AtEnd{%
398 \PDFCOL@AtEnd
399 \catcode#1=\the\catcode#1\relax
400 }%
401 \catcode#1=#2\relax
402 }
403 \TMP@EnsureCode{39}{12}% '
404 \TMP@EnsureCode{40}{12}% (
405 \TMP@EnsureCode{41}{12}% )
406 \TMP@EnsureCode{43}{12}% +
407 \TMP@EnsureCode{44}{12}% ,
408 \TMP@EnsureCode{46}{12}% .
409 \TMP@EnsureCode{47}{12}% /
410 \TMP@EnsureCode{91}{12}% [
411 \TMP@EnsureCode{93}{12}% ]
412 \TMP@EnsureCode{96}{12}% `
413 \edef\PDFCOL@AtEnd{\PDFCOL@AtEnd\noexpand\endinput}
414 % \end{macrocode}
415 %
416 % \subsection{Check requirements}
417 %
418 % \begin{macro}{\PDFCOL@RequirePackage}
419 % \begin{macrocode}
420 \ifcsname RequirePackage\endcsname
421 \def\PDFCOL@RequirePackage#1[#2]{%
422 \RequirePackage{#1}[{#2}]%
423 }%
424 \else
425 \def\PDFCOL@RequirePackage#1[#2]{\input #1.sty\relax}%
426 \fi
427 % \end{macrocode}
428 % \end{macro}
429 %
430 % LuaTeX Compatability
431 % \begin{macrocode}
432 \ifx\pdfextension\@undefined\else
433 \def\pdfcolorstackinit {\pdffeedback colorstackinit}
434 \protected\def\pdfcolorstack {\pdfextension colorstack}
435 \fi
436 % \end{macrocode}
437 %
438 % \begin{macrocode}
439 \PDFCOL@RequirePackage{ltxcmds}[2010/03/01]
440 % \end{macrocode}
441 %
442 % \begin{macro}{ifpdfcolAvailable}
443 % \begin{macrocode}
444 \ltx@newif\ifpdfcolAvailable
445 \pdfcolAvailabletrue
446 % \end{macrocode}
447 % \end{macro}
448 %
449 % \subsubsection{Check package \xpackage{luacolor}}
450 %
451 % \begin{macrocode}
452 \ltx@newif\ifPDFCOL@luacolor
453 \ifcsname [email protected]\endcsname
454 \PDFCOL@luacolortrue
455 \else
456 \PDFCOL@luacolorfalse
457 \fi
458 % \end{macrocode}
459 %
460 % \subsubsection{Check PDF mode}
461 %
462 % \begin{macrocode}
463 \PDFCOL@RequirePackage{infwarerr}[2007/09/09]
464 \PDFCOL@RequirePackage{iftex}[2019/11/07]
465 \ifcase\ifpdf\ifPDFCOL@luacolor 1\fi\else 1\fi0 %
466 \def\PDFCOL@Message{%
467 \@PackageWarningNoLine{pdfcol}%
468 }%
469 \else
470 \pdfcolAvailablefalse
471 \def\PDFCOL@Message{%
472 \@PackageInfoNoLine{pdfcol}%
473 }%
474 \PDFCOL@Message{%
475 Interface disabled because of %
476 \ifPDFCOL@luacolor
477 package `luacolor'%
478 \else
479 missing PDF mode of pdfTeX%
480 \fi
481 }%
482 \fi
483 % \end{macrocode}
484 %
485 % \subsubsection{Check version of \pdfTeX}
486 % The version check has been removed. We assume a new enough \pdfTeX.
487 %
488 % \subsubsection{Check \xfile{pdftex.def}}
489 % We no longer check the version but assume that it is new enough.
490 % \begin{macrocode}
491 \ifpdfcolAvailable
492 % \end{macrocode}
493 % Try to load package color if it is not yet loaded (\LaTeX\ case).
494 % \begin{macrocode}
495 \ifcsname documentclass\endcsname
496 \RequirePackage{color}
497 \fi
498 \fi
499 % \end{macrocode}
500 %
501 % \begin{macrocode}
502 \let\pdfcolAvailabletrue\relax
503 \let\pdfcolAvailablefalse\relax
504 % \end{macrocode}
505 %
506 % \subsection{Enabled interface macros}
507 %
508 % \begin{macrocode}
509 \ifpdfcolAvailable
510 % \end{macrocode}
511 %
512 % \begin{macro}{\pdfcolErrorNoStacks}
513 % \begin{macrocode}
514 \let\pdfcolErrorNoStacks\relax
515 % \end{macrocode}
516 % \end{macro}
517 %
518 % \begin{macro}{\pdfcol@Value}
519 % \begin{macrocode}
520 \expandafter\ifx\csname pdfcol@Value\endcsname\relax
521 \def\pdfcol@Value{0 g 0 G}%
522 \fi
523 % \end{macrocode}
524 % \end{macro}
525 %
526 % \begin{macro}{\pdfcol@LiteralModifier}
527 % \begin{macrocode}
528 \expandafter\ifx\csname pdfcol@LiteralModifier\endcsname\relax
529 \def\pdfcol@LiteralModifier{direct}%
530 \fi
531 % \end{macrocode}
532 % \end{macro}
533 %
534 % \begin{macro}{\pdfcolInitStack}
535 % \begin{macrocode}
536 \def\pdfcolInitStack#1{%
537 \expandafter\ifx\csname pdfcol@Stack@#1\endcsname\relax
538 \global\expandafter\chardef\csname pdfcol@Stack@#1\endcsname=%
539 \pdfcolorstackinit\pdfcol@LiteralModifier{\pdfcol@Value}%
540 \relax
541 \@PackageInfo{pdfcol}{%
542 New color stack `#1' = \number\csname pdfcol@Stack@#1\endcsname
543 }%
544 \else
545 \@PackageError{pdfcol}{%
546 Stack `#1' is already defined%
547 }\@ehc
548 \fi
549 }%
550 % \end{macrocode}
551 % \end{macro}
552 %
553 % \begin{macro}{\pdfcolIfStackExists}
554 % \begin{macrocode}
555 \def\pdfcolIfStackExists#1{%
556 \expandafter\ifx\csname pdfcol@Stack@#1\endcsname\relax
557 \expandafter\@secondoftwo
558 \else
559 \expandafter\@firstoftwo
560 \fi
561 }%
562 % \end{macrocode}
563 % \end{macro}
564 % \begin{macro}{\@firstoftwo}
565 % \begin{macrocode}
566 \expandafter\ifx\csname @firstoftwo\endcsname\relax
567 \long\def\@firstoftwo#1#2{#1}%
568 \fi
569 % \end{macrocode}
570 % \end{macro}
571 % \begin{macro}{\@secondoftwo}
572 % \begin{macrocode}
573 \expandafter\ifx\csname @secondoftwo\endcsname\relax
574 \long\def\@secondoftwo#1#2{#2}%
575 \fi
576 % \end{macrocode}
577 % \end{macro}
578 %
579 % \begin{macro}{\pdfcolSwitchStack}
580 % \begin{macrocode}
581 \def\pdfcolSwitchStack#1{%
582 \pdfcolIfStackExists{#1}{%
583 \expandafter\let\expandafter\@pdfcolorstack
584 \csname pdfcol@Stack@#1\endcsname
585 }{%
586 \pdfcol@ErrorNoStack{#1}%
587 }%
588 }%
589 % \end{macrocode}
590 % \end{macro}
591 %
592 % \begin{macro}{\pdfcolSetCurrentColor}
593 % \begin{macrocode}
594 \def\pdfcolSetCurrentColor{%
595 \pdfcolorstack\@pdfcolorstack set{\current@color}%
596 }%
597 % \end{macrocode}
598 % \end{macro}
599 %
600 % \begin{macro}{\pdfcolSetCurrent}
601 % \begin{macrocode}
602 \def\pdfcolSetCurrent#1{%
603 \ifx\\#1\\%
604 \pdfcolorstack\@pdfcolorstack current\relax
605 \else
606 \pdfcolIfStackExists{#1}{%
607 \pdfcolorstack\csname pdfcol@Stack@#1\endcsname current\relax
608 }{%
609 \pdfcol@ErrorNoStack{#1}%
610 }%
611 \fi
612 }%
613 % \end{macrocode}
614 % \end{macro}
615 %
616 % \begin{macro}{\pdfcol@ErrorNoStack}
617 % \begin{macrocode}
618 \def\pdfcol@ErrorNoStack#1{%
619 \@PackageError{pdfcol}{Stack `#1' does not exists}\@ehc
620 }%
621 % \end{macrocode}
622 % \end{macro}
623 %
624 % \subsection{Disabled interface macros}
625 %
626 % \begin{macrocode}
627 \else
628 % \end{macrocode}
629 %
630 % \begin{macro}{\pdfcolErrorNoStacks}
631 % \begin{macrocode}
632 \def\pdfcolErrorNoStacks{%
633 \@PackageError{pdfcol}{%
634 Color stacks are not available%
635 }{%
636 Update pdfTeX (1.40) and `pdftex.def' (0.04b) %
637 if necessary.\MessageBreak
638 Ensure that `pdftex.def' is loaded %
639 (package `color' or `xcolor').\MessageBreak
640 Further messages can be found in TeX's %
641 protocol file `\jobname.log'.\MessageBreak
642 \MessageBreak
643 \@ehc
644 }%
645 \global\let\pdfcolErrorNoStacks\relax
646 }%
647 % \end{macrocode}
648 % \end{macro}
649 %
650 % \begin{macro}{\PDFCOL@Disabled}
651 % \begin{macrocode}
652 \def\PDFCOL@Disabled{%
653 \PDFCOL@Message{%
654 pdfTeX's color stacks are not available%
655 }%
656 \global\let\PDFCOL@Disabled\relax
657 }%
658 % \end{macrocode}
659 % \end{macro}
660 %
661 % \begin{macro}{\pdfcolInitStack}
662 % \begin{macrocode}
663 \def\pdfcolInitStack#1{%
664 \PDFCOL@Disabled
665 }%
666 % \end{macrocode}
667 % \end{macro}
668 %
669 % \begin{macro}{\pdfcolIfStackExists}
670 % \begin{macrocode}
671 \long\def\pdfcolIfStackExists#1#2#3{#3}%
672 % \end{macrocode}
673 % \end{macro}
674 %
675 % \begin{macro}{\pdfcolSwitchStack}
676 % \begin{macrocode}
677 \def\pdfcolSwitchStack#1{%
678 \PDFCOL@Disabled
679 }%
680 % \end{macrocode}
681 % \end{macro}
682 %
683 % \begin{macro}{\pdfcolSetCurrentColor}
684 % \begin{macrocode}
685 \def\pdfcolSetCurrentColor{%
686 \PDFCOL@Disabled
687 }%
688 % \end{macrocode}
689 % \end{macro}
690 %
691 % \begin{macro}{\pdfcolSetCurrent}
692 % \begin{macrocode}
693 \def\pdfcolSetCurrent#1{%
694 \PDFCOL@Disabled
695 }%
696 % \end{macrocode}
697 % \end{macro}
698 % \begin{macrocode}
699 \fi
700 % \end{macrocode}
701 %
702 % \begin{macrocode}
703 \PDFCOL@AtEnd%
704 %</package>
705 % \end{macrocode}
706 %% \section{Installation}
707 %
708 % \subsection{Download}
709 %
710 % \paragraph{Package.} This package is available on
711 % CTAN\footnote{\CTANpkg{pdfcol}}:
712 % \begin{description}
713 % \item[\CTAN{macros/latex/contrib/pdfcol/pdfcol.dtx}] The source file.
714 % \item[\CTAN{macros/latex/contrib/pdfcol/pdfcol.pdf}] Documentation.
715 % \end{description}
716 %
717 %
718 % \subsection{Package installation}
719 %
720 % \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
721 % \docstrip\ archive. The files are extracted by running the
722 % \xfile{.dtx} through \plainTeX:
723 % \begin{quote}
724 % \verb|tex pdfcol.dtx|
725 % \end{quote}
726 %
727 % \paragraph{TDS.} Now the different files must be moved into
728 % the different directories in your installation TDS tree
729 % (also known as \xfile{texmf} tree):
730 % \begin{quote}
731 % \def\t{^^A
732 % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
733 % pdfcol.sty & tex/generic/pdfcol/pdfcol.sty\\
734 % pdfcol.pdf & doc/latex/pdfcol/pdfcol.pdf\\
735 % pdfcol.dtx & source/latex/pdfcol/pdfcol.dtx\\
736 % \end{tabular}^^A
737 % }^^A
738 % \sbox0{\t}^^A
739 % \ifdim\wd0>\linewidth
740 % \begingroup
741 % \advance\linewidth by\leftmargin
742 % \advance\linewidth by\rightmargin
743 % \edef\x{\endgroup
744 % \def\noexpand\lw{\the\linewidth}^^A
745 % }\x
746 % \def\lwbox{^^A
747 % \leavevmode
748 % \hbox to \linewidth{^^A
749 % \kern-\leftmargin\relax
750 % \hss
751 % \usebox0
752 % \hss
753 % \kern-\rightmargin\relax
754 % }^^A
755 % }^^A
756 % \ifdim\wd0>\lw
757 % \sbox0{\small\t}^^A
758 % \ifdim\wd0>\linewidth
759 % \ifdim\wd0>\lw
760 % \sbox0{\footnotesize\t}^^A
761 % \ifdim\wd0>\linewidth
762 % \ifdim\wd0>\lw
763 % \sbox0{\scriptsize\t}^^A
764 % \ifdim\wd0>\linewidth
765 % \ifdim\wd0>\lw
766 % \sbox0{\tiny\t}^^A
767 % \ifdim\wd0>\linewidth
768 % \lwbox
769 % \else
770 % \usebox0
771 % \fi
772 % \else
773 % \lwbox
774 % \fi
775 % \else
776 % \usebox0
777 % \fi
778 % \else
779 % \lwbox
780 % \fi
781 % \else
782 % \usebox0
783 % \fi
784 % \else
785 % \lwbox
786 % \fi
787 % \else
788 % \usebox0
789 % \fi
790 % \else
791 % \lwbox
792 % \fi
793 % \else
794 % \usebox0
795 % \fi
796 % \end{quote}
797 % If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
798 % TDS installing feature, then some files can already be in the right
799 % place, see the documentation of \docstrip.
800 %
801 % \subsection{Refresh file name databases}
802 %
803 % If your \TeX~distribution
804 % (\TeX\,Live, \mikTeX, \dots) relies on file name databases, you must refresh
805 % these. For example, \TeX\,Live\ users run \verb|texhash| or
806 % \verb|mktexlsr|.
807 %
808 % \subsection{Some details for the interested}
809 %
810 % \paragraph{Unpacking with \LaTeX.}
811 % The \xfile{.dtx} chooses its action depending on the format:
812 % \begin{description}
813 % \item[\plainTeX:] Run \docstrip\ and extract the files.
814 % \item[\LaTeX:] Generate the documentation.
815 % \end{description}
816 % If you insist on using \LaTeX\ for \docstrip\ (really,
817 % \docstrip\ does not need \LaTeX), then inform the autodetect routine
818 % about your intention:
819 % \begin{quote}
820 % \verb|latex \let\install=y\input{pdfcol.dtx}|
821 % \end{quote}
822 % Do not forget to quote the argument according to the demands
823 % of your shell.
824 %
825 % \paragraph{Generating the documentation.}
826 % You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
827 % the documentation. The process can be configured by the
828 % configuration file \xfile{ltxdoc.cfg}. For instance, put this
829 % line into this file, if you want to have A4 as paper format:
830 % \begin{quote}
831 % \verb|\PassOptionsToClass{a4paper}{article}|
832 % \end{quote}
833 % An example follows how to generate the
834 % documentation with pdf\LaTeX:
835 % \begin{quote}
836 %\begin{verbatim}
837 %pdflatex pdfcol.dtx
838 %makeindex -s gind.ist pdfcol.idx
839 %pdflatex pdfcol.dtx
840 %makeindex -s gind.ist pdfcol.idx
841 %pdflatex pdfcol.dtx
842 %\end{verbatim}
843 % \end{quote}
844 %
845 % \begin{History}
846 % \begin{Version}{2007/09/09 v1.0}
847 % \item
848 % First version.
849 % \end{Version}
850 % \begin{Version}{2007/12/09 v1.1}
851 % \item
852 % \cs{pdfcolSetCurrentColor} added.
853 % \end{Version}
854 % \begin{Version}{2007/12/12 v1.2}
855 % \item
856 % Detection for package \xpackage{luacolor} added.
857 % \end{Version}
858 % \begin{Version}{2016/05/16 v1.3}
859 % \item
860 % Documentation updates.
861 % \end{Version}
862 % \begin{Version}{2016/05/17 v1.4}
863 % \item
864 % Use luatex85 package for new luatex compatibility
865 % \end{Version}
866 % \begin{Version}{2018/11/01 v1.5}
867 % \item
868 % Remove luatex85 dependency
869 % \end{Version}
870 % \begin{Version}{2019/12/29 v1.6}
871 % \item
872 % \xpackage{iftex} package.
873 % \end{Version}
874 % \begin{Version}{2022-09-21 v1.7}
875 % \item Improved luatex compatitiblity, removed unneeded version checks.
876 % \end{Version}
877 % \end{History}
878 %
879 % \PrintIndex
880 %
881 % \Finale
882 \endinput