From c2dd4a1f282809d86d6dce3fca10225d9da37a3f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 9 Jun 2016 22:09:12 +0000 Subject: showlabels (9jun16) git-svn-id: svn://tug.org/texlive/trunk@41322 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/showlabels/showlabels.drv | 20 +++--- .../source/latex/showlabels/showlabels.dtx | 77 +++++++++++++--------- 2 files changed, 59 insertions(+), 38 deletions(-) (limited to 'Master/texmf-dist/source/latex/showlabels') diff --git a/Master/texmf-dist/source/latex/showlabels/showlabels.drv b/Master/texmf-dist/source/latex/showlabels/showlabels.drv index 6baee82ff31..f5130ade0d9 100644 --- a/Master/texmf-dist/source/latex/showlabels/showlabels.drv +++ b/Master/texmf-dist/source/latex/showlabels/showlabels.drv @@ -8,12 +8,12 @@ %% Showlabels: Style to display labels in the margin %% This is the showlabels package %% -%%%% Copyright 1999, 2001--09, 2013--15, Norman Gray +%%%% Copyright 1999, 2001-09, 2013-16, Norman Gray %% %% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in +%% conditions of the LaTeX Project Public Licence, either version 1.3 +%% of this licence or (at your option) any later version. +%% The latest version of this licence is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. @@ -23,11 +23,15 @@ %% The Current Maintainer of this work is Norman Gray %% %% This work consists of the files showlabels.dtx and showlabels.ins, -%% and the derived file showlabels.cls. +%% and the derived file showlabels.sty. + +%%%% File: showlabels.dtx +%%%% Source: 95a544e6b41b, 2016-06-09T16:51:03+01:00 + \def\filename{showlabels} -\def\fileversion{1.7} -\def\filedate{2015/12/08} -\def\docdate{2015 December 8} +\def\fileversion{1.8} +\def\filedate{2016/06/09} +\def\docdate{2016 June 9} \def\filemaintainer{norman@astro.gla.ac.uk} \documentclass{ltxdoc} \EnableCrossrefs diff --git a/Master/texmf-dist/source/latex/showlabels/showlabels.dtx b/Master/texmf-dist/source/latex/showlabels/showlabels.dtx index ec9053b780e..3a2c4579653 100644 --- a/Master/texmf-dist/source/latex/showlabels/showlabels.dtx +++ b/Master/texmf-dist/source/latex/showlabels/showlabels.dtx @@ -2,12 +2,12 @@ % %% This is the showlabels package %% -%%%% Copyright 1999, 2001--09, 2013--15, Norman Gray +%%%% Copyright 1999, 2001-09, 2013-16, Norman Gray %% %% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3 -%% of this license or (at your option) any later version. -%% The latest version of this license is in +%% conditions of the LaTeX Project Public Licence, either version 1.3 +%% of this licence or (at your option) any later version. +%% The latest version of this licence is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. @@ -17,14 +17,17 @@ %% The Current Maintainer of this work is Norman Gray %% %% This work consists of the files showlabels.dtx and showlabels.ins, -%% and the derived file showlabels.cls. -% +%% and the derived file showlabels.sty. + +%%%% File: showlabels.dtx +%%%% Source: 95a544e6b41b, 2016-06-09T16:51:03+01:00 + \def\filename{showlabels} -\def\fileversion{1.7} -\def\filedate{2015/12/08} -\def\docdate{2015 December 8} +\def\fileversion{1.8} +\def\filedate{2016/06/09} +\def\docdate{2016 June 9} \def\filemaintainer{norman@astro.gla.ac.uk} -% This is revision aa6f5b4db751, 2015-12-08. +% This is revision 95a544e6b41b, 2016-06-09T16:51:03+01:00. %<+package>\NeedsTeXFormat{LaTeX2e} %<+package>\ProvidesPackage{showlabels}[\filedate\space v\fileversion] %<+package>\typeout{Package: `showlabels' v\fileversion\space<\filedate>} @@ -177,9 +180,7 @@ % \subsection*{Compatibility with other packages, and other problems} % % The \Lpackage{showlabels} package works by redefining the |\label| -% command, along with the internal \LaTeX\ commands |\@eqnnum|, -% |\@makecaption| and -% |\maketag@@@| (for \Lpackage{amsmath}). All the other commands it +% command, along with a few internal \LaTeX\ commands. All the other commands it % defines are `hidden' by prefixing them with `\texttt{SL@}', with % the exception of the user commands |\showlabelfont| and % |\showlabelsetlabel|. Each of @@ -243,19 +244,24 @@ % The package might still work with \LaTeX2.09, but that's neither % supported, nor even still tested. % -% This software is copyright, 1999, 2001--09, 2013--15 Norman Gray. +% This software is copyright, 1999, 2001--09, 2013--16 Norman Gray. % It is released under the terms of the LaTeX Project Public Licence. % See the copyright declaration at the top of file \texttt{showlabels.dtx}, -% and the file \texttt{lppl}, for the licence conditions. +% and the file \texttt{lppl.txt}, for the licence conditions. % % The canonical home page of the package is % \url{http://purl.org/nxg/dist/showlabels}, and it is on CTAN at -% \url{/macros/latex/contrib/supported/showlabels/}. +% \url{https://www.ctan.org/pkg/showlabels}. The source is in +% a repository at Bitbucket: \url{https://bitbucket.org/nxg/showlabels/}. % % \subsection*{Other packages} % -% David Carlisle's \Lpackage{showkeys} does roughly the same thing, but -% it will only handle |\label| and |\cite| keys. +% The \Lpackage{showlabels} package has a large overlap in +% functionality with David Carlisle's \Lpackage{showkeys}, although +% the latter will only handle |\label| and |\cite| keys. If +% \Lpackage{showlabels} fails in some particular situation, you might +% want to try using \Lpackage{showkeys}, but please do mention the +% problem, either by email to me, or via the Bitbucket issues list. % % \subsection*{History and Credits} % @@ -280,6 +286,7 @@ % Ignacy Sawicki, % Andrei Shelankov, % Patrick Sibille, +% `Stirling' (on Stackexchange), % Mariano Su\'arez-Alvarez, % Ji\v ri Vesely, % Elmar Walhorn, @@ -326,7 +333,7 @@ {\SL@AMStrue\typeout{with amsmath equation tags}} % \end{macrocode} % -% The command which sets equationn text is |\SL@eqntext|, which tests +% The command which sets equation text is |\SL@eqntext|, which tests % whether the content should be inline or not. % \begin{macrocode} \def\SL@eqntext{% @@ -370,13 +377,13 @@ % \end{macrocode} % % \Lpackage{amsmath} redefines |\label| to set the macro |\df@label|, -% and then uses |\maketag@@@{\df@label}|, to form tags (ie, equation -% labels) in equations. So we hook into the |\maketag@@@| macro. -% If the |\df@label| is +% and then uses |\maketag@@@{\df@label}| or |\tagform@| to form tags +% (ie, equation labels) in equations. So we hook into \emph{both} of +% these macros. If the |\df@label| is % empty (almost certainly because the user has used the % \Lenv{eqnarray} environment within \Lpackage{amsmath}), then fall back % on the |\SL@labelname| contents instead. -% \iffalse See tests t2 and t11\fi +% \iffalse See tests t2, t11 and t18. \fi % We must make sure to leave |\SL@labelname| equal to |\relax| at the % end of this macro, otherwise a |{eqnarray}| followed by an (AMSTeX) % |\eqref| can end up with the wrong label being referred to by the @@ -388,13 +395,11 @@ % latter evaluates to true when |\SL@...| is |\relax| \emph{and} when % |\SL@...| starts with two identical characters, which is wrong (it % took embarrassingly many goes to get this right). The following is -% similar to the effect of |\SL@wrap@labeller|, but not quite, -% because (a) |\maketag@@@| takes an argument, and (b) we also have to -% check |\df@label|. +% similar to the effect of |\SL@wrap@labeller|, but is not quite identical, +% because (a) |\maketag@@@| and |\tagform@| take an argument, +% and (b) we also have to check |\df@label|. % \begin{macrocode} - \let\SL@orig@maketag@@@=\maketag@@@ - \def\SL@maketag@@@#1{% - \SL@orig@maketag@@@{#1}% + \def\SL@setlabel@ams{% \ifx\df@label\@empty \ifx\SL@labelname\relax % do nothing @@ -406,6 +411,16 @@ \fi \global\let\SL@labelname\relax } + \let\SL@orig@maketag@@@=\maketag@@@ + \def\SL@maketag@@@#1{% + \SL@orig@maketag@@@{#1}% + \SL@setlabel@ams + } + \let\SL@orig@tagform@\tagform@ + \def\SL@tagform@#1{% + \SL@orig@tagform@{#1}% + \SL@setlabel@ams + } \else % \end{macrocode} % @@ -1034,7 +1049,9 @@ \ifx\showlabels\@gobble % do nothing -- we're in [final] mode (see test case t13) \else - \let\maketag@@@\SL@maketag@@@ + \AtBeginDocument{% + \let\maketag@@@\SL@maketag@@@ + \let\tagform@\SL@tagform@} \fi \fi \@ifundefined{theIEEEsubequationdis}\relax % and \theequationdis -- cgit v1.2.3