%%
%% This is file `showkeys.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% showkeys.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% This file is a generated file from the sources of the `tools' bundle
%% in the LaTeX2e distribution.
%%
%% For the copyright notice see the source file(s).
%%
%% You are not allowed to modify this file.
%%
%% You are allowed to distribute this file if and only if
%% it is distributed with the corresponding source files in
%% the `tools' bundle.
%%
%% For the copying and distribution conditions of the source files,
%% see the file readme.txt distributed with the tools bundle.
%%
%% File: showkeys.dtx Copyright (C) 1992-1996 David Carlisle
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{showkeys}
[1996/11/01 v3.11 Show cite and label keys (DPC)]
\DeclareOption{notref}{\let\SK@ref\@empty}
\DeclareOption{notcite}{\let\SK@cite\@empty}
\let\SK@refcolor\relax
\let\SK@labelcolor\relax
\DeclareOption{color}{\AtEndOfPackage{%
\RequirePackage{color}%
\definecolor{refkey}{gray}{.75}%
\definecolor{labelkey}{gray}{.75}%
\def\SK@refcolor{\color{refkey}}%
\def\SK@labelcolor{\color{labelkey}}}}
\DeclareOption{final}{\endinput}
\DeclareOption{draft}{}
\ProcessOptions
\let\SK@label\label
\let\SK@bibitem\@bibitem
\let\SK@lbibitem\@lbibitem
\def\label#1{%
\@bsphack
\SK@\SK@@label{#1}%
\begingroup
\SK@label{#1}%
\endgroup
\@esphack}
\def\@bibitem#1{%
\SK@bibitem{#1}\SK@\SK@@label{#1}\ignorespaces}
\def\@lbibitem[#1]#2{%
\SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces}
\def\SK@#1#2{%
\protected@edef\@tempa{#2}%
\expandafter#1\meaning\@tempa\SK@}
\def\SK@@label#1>#2\SK@{%
\gdef\SK@lab{\smash{\SK@labelcolor\fbox{%
\normalfont\small\ttfamily#2}}}%
\ifvmode
\if@inlabel
\global\setbox\@labels\hbox{%
\llap{\SK@lab\SK@lab@relax
\kern\@totalleftmargin\kern\marginparsep}%
\box\@labels}%
\else
\dimen@\prevdepth
\nointerlineskip
\ifinner
\skip@\lastskip\unskip
\advance\skip@\lastskip\unskip
\setbox\z@\lastbox
\ifvoid\z@
\llap{\SK@lab\SK@lab@relax\kern\marginparsep}%
\else
\hbox{\box\z@\kern\marginparsep\SK@labx}%
\fi
\vskip\skip@
\else
\llap{\SK@lab\SK@lab@relax\kern\marginparsep}%
\fi
\prevdepth\dimen@
\fi
\else
\csname SK@\@currenvir\endcsname
\ifSK@equation\else
\ifmmode
\SK@labx
\else
\ifinner
\rlap\SK@lab
\else
\vadjust{\llap{\SK@lab\kern\marginparsep}}%
\fi
\SK@lab@relax
\fi
\fi
\fi}
\AtBeginDocument{%
\let\SK@eqnnum\@eqnnum
\def\@tempa{\let\iftagsleft@\iffalse}%
\ifx\iftagsleft@\undefined\@tempa\fi%
\let\SK@tagform@\tagform@
\iftagsleft@
\def\tagform@#1{%
\ifx\df@label\@empty
\SK@lab@relax
\else
\expandafter\SK@@label\meaning\df@label\SK@
\fi
\llap{\SK@lab\kern\marginparsep}%
\SK@lab@relax\SK@tagform@{#1}}%
\def\@eqnnum{%
\llap{\SK@lab\kern\displaywidth\kern\marginparsep}%
\SK@lab@relax\SK@eqnnum}%
\else
\def\tagform@#1{%
\ifx\df@label\@empty
\SK@lab@relax
\else
\expandafter\SK@@label\meaning\df@label\SK@
\fi
\SK@tagform@{#1}%
\rlap{\kern\marginparsep\SK@lab}\SK@lab@relax}%
\def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}%
\SK@lab@relax}%
\fi}
\def\SK@labx{\rlap\SK@lab\global\let\SK@lab\relax}
\def\SK@lab@relax{\global\let\SK@lab\relax}\SK@lab@relax
\newif\ifSK@equation
\let\SK@equation\SK@equationtrue
\let\SK@eqnarray\SK@equationtrue
\toks@\expandafter{\eqnarray}
\edef\eqnarray{\let\noexpand\tagform@\noexpand\SK@tagform@\the\toks@}
\let\SK@align\SK@equationtrue
\let\SK@alignat\SK@equationtrue
\let\SK@xalignat\SK@equationtrue
\let\SK@xxalignat\SK@equationtrue
\let\SK@gather\SK@equationtrue
\let\SK@multline\SK@equationtrue
\let\SK@flalign\SK@equationtrue
\def\SK@def#1{%
\edef\@tempa{\expandafter\@gobble\string#1}%
\@ifundefined{\@tempa\space}%
{\expandafter\let\csname SK@\@tempa\endcsname#1}%
{\expandafter\let\csname SK@\@tempa\expandafter\endcsname
\csname\@tempa\space\endcsname}%
\expandafter\def\expandafter#1\expandafter{%
\expandafter\protect\csname\@tempa\space\endcsname}%
\expandafter\def\csname\@tempa\space\endcsname}
\ifx\SK@ref\@empty
\AtBeginDocument{%
\ifx\vpageref\@undefined\else
\SK@def\@@vpageref#1[#2]#3{{%
\let\label\SK@label
\SK@@@vpageref#1[#2]{#3}}}%
\DeclareRobustCommand\vref[1]{%
\unskip~\ref{#1}%
{\let\label\SK@label
\SK@@@vpageref\unskip[\unskip\space]{#1}}}%
\fi}
\else
\AtBeginDocument{%
\SK@def\ref#1{\SK@\SK@@ref{#1}\SK@ref{#1}}%
\SK@def\pageref#1{\SK@\SK@@ref{#1}\SK@pageref{#1}}%
\ifx\vpageref\@undefined\else
\SK@def\@@vpageref#1[#2]#3{{%
\let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref
\leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref#1[#2]{#3}}}%
\DeclareRobustCommand\vref[1]{%
\unskip~\ref{#1}%
{\let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref
\SK@@@vpageref\unskip[\unskip\space]{#1}}}%
\fi}
\fi
\ifx\SK@cite\@empty
\AtBeginDocument{%
\ifx\HAR@checkdef\@undefined\else
\expandafter\let\expandafter
\SK@HAR@bi\csname\string\harvarditem\endcsname
\expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%
\SK@HAR@bi[#1]{#2}{#3}{#4}\SK@\SK@@label{#4}}%
\fi}
\else
\AtBeginDocument{%
\ifx\HAR@checkdef\@undefined
\SK@def\cite#1#{\SK@citea{#1}}%
\SK@def\citeauthor#1{\SK@\SK@@ref{#1}\SK@citeauthor{#1}}%
\SK@def\citefullauthor#1{\SK@\SK@@ref{#1}\SK@citefullauthor{#1}}%
\SK@def\citeyear#1{\SK@\SK@@ref{#1}\SK@citeyear{#1}}%
\else
\SK@def\HAR@checkdef#1#2{%
\expandafter\SK@\expandafter\SK@@ref\expandafter{#1}%
\SK@HAR@checkdef{#1}{#2}}%
\expandafter\let\expandafter
\SK@HAR@bi\csname\string\harvarditem\endcsname
\expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%
\SK@HAR@bi[#1]{#2}{#3}{#4}\SK@\SK@@label{#4}}%
\fi}
\def\SK@citea#1#2{%
\SK@\SK@@ref{#2}\SK@cite#1{#2}}
\fi
\def\SK@@ref#1>#2\SK@{%
\leavevmode\vbox to\z@{%
\vss
\SK@refcolor
\rlap{\vrule\raise .75em%
\hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}}
\endinput
%%
%% End of file `showkeys.sty'.
|