| 1 |
%% |
| 2 |
%% This is an old release of `showkeys.sty' used during rollback operations. |
| 3 |
%% Do not use this file directly. |
| 4 |
%% ============================== |
| 5 |
%% |
| 6 |
%% This is file `showkeys.sty', |
| 7 |
%% generated with the docstrip utility. |
| 8 |
%% |
| 9 |
%% The original source files were: |
| 10 |
%% |
| 11 |
%% showkeys.dtx (with options: `package') |
| 12 |
%% |
| 13 |
%% This is a generated file. |
| 14 |
%% |
| 15 |
%% The source is maintained by the LaTeX Project team and bug |
| 16 |
%% reports for it can be opened at https://latex-project.org/bugs/ |
| 17 |
%% (but please observe conditions on bug reports sent to that address!) |
| 18 |
%% |
| 19 |
%% |
| 20 |
%% Copyright (C) 1993-2021 |
| 21 |
%% The LaTeX Project and any individual authors listed elsewhere |
| 22 |
%% in this file. |
| 23 |
%% |
| 24 |
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. |
| 25 |
%% -------------------------------------------------------------------------- |
| 26 |
%% |
| 27 |
%% It may be distributed and/or modified under the |
| 28 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 29 |
%% of this license or (at your option) any later version. |
| 30 |
%% The latest version of this license is in |
| 31 |
%% https://www.latex-project.org/lppl.txt |
| 32 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 33 |
%% version 2005/12/01 or later. |
| 34 |
%% |
| 35 |
%% This file may only be distributed together with a copy of the LaTeX |
| 36 |
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' |
| 37 |
%% without such generated files. |
| 38 |
%% |
| 39 |
%% The list of all files belonging to the LaTeX `Tools Bundle' is |
| 40 |
%% given in the file `manifest.txt'. |
| 41 |
%% |
| 42 |
%% File: showkeys.dtx Copyright (C) 1992-1997 David Carlisle |
| 43 |
%% File: showkeys.dtx Copyright (C) 2006-2019 David Carlisle, LaTeX Project |
| 44 |
\NeedsTeXFormat{LaTeX2e} |
| 45 |
\ProvidesPackage{showkeys} |
| 46 |
[2014/10/28 v3.17 Show cite and label keys (DPC, MH)] |
| 47 |
\DeclareOption{notref}{\let\SK@ref\@empty} |
| 48 |
\DeclareOption{notcite}{\let\SK@cite\@empty} |
| 49 |
\let\SK@refcolor\relax |
| 50 |
\let\SK@labelcolor\relax |
| 51 |
\DeclareOption{color}{\AtEndOfPackage{% |
| 52 |
\RequirePackage{color}% |
| 53 |
\definecolor{refkey}{gray}{.75}% |
| 54 |
\definecolor{labelkey}{gray}{.75}% |
| 55 |
\def\SK@refcolor{\color{refkey}}% |
| 56 |
\def\SK@labelcolor{\color{labelkey}}}} |
| 57 |
\DeclareOption{final}{% |
| 58 |
\providecommand*\showkeyslabelformat[1]{}% |
| 59 |
\endinput} |
| 60 |
\DeclareOption{draft}{} |
| 61 |
\ProcessOptions |
| 62 |
\let\SK@label\label |
| 63 |
\let\SK@bibitem\@bibitem |
| 64 |
\let\SK@lbibitem\@lbibitem |
| 65 |
\def\label#1{% |
| 66 |
\@bsphack |
| 67 |
\SK@\SK@@label{#1}% |
| 68 |
\begingroup |
| 69 |
\SK@label{#1}% |
| 70 |
\endgroup |
| 71 |
\@esphack} |
| 72 |
\def\@bibitem#1{% |
| 73 |
\SK@bibitem{#1}\SK@\SK@@label{#1}\ignorespaces} |
| 74 |
\def\@lbibitem[#1]#2{% |
| 75 |
\SK@lbibitem[{#1}]{#2}\SK@\SK@@label{#2}\ignorespaces} |
| 76 |
\def\SK@#1#2{% |
| 77 |
\protected@edef\@tempa{#2}% |
| 78 |
\expandafter#1\meaning\@tempa\SK@} |
| 79 |
\providecommand*\showkeyslabelformat[1]{% |
| 80 |
\fbox{\normalfont\small\ttfamily#1}} |
| 81 |
\def\SK@@label#1>#2\SK@{% |
| 82 |
\gdef\SK@lab{\smash{\SK@labelcolor\showkeyslabelformat{#2}}}% |
| 83 |
\ifvmode |
| 84 |
\if@inlabel |
| 85 |
\global\setbox\@labels\hbox{% |
| 86 |
\llap{\SK@lab\SK@lab@relax |
| 87 |
\kern\@totalleftmargin\kern\marginparsep}% |
| 88 |
\box\@labels}% |
| 89 |
\else |
| 90 |
\dimen@\prevdepth |
| 91 |
\nointerlineskip |
| 92 |
\ifinner |
| 93 |
\skip@\lastskip\unskip |
| 94 |
\advance\skip@\lastskip\unskip |
| 95 |
\setbox\z@\lastbox |
| 96 |
\ifvoid\z@ |
| 97 |
\llap{\SK@lab\SK@lab@relax\kern\marginparsep}% |
| 98 |
\else |
| 99 |
\hbox{\box\z@\rlap{\kern\marginparsep\SK@labx}}% |
| 100 |
\fi |
| 101 |
\vskip\skip@ |
| 102 |
\else |
| 103 |
\llap{\SK@lab\SK@lab@relax\kern\marginparsep}% |
| 104 |
\fi |
| 105 |
\prevdepth\dimen@ |
| 106 |
\fi |
| 107 |
\else |
| 108 |
\csname SK@\@currenvir\endcsname |
| 109 |
\ifSK@equation\else |
| 110 |
\ifmmode |
| 111 |
\SK@labx |
| 112 |
\else |
| 113 |
\ifinner |
| 114 |
\rlap\SK@lab |
| 115 |
\else |
| 116 |
\vadjust{\llap{\SK@lab\kern\marginparsep}}% |
| 117 |
\fi |
| 118 |
\SK@lab@relax |
| 119 |
\fi |
| 120 |
\fi |
| 121 |
\fi} |
| 122 |
\AtBeginDocument{% |
| 123 |
\let\SK@eqnnum\@eqnnum |
| 124 |
\@ifpackageloaded{amsmath}{% |
| 125 |
\let\SK@tagform@\tagform@ |
| 126 |
\let\SK@maketag@@@\maketag@@@ |
| 127 |
\iftagsleft@ |
| 128 |
\def\tagform@#1{% |
| 129 |
\ifx\df@label\@empty |
| 130 |
\SK@lab@relax |
| 131 |
\else |
| 132 |
\expandafter\SK@@label\meaning\df@label\SK@ |
| 133 |
\fi |
| 134 |
\llap{\SK@lab\kern\marginparsep}% |
| 135 |
\SK@lab@relax\SK@tagform@{#1}}% |
| 136 |
\def\maketag@@@#1{% |
| 137 |
\ifx\df@label\@empty |
| 138 |
\SK@lab@relax |
| 139 |
\else |
| 140 |
\expandafter\SK@@label\meaning\df@label\SK@ |
| 141 |
\fi |
| 142 |
\llap{\SK@lab\kern\marginparsep}\SK@lab@relax |
| 143 |
\SK@maketag@@@{#1}% |
| 144 |
}% |
| 145 |
\def\@eqnnum{% |
| 146 |
\llap{\SK@lab\kern\displaywidth\kern\marginparsep}% |
| 147 |
\SK@lab@relax\SK@eqnnum}% |
| 148 |
\else |
| 149 |
\def\tagform@#1{% |
| 150 |
\ifx\df@label\@empty |
| 151 |
\SK@lab@relax |
| 152 |
\else |
| 153 |
\expandafter\SK@@label\meaning\df@label\SK@ |
| 154 |
\fi |
| 155 |
\SK@tagform@{#1}% |
| 156 |
\rlap{\kern\marginparsep\SK@lab}\SK@lab@relax}% |
| 157 |
\def\maketag@@@#1{% |
| 158 |
\ifx\df@label\@empty |
| 159 |
\SK@lab@relax |
| 160 |
\else |
| 161 |
\expandafter\SK@@label\meaning\df@label\SK@ |
| 162 |
\fi |
| 163 |
\SK@maketag@@@{#1}% |
| 164 |
\rlap{\kern\marginparsep\SK@lab}\SK@lab@relax |
| 165 |
}% |
| 166 |
\def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}% |
| 167 |
\SK@lab@relax}% |
| 168 |
\fi |
| 169 |
}% |
| 170 |
{% |
| 171 |
\@ifundefined{[email protected]}{% |
| 172 |
\def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}% |
| 173 |
\SK@lab@relax}% |
| 174 |
}{% |
| 175 |
\def\@eqnnum{% |
| 176 |
\llap{\SK@lab\kern\displaywidth\kern\marginparsep}% |
| 177 |
\SK@lab@relax\SK@eqnnum}% |
| 178 |
}% |
| 179 |
}% |
| 180 |
} |
| 181 |
\def\SK@labx{\rlap\SK@lab\global\let\SK@lab\relax} |
| 182 |
\def\SK@lab@relax{\global\let\SK@lab\relax}\SK@lab@relax |
| 183 |
\newif\ifSK@equation |
| 184 |
\let\SK@equation\SK@equationtrue |
| 185 |
\let\SK@eqnarray\SK@equationtrue |
| 186 |
\toks@\expandafter{\eqnarray} |
| 187 |
\edef\eqnarray{\let\noexpand\tagform@\noexpand\SK@tagform@\the\toks@} |
| 188 |
\let\SK@align\SK@equationtrue |
| 189 |
\let\SK@alignat\SK@equationtrue |
| 190 |
\let\SK@xalignat\SK@equationtrue |
| 191 |
\let\SK@xxalignat\SK@equationtrue |
| 192 |
\let\SK@gather\SK@equationtrue |
| 193 |
\let\SK@multline\SK@equationtrue |
| 194 |
\let\SK@flalign\SK@equationtrue |
| 195 |
\expandafter\let\csname SK@align*\endcsname\SK@equationtrue |
| 196 |
\expandafter\let\csname SK@alignat*\endcsname\SK@equationtrue |
| 197 |
\expandafter\let\csname SK@flalign*\endcsname\SK@equationtrue |
| 198 |
\expandafter\let\csname SK@gather*\endcsname\SK@equationtrue |
| 199 |
\expandafter\let\csname SK@multline*\endcsname\SK@equationtrue |
| 200 |
\expandafter\let\csname SK@equation*\endcsname\SK@equationtrue |
| 201 |
\def\SK@def#1{% |
| 202 |
\edef\@tempa{\expandafter\@gobble\string#1}% |
| 203 |
\@ifundefined{\@tempa\space}% |
| 204 |
{\expandafter\let\csname SK@\@tempa\endcsname#1}% |
| 205 |
{\expandafter\let\csname SK@\@tempa\expandafter\endcsname |
| 206 |
\csname\@tempa\space\endcsname}% |
| 207 |
\expandafter\def\expandafter#1\expandafter{% |
| 208 |
\expandafter\protect\csname\@tempa\space\endcsname}% |
| 209 |
\expandafter\def\csname\@tempa\space\endcsname} |
| 210 |
\ifx\SK@ref\@empty |
| 211 |
\AtBeginDocument{% |
| 212 |
\@ifpackageloaded{varioref}{% |
| 213 |
\SK@def\@@vpageref#1[#2]#3{{% |
| 214 |
\let\label\SK@label |
| 215 |
\SK@@@vpageref{#1}[{#2}]{#3}}}% |
| 216 |
\def\vr@f#1{% |
| 217 |
\leavevmode\unskip\vref@space |
| 218 |
\ref{#1}% |
| 219 |
{\let\label\SK@label |
| 220 |
\vpageref[\unskip]{#1}}}% |
| 221 |
}{}} |
| 222 |
\else |
| 223 |
\AtBeginDocument{% |
| 224 |
\SK@def\ref#1{\SK@\SK@@ref{#1}\SK@ref{#1}}% |
| 225 |
\SK@def\pageref#1{\SK@\SK@@ref{#1}\SK@pageref{#1}}% |
| 226 |
\@ifpackageloaded{varioref}{% |
| 227 |
\SK@def\@@vpageref#1[#2]#3{{% |
| 228 |
\let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref |
| 229 |
\leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}% |
| 230 |
\def\vr@f#1{% |
| 231 |
\leavevmode\unskip\vref@space |
| 232 |
\ref{#1}% |
| 233 |
\let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref |
| 234 |
\vpageref[\unskip]{#1}}% |
| 235 |
}{}} |
| 236 |
\fi |
| 237 |
\ifx\SK@cite\@empty |
| 238 |
\AtBeginDocument{% |
| 239 |
\ifx\HAR@checkdef\@undefined\else |
| 240 |
\expandafter\let\expandafter |
| 241 |
\SK@HAR@bi\csname\string\harvarditem\endcsname |
| 242 |
\expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{% |
| 243 |
\SK@HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}% |
| 244 |
\fi} |
| 245 |
\else |
| 246 |
\AtBeginDocument{% |
| 247 |
\ifx\HAR@checkdef\@undefined |
| 248 |
\ifx\citen\@undefined |
| 249 |
\SK@def\@citex[#1]#2{\SK@citex[{#1}]{#2}}% |
| 250 |
\else |
| 251 |
\SK@def\citen#1{\SK@\SK@@ref{#1}\SK@citen{#1}}% |
| 252 |
\fi |
| 253 |
\SK@def\citeauthor#1{\SK@\SK@@ref{#1}\SK@citeauthor{#1}}% |
| 254 |
\SK@def\citefullauthor#1{\SK@\SK@@ref{#1}\SK@citefullauthor{#1}}% |
| 255 |
\SK@def\citeyear#1{\SK@\SK@@ref{#1}\SK@citeyear{#1}}% |
| 256 |
\else |
| 257 |
\SK@def\HAR@checkdef#1#2{% |
| 258 |
\expandafter\SK@\expandafter\SK@@ref\expandafter{#1}% |
| 259 |
\SK@HAR@checkdef{#1}{#2}}% |
| 260 |
\expandafter\let\expandafter |
| 261 |
\SK@HAR@bi\csname\string\harvarditem\endcsname |
| 262 |
\expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{% |
| 263 |
\SK@HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}% |
| 264 |
\fi} |
| 265 |
\def\SK@citex[#1]#2{% |
| 266 |
\SK@\SK@@ref{#2}\SK@@citex[{#1}]{#2}} |
| 267 |
\fi |
| 268 |
\def\SK@@ref#1>#2\SK@{% |
| 269 |
\leavevmode\vbox to\z@{{% |
| 270 |
\vss |
| 271 |
\SK@refcolor |
| 272 |
\rlap{\vrule\raise .75em% |
| 273 |
\hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}}} |
| 274 |
\endinput |
| 275 |
%% |
| 276 |
%% End of file `showkeys.sty'. |