diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/tools/showkeys.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/tools/showkeys.dtx | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/tools/showkeys.dtx b/Master/texmf-dist/source/latex/tools/showkeys.dtx index 9a3c1fcc5c8..4e55633b15d 100644 --- a/Master/texmf-dist/source/latex/tools/showkeys.dtx +++ b/Master/texmf-dist/source/latex/tools/showkeys.dtx @@ -1,6 +1,7 @@ % \iffalse meta-comment % -% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 +% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 +% 2006 2008 2009 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -21,7 +22,7 @@ % \fi % \iffalse %% File: showkeys.dtx Copyright (C) 1992-1997 David Carlisle -%% File: showkeys.dtx Copyright (C) 2006 David Carlisle, LaTeX3 Project +%% File: showkeys.dtx Copyright (C) 2006-2007 David Carlisle, LaTeX3 Project % %<*dtx> \ProvidesFile{showkeys.dtx} @@ -31,7 +32,7 @@ %<driver> \ProvidesFile{showkeys.drv} % \fi % \ProvidesFile{showkeys.dtx} - [2006/01/09 v3.13 Show cite and label keys (DPC)] + [2007/08/07 v3.15 Show cite and label keys (DPC, MH)] % % \iffalse %<*driver> @@ -51,13 +52,13 @@ % \title{The \textsf{showkeys} package\thanks{This file % has version number \fileversion, last % revised \filedate.}} -% \author{David Carlisle} +% \author{David Carlisle \and Morten H\o gholm} % \date{\filedate} % \maketitle % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% \CheckSum{592} +% \CheckSum{596} % % % \changes{v1.01}{1992/08/25}{Initial version} @@ -298,10 +299,14 @@ % % \changes{v3.04}{1995/10/30} % {final and draft options handling.} +% \changes{v3.15}{2007/08/07} +% {Fix \cs{showkeyslabelformat} for final option PR/3918.} % Allow |final| to be specified in the document class options % to supress the loading of this package. % \begin{macrocode} -\DeclareOption{final}{\endinput} +\DeclareOption{final}{% + \providecommand*\showkeyslabelformat[1]{}% + \endinput} \DeclareOption{draft}{} % \end{macrocode} % @@ -355,7 +360,7 @@ % % \begin{macrocode} \def\@lbibitem[#1]#2{% - \SK@lbibitem[#1]{#2}\SK@\SK@@label{#2}\ignorespaces} + \SK@lbibitem[{#1}]{#2}\SK@\SK@@label{#2}\ignorespaces} % \end{macrocode} % \end{macro} % \end{macro} @@ -452,11 +457,13 @@ % \end{macrocode} % \changes{v3.10}{1996/09/06} % {Inner vertical mode case, put it in the margin.} +% \changes{v3.14}{2006/09/25} +% {The label put in the margin shouldn't make box 255 wider (PR/3884).} % \begin{macrocode} \ifvoid\z@ \llap{\SK@lab\SK@lab@relax\kern\marginparsep}% \else - \hbox{\box\z@\kern\marginparsep\SK@labx}% + \hbox{\box\z@\rlap{\kern\marginparsep\SK@labx}}% \fi \vskip\skip@ \else @@ -740,12 +747,14 @@ % {improve varioref support in notref option case, for % tools/1744} % \changes{v3.13}{2006/01/09}{Updated varioref support, for latex/3373} +% \changes{v3.15}{2006/06/19} +% {Prevent loss of brackets} % \begin{macrocode} \AtBeginDocument{% \@ifpackageloaded{varioref}{% \SK@def\@@vpageref#1[#2]#3{{% \let\label\SK@label - \SK@@@vpageref#1[#2]{#3}}}% + \SK@@@vpageref{#1}[{#2}]{#3}}}% \def\vr@f#1{% \leavevmode\unskip\vref@space \ref{#1}% @@ -764,6 +773,8 @@ % {Delay \cs{ref} redefinition.} % \changes{v3.03}{1995/04/25} % {Make redefinition conditional on notref option} +% \changes{v3.15}{2006/06/19} +% {Prevent loss of brackets} % \begin{macrocode} \AtBeginDocument{% \SK@def\ref#1{\SK@\SK@@ref{#1}\SK@ref{#1}}% @@ -774,7 +785,7 @@ \@ifpackageloaded{varioref}{% \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}}}% + \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}% \def\vr@f#1{% \leavevmode\unskip\vref@space \ref{#1}% @@ -801,7 +812,7 @@ \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}}% + \SK@HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}% \fi} \else % \end{macrocode} @@ -850,7 +861,7 @@ % {Fix \cs{harvarditem} support} % \begin{macrocode} \expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{% - \SK@HAR@bi[#1]{#2}{#3}{#4}\SK@\SK@@label{#4}}% + \SK@HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}% \fi} % \end{macrocode} % @@ -865,15 +876,19 @@ % \end{macro} % % \begin{macro}{\SK@@ref} -% This is much simpler than the printing of the label, as we know that -% we can be in horizontal mode. +% This is much simpler than the printing of the label, as we know +% that we can be in horizontal mode. We temporarily set the switch +% \cs{if@inlabel} false in order to avoid problems with the pdf\TeX\ +% color driver. +% \changes{v3.14}{2006/09/25} +% {Add fix for pdf\TeX.} % \begin{macrocode} \def\SK@@ref#1>#2\SK@{% - \leavevmode\vbox to\z@{% + {\@inlabelfalse\leavevmode\vbox to\z@{% \vss \SK@refcolor \rlap{\vrule\raise .75em% - \hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}} + \hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}}} % \end{macrocode} % \end{macro} % |