diff options
author | Karl Berry <karl@freefriends.org> | 2006-08-27 18:13:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-08-27 18:13:13 +0000 |
commit | 617dae2d7d395ded39239d68c56768ed4342aa20 (patch) | |
tree | 796af9bd91ea6e9164019d9a79b0a635795f13be /Master/texmf-dist/tex/latex/tools/showkeys.sty | |
parent | eda6bc9ada7e4f5e901c11203666f0d3f0caa719 (diff) |
latex required package tools update from latex-tds (27aug06)
git-svn-id: svn://tug.org/texlive/trunk@2039 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tools/showkeys.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tools/showkeys.sty | 130 |
1 files changed, 85 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/tools/showkeys.sty b/Master/texmf-dist/tex/latex/tools/showkeys.sty index 3fa750dec20..04a6723e820 100644 --- a/Master/texmf-dist/tex/latex/tools/showkeys.sty +++ b/Master/texmf-dist/tex/latex/tools/showkeys.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 +%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% @@ -16,12 +16,12 @@ %% -------------------------------------------------------------------------- %% %% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 +%% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2003/12/01 or later. +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. %% %% This file may only be distributed together with a copy of the LaTeX %% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' @@ -31,9 +31,10 @@ %% given in the file `manifest.txt'. %% %% File: showkeys.dtx Copyright (C) 1992-1997 David Carlisle +%% File: showkeys.dtx Copyright (C) 2006 David Carlisle, LaTeX3 Project \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{showkeys} - [1997/06/12 v3.12 Show cite and label keys (DPC)] + [2006/01/09 v3.13 Show cite and label keys (DPC)] \DeclareOption{notref}{\let\SK@ref\@empty} \DeclareOption{notcite}{\let\SK@cite\@empty} \let\SK@refcolor\relax @@ -64,9 +65,10 @@ \def\SK@#1#2{% \protected@edef\@tempa{#2}% \expandafter#1\meaning\@tempa\SK@} +\providecommand*\showkeyslabelformat[1]{% + \fbox{\normalfont\small\ttfamily#1}} \def\SK@@label#1>#2\SK@{% - \gdef\SK@lab{\smash{\SK@labelcolor\fbox{% - \normalfont\small\ttfamily#2}}}% + \gdef\SK@lab{\smash{\SK@labelcolor\showkeyslabelformat{#2}}}% \ifvmode \if@inlabel \global\setbox\@labels\hbox{% @@ -108,33 +110,63 @@ \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} + \@ifpackageloaded{amsmath}{% + \let\SK@tagform@\tagform@ + \let\SK@maketag@@@\maketag@@@ + \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\maketag@@@#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@maketag@@@{#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\maketag@@@#1{% + \ifx\df@label\@empty + \SK@lab@relax + \else + \expandafter\SK@@label\meaning\df@label\SK@ + \fi + \SK@maketag@@@{#1}% + \rlap{\kern\marginparsep\SK@lab}\SK@lab@relax + }% + \def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}% + \SK@lab@relax}% + \fi + }% + {% + \@ifundefined{ver@leqno.clo}{% + \def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}% + \SK@lab@relax}% + }{% + \def\@eqnnum{% + \llap{\SK@lab\kern\displaywidth\kern\marginparsep}% + \SK@lab@relax\SK@eqnnum}% + }% + }% +} \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 @@ -149,6 +181,12 @@ \let\SK@gather\SK@equationtrue \let\SK@multline\SK@equationtrue \let\SK@flalign\SK@equationtrue +\expandafter\let\csname SK@align*\endcsname\SK@equationtrue +\expandafter\let\csname SK@alignat*\endcsname\SK@equationtrue +\expandafter\let\csname SK@flalign*\endcsname\SK@equationtrue +\expandafter\let\csname SK@gather*\endcsname\SK@equationtrue +\expandafter\let\csname SK@multline*\endcsname\SK@equationtrue +\expandafter\let\csname SK@equation*\endcsname\SK@equationtrue \def\SK@def#1{% \edef\@tempa{\expandafter\@gobble\string#1}% \@ifundefined{\@tempa\space}% @@ -160,28 +198,30 @@ \expandafter\def\csname\@tempa\space\endcsname} \ifx\SK@ref\@empty \AtBeginDocument{% - \ifx\vpageref\@undefined\else + \@ifpackageloaded{varioref}{% \SK@def\@@vpageref#1[#2]#3{{% \let\label\SK@label \SK@@@vpageref#1[#2]{#3}}}% - \DeclareRobustCommand\vref[1]{% - \unskip~\ref{#1}% + \def\vr@f#1{% + \leavevmode\unskip\vref@space + \ref{#1}% {\let\label\SK@label - \SK@@@vpageref\unskip[\unskip\space]{#1}}}% - \fi} + \vpageref[\unskip]{#1}}}% + }{}} \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 + \@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}}}% - \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} + \def\vr@f#1{% + \leavevmode\unskip\vref@space + \ref{#1}% + \let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref + \vpageref[\unskip]{#1}}% + }{}} \fi \ifx\SK@cite\@empty \AtBeginDocument{% |