summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/amscls/upref.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-07 21:56:51 +0000
committerKarl Berry <karl@freefriends.org>2014-08-07 21:56:51 +0000
commit1cd7d0593b789a713e7e40d41871c7b0e44396ce (patch)
treecc44e378e9a284e12039c4656695e1d4b60e8505 /Master/texmf-dist/source/latex/amscls/upref.dtx
parent94965adad023c311265b401a1e7bef667d92d745 (diff)
amscls (5aug14)
git-svn-id: svn://tug.org/texlive/trunk@34870 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/amscls/upref.dtx')
-rw-r--r--Master/texmf-dist/source/latex/amscls/upref.dtx102
1 files changed, 58 insertions, 44 deletions
diff --git a/Master/texmf-dist/source/latex/amscls/upref.dtx b/Master/texmf-dist/source/latex/amscls/upref.dtx
index 843126b3b58..2f2fad55723 100644
--- a/Master/texmf-dist/source/latex/amscls/upref.dtx
+++ b/Master/texmf-dist/source/latex/amscls/upref.dtx
@@ -1,42 +1,36 @@
-%%% ====================================================================
-%%% @LaTeX-file{
-%%% filename = "upref.dtx",
-%%% version = "2.01",
-%%% date = "2004/07/29",
-%%% time = "16:37:01 EDT",
-%%% checksum = "07926 151 617 5530",
-%%% author = "American Mathematical Society",
-%%% copyright = "Copyright 1996 American Mathematical Society,
-%%% all rights reserved. Copying of this file is
-%%% authorized only if either:
-%%% (1) you make absolutely no changes to your copy,
-%%% including name; OR
-%%% (2) if you do make changes, you first rename it
-%%% to some other name.",
-%%% address = "American Mathematical Society,
-%%% Technical Support,
-%%% Electronic Products and Services,
-%%% P. O. Box 6248,
-%%% Providence, RI 02940,
-%%% USA",
-%%% telephone = "401-455-4080 or (in the USA and Canada)
-%%% 800-321-4AMS (321-4267)",
-%%% FAX = "401-331-3842",
-%%% email = "tech-support@ams.org (Internet)",
-%%% codetable = "ISO/ASCII",
-%%% keywords = "latex, amslatex, ams-latex, cross references",
-%%% supported = "yes",
-%%% abstract = "This is a LaTeX package that provides printing
-%%% of \cn{ref}s in an upright font even if the
-%%% current context is italic or slanted.",
-%%% docstring = "The checksum field above contains a CRC-16
-%%% checksum as the first value, followed by the
-%%% equivalent of the standard UNIX wc (word
-%%% count) utility output of lines, words, and
-%%% characters. This is produced by Robert
-%%% Solovay's checksum utility.",
-%%% }
-%%% ====================================================================
+% \def\filename{upref.dtx}
+% \def\fileversion{2.04}
+% \def\filedate{2007/03/14}
+%
+% \iffalse meta-comment
+%
+% American Mathematical Society
+% Technical Support
+% Publications Technical Group
+% 201 Charles Street
+% Providence, RI 02904
+% USA
+% tel: (401) 455-4080
+% (800) 321-4267 (USA and Canada only)
+% fax: (401) 331-3842
+% email: tech-support@ams.org
+%
+% Copyright 1996, 2010 American Mathematical Society.
+%
+% This work may be distributed and/or modified under the
+% 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.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is the American Mathematical
+% Society.
+%
+% \fi
%
%\iffalse
%<*driver>
@@ -46,7 +40,7 @@
\author{American Mathematical Society\\ Michael Downes\\
updated by Barbara Beeton}
\date{Version \fileversion, \filedate}
-\hDocInput{upref.dtx}
+\DocInput{upref.dtx}
\end{document}
%</driver>
%\fi
@@ -69,7 +63,7 @@
% Give package name, date, version.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
-\ProvidesPackage{upref}[2004/07/29 v2.01]
+\ProvidesPackage{upref}[2007/03/14 v2.04]
% \end{macrocode}
%
% \begin{macro}{\@noref}
@@ -94,17 +88,37 @@
% control sequences that \pkg{hyperref} defined in order to get
% upright references even in a \pkg{hyperref} environment.
% [tjk,bnb, 2004/07/29]
+%
+% Get around a restriction in an internal AMS package (shaderef) by
+% equating its command \cs{printref} to \cn{textup}; this applies
+% consistently regardless of other circumstances that have unwanted
+% effects. [dmj,bnb, 2005/05/17]
% \begin{macrocode}
\AtBeginDocument{%
+ \providecommand\printref{\textup}%
\@ifpackageloaded{hyperref}{%
% \end{macrocode}
% We overload \cs{Hy@setref@link} as this is where the upright
% references get clobbered. Used in overloaded \cs{@setref}.
+% \cs{sw@slant} is usually applied by \cn{textup}, but the specials
+% inserted by the hyperlink get in the way of testing for whether
+% an italic correction is necessary; restore the test.
+% [dmj,bnb, 2005/09/22]
+%
+% If the link happens to be at the beginning of a paragraph,
+% \cs{sw@slant} will produce an error, since neither \unpenalty
+% nor a check for italic correction is valid in vertical mode.
+% For reasons not apparent, this may also occur in some other
+% situations, e.g., following a proof heading containing a cross
+% reference (jams561el). Add \cn{leavevmode} to compensate.
+% [dmj,bnb, 2007/02/14]
% \begin{macrocode}
\def\Hy@setref@link#1#2#3#4#5#6\@nil#7{%
\begingroup
+ \leavevmode
+ \sw@slant
\toks0{\hyper@@link{#5}{#4}}%
- \toks1\@xp{#7{\textup{#1}\hbox{}}{#2}{#3}{#4}{#5}}%
+ \toks1\@xp{#7{\printref{#1}\hbox{}}{#2}{#3}{#4}{#5}}%
\edef\x{\endgroup\the\toks0{\the\toks1}}\x
}%
% \end{macrocode}
@@ -123,7 +137,7 @@
\def\@setref#1#2#3{\ifx#1\relax
\protect\@noref{#3}%
\else
- \protect\textup{\@xp#2#1\hbox{}}%
+ \protect\printref{\@xp#2#1\hbox{}}%
\fi
}%
}%
@@ -147,5 +161,5 @@
\endinput
% \end{macrocode}
%
-% \CheckSum{61}
+% \CheckSum{66}
% \Finale