| 1 |
%% |
| 2 |
%% This is file `pdfcolfoot.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% pdfcolfoot.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: pdfcolfoot |
| 12 |
%% Version: 2023-01-10 v1.4 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2007, 2012 Heiko Oberdiek |
| 16 |
%% 2016-2023 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/pdfcolfoot/issues |
| 33 |
%% |
| 34 |
%% This work consists of the main source file pdfcolfoot.dtx |
| 35 |
%% and the derived files |
| 36 |
%% pdfcolfoot.sty, pdfcolfoot.pdf, pdfcolfoot.ins, pdfcolfoot.drv |
| 37 |
%% |
| 38 |
\NeedsTeXFormat{LaTeX2e} |
| 39 |
\ProvidesPackage{pdfcolfoot}% |
| 40 |
[2023-01-10 v1.4 Color stack for footnotes with pdfTeX (HO)]% |
| 41 |
\RequirePackage{pdfcol}[2007/09/09] |
| 42 |
\ifpdfcolAvailable |
| 43 |
\else |
| 44 |
\PackageInfo{pdfcolfoot}{% |
| 45 |
Loading aborted, because color stacks are not available% |
| 46 |
}% |
| 47 |
\expandafter\endinput |
| 48 |
\fi |
| 49 |
\pdfcolInitStack{foot} |
| 50 |
\newcommand*{\pdfcolfoot@switch}{% |
| 51 |
\pdfcolSwitchStack{foot}% |
| 52 |
} |
| 53 |
\AtBeginDocument{% |
| 54 |
\newcommand*{\pdfcolfoot@makefntext}{}% |
| 55 |
\let\pdfcolfoot@makefntext\@makefntext |
| 56 |
\renewcommand{\@makefntext}[1]{% |
| 57 |
\pdfcolfoot@makefntext{% |
| 58 |
\if@minipage |
| 59 |
\else |
| 60 |
\pdfcolfoot@switch |
| 61 |
\fi |
| 62 |
\color@begingroup |
| 63 |
#1% |
| 64 |
\color@endgroup |
| 65 |
}% |
| 66 |
}% |
| 67 |
} |
| 68 |
\newcommand*{\pdfcolfoot@current}{% |
| 69 |
\pdfcolSetCurrent{foot}% |
| 70 |
} |
| 71 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 72 |
\expandafter\ifx\csname detokenize\endcsname\relax |
| 73 |
\PackageWarningNoLine{pdfcolfoot}{% |
| 74 |
Missing e-TeX for patching \string\@makecol |
| 75 |
}% |
| 76 |
\expandafter\endinput |
| 77 |
\fi |
| 78 |
\newif\ifPCF@result |
| 79 |
\def\pdfcolfoot@patch#1{% |
| 80 |
\ifx#1\@undefined |
| 81 |
\else |
| 82 |
\ifx#1\relax |
| 83 |
\else |
| 84 |
\begingroup |
| 85 |
\toks@{}% |
| 86 |
\let\on@line\@empty |
| 87 |
\expandafter\PCF@CheckPatched |
| 88 |
\detokenize\expandafter{#1pdfcolfoot@current}\@nil |
| 89 |
\ifPCF@result |
| 90 |
\PackageInfo{pdfcolfoot}{\string#1\space is already patched}% |
| 91 |
\else |
| 92 |
\expandafter\PCF@CanPatch |
| 93 |
\detokenize\expandafter{% |
| 94 |
#1\setbox\@outputbox\vbox{\footnoterule}% |
| 95 |
}% |
| 96 |
\@nil |
| 97 |
\ifPCF@result |
| 98 |
\PackageInfo{pdfcolfoot}{\string#1 is being patched}% |
| 99 |
\expandafter\PCF@PatchA#1\PCF@nil#1% |
| 100 |
\else |
| 101 |
\PackageInfo{pdfcolfoot}{% |
| 102 |
\string#1\space cannot be patched% |
| 103 |
}% |
| 104 |
\fi |
| 105 |
\fi |
| 106 |
\expandafter\endgroup |
| 107 |
\the\toks@ |
| 108 |
\fi |
| 109 |
\fi |
| 110 |
} |
| 111 |
\expandafter\def\expandafter\PCF@CheckPatched |
| 112 |
\expandafter#\expandafter1\detokenize{pdfcolfoot@current}#2\@nil{% |
| 113 |
\ifx\\#2\\% |
| 114 |
\PCF@resultfalse |
| 115 |
\else |
| 116 |
\PCF@resulttrue |
| 117 |
\fi |
| 118 |
} |
| 119 |
\edef\PCF@BraceLeft{\string{} |
| 120 |
\edef\PCF@BraceRight{\string}} |
| 121 |
\begingroup |
| 122 |
\edef\x{\endgroup |
| 123 |
\def\noexpand\PCF@CanPatch |
| 124 |
##1\detokenize{\setbox\@outputbox\vbox}\PCF@BraceLeft |
| 125 |
##2\detokenize{\footnoterule}##3\PCF@BraceRight |
| 126 |
}% |
| 127 |
\x#4\@nil{% |
| 128 |
\ifx\\#2#3#4\\% |
| 129 |
\PCF@resultfalse |
| 130 |
\else |
| 131 |
\PCF@resulttrue |
| 132 |
\fi |
| 133 |
} |
| 134 |
\def\PCF@PatchA#1\setbox\@outputbox\vbox#2#3\PCF@nil#4{% |
| 135 |
\PCF@PatchB{#1}#2\PCF@nil{#3}#4% |
| 136 |
} |
| 137 |
\def\PCF@PatchB#1#2\footnoterule#3\PCF@nil#4#5{% |
| 138 |
\toks@{% |
| 139 |
\def#5{% |
| 140 |
#1% |
| 141 |
\setbox\@outputbox\vbox{% |
| 142 |
#2% |
| 143 |
\footnoterule |
| 144 |
\pdfcolfoot@current |
| 145 |
#3% |
| 146 |
}% |
| 147 |
#4% |
| 148 |
}% |
| 149 |
}% |
| 150 |
} |
| 151 |
\def\pdfcolfoot@all#1{% |
| 152 |
\begingroup |
| 153 |
\let\on@line\@empty |
| 154 |
\PackageInfo{pdfcolfoot}{% |
| 155 |
Patching \string\@makecol\space macros (#1)% |
| 156 |
}% |
| 157 |
\endgroup |
| 158 |
\pdfcolfoot@patch\@makecol |
| 159 |
\pdfcolfoot@patch\@makecol@pptt |
| 160 |
\pdfcolfoot@patch\mem@makecol |
| 161 |
\pdfcolfoot@patch\mem@makecolbf |
| 162 |
\pdfcolfoot@patch\m@mopfootnote |
| 163 |
\pdfcolfoot@patch\@combineinserts |
| 164 |
\pdfcolfoot@patch\ltx@makecol |
| 165 |
\pdfcolfoot@patch\dfn@latex@makecol |
| 166 |
\pdfcolfoot@patch\latex@makecol |
| 167 |
\pdfcolfoot@patch\LS@makecol |
| 168 |
\pdfcolfoot@patch\@LN@orig@makecol |
| 169 |
\pdfcolfoot@patch\org@makecol |
| 170 |
\pdfcolfoot@patch\fn@makecol |
| 171 |
} |
| 172 |
\AtBeginDocument{\pdfcolfoot@all{AtBeginDocument}} |
| 173 |
\pdfcolfoot@all{AtEndOfPackage} |
| 174 |
%% \section{Installation} |
| 175 |
\endinput |
| 176 |
%% |
| 177 |
%% End of file `pdfcolfoot.sty'. |