summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx')
-rw-r--r--Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx200
1 files changed, 95 insertions, 105 deletions
diff --git a/Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx b/Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx
index 56d623f7015..9a6c7b251ff 100644
--- a/Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx
+++ b/Master/texmf-dist/source/latex/amsrefs/amsrefs.dtx
@@ -1,35 +1,37 @@
-%%% ====================================================================
-%%% @LaTeX-doc-source-file{
-%%% filename = "amsrefs.dtx",
-%%% version = "2.03",
-%%% date = "2007/10/22",
-%%% time = "10:22:13 EDT",
-%%% author = "Michael J Downes and David M. Jones",
-%%% address = "American Mathematical Society,
-%%% Publications Technical Group,
-%%% PO Box 6248,
-%%% Providence, RI 02940,
-%%% USA",
-%%% email = "tech-support@ams.org",
-%%% URL = "http://www.ams.org/",
-%%% abstract = "A LaTeX package that permits bibliography style
-%%% to be controlled completely from the LaTeX side
-%%% instead of being determined chiefly by the BibTeX
-%%% style file.",
-%%% copyright = "Copyright 2001, 2004, 2006, 2007 American
-%%% Mathematical Society.",
-%%% license = "Unlimited copying and redistribution of this file
-%%% are permitted as long as this file is not
-%%% modified. Modifications, and distribution of
-%%% modified versions, are permitted, but only if
-%%% the resulting file is renamed.",
-%%% checksum = "57935 8186 25806 247374",
-%%% docstring = "The checksum field, produced by Robert Solovay's
-%%% checksum utility, gives CRC-16 checksum, lines,
-%%% words, and characters.",
-%%% }
-%%% ====================================================================
-%%%
+% \def\filename{amsrefs.dtx}
+% \def\fileversion{2.09}
+% \def\filedate{2010/08/17}
+%
+% \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 2001, 2004, 2006, 2007, 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>
\NeedsTeXFormat{LaTeX2e}
@@ -39,7 +41,7 @@
\setcounter{tocdepth}{3}
\DoNotIndex{\bib,\BibSpec,\@apply,\citesel,\cite@cj,\cite}
-\DoNotIndex{\IfOption,\add@toks@,\@emptytoks,\@temptokenb}
+\DoNotIndex{\IfOption,\add@toks@,\@emptytoks}
\makeatletter
\DeclareRobustCommand{\fld}{\category@index{field}}
@@ -52,28 +54,6 @@
\usepackage{amsrefs}
\usepackage{multicol}
-\providecommand{\lat}[1]{\protect\LaTeX{}}
-
-\DeclareTextSymbol{\lbracechar}{OT1}{123}
-\DeclareTextSymbolDefault{\lbracechar}{OT1}
-\DeclareTextSymbol{\rbracechar}{OT1}{125}
-\DeclareTextSymbolDefault{\rbracechar}{OT1}
-
-\newcommand{\rdag}{{\normalfont\dag}}
-
-\providecommand{\embrace}[1]{%
- \begingroup \ntt\lbracechar#1\rbracechar\endgroup}
-
-% One mandatory argument: cnm; two: cnmm; one optional and one
-% mandatory: cnom; throwing in a star: cnsom; and so on.
-\providecommand{\cnbreak}{\penalty999\hskip0pt\relax}
-\providecommand{\cnm}[2]{\cn{#1}\cnbreak\embrace{#2}}
-\providecommand{\cnmm}[3]{\cn{#1}\cnbreak\embrace{#2}\cnbreak\embrace{#3}}
-\providecommand{\cnom}[1]{\cn{#1}\cnbreak\ommitude}
-\providecommand{\ommitude}[2][]{{\ntt[#1]}\cnbreak\embrace{#2}}
-\providecommand{\cnmsm}[4]{%
- \cn{#1}\cnbreak\embrace{#2}\cnbreak *\embrace{#4}}
-
\newcommand{\rpack}[1]{\pkg{amsrefs} package}
\newcommand{\MacroArgs}{%
@@ -88,13 +68,6 @@
\emph{Known bug:}}
{\endquote}
-% non-stupid hline: support for adding some space below
-\newcommand{\nshline}{\hline\omit\\}
-
-\newcommand{\SeveralOptions}[1]{%
- \vbox{\def\\{\unskip,\egroup\hbox\bgroup\ignorespaces}%
- \hbox{\strut#1}}}
-
% Make this a self-contained document without separate .bbl file.
\newcommand{\PrintBibliography}{%
\begin{bibsection}\begin{biblist}\raggedright
@@ -154,7 +127,7 @@
\title{The \pkg{amsrefs} package}
\author{Michael Downes and David M. Jones\\American Mathematical Society}
\date{Version \fileversion, \filedate}
-\hDocInput{amsrefs.dtx}
+\DocInput{amsrefs.dtx}
\PrintIndex
\end{document}
%</driver>
@@ -168,9 +141,9 @@
%
% \section{Introduction}
%
-% The \rpack/ is a \lat/ package for bibliographies that provides an
+% The \rpack/ is a \latex/ package for bibliographies that provides an
% archival data format similar to the format of \bibtex/ database
-% files, but adapted to make direct processing by \lat/ easier. The
+% files, but adapted to make direct processing by \latex/ easier. The
% package can be used either in conjunction with \bibtex/ or as a
% replacement for \bibtex/.
%
@@ -188,9 +161,9 @@
% \item[Preservation of structure]
%
% The internal structural information of the bibliography entries is not
-% lost when they are imported from the database file into the \lat/
+% lost when they are imported from the database file into the \latex/
% document. This takes on its greatest significance when archiving
-% documents in \lat/ form or transmitting them to another user (such as a
+% documents in \latex/ form or transmitting them to another user (such as a
% publisher).
%
% \item[Deferred formatting]
@@ -198,9 +171,9 @@
% This means that the style of the bibliography can be readily changed
% without reimporting everything from the original database(s).
%
-% \item[Setup requires only \lat/ knowledge]
+% \item[Setup requires only \latex/ knowledge]
%
-% All bibliography setup can be done in \lat/; learning another
+% All bibliography setup can be done in \latex/; learning another
% programming language (such as the one used in \bibtex/ \fn{bst}
% files) is unnecessary.
%
@@ -339,7 +312,7 @@
%
% If you use the \rpack/ as is, the bibliography style you get is the
% kind of style customarily seen in AMS publications. The recommended
-% way to get a different bibliography style is to write a \lat/
+% way to get a different bibliography style is to write a \latex/
% package which loads the \rpack/ with \cn{RequirePackage} and
% then makes the desired changes by using suitable \cn{BibSpec}
% commands as explained below. Thus, the general form of the custom
@@ -377,7 +350,7 @@
%
% It should be pretty obvious that each line specifies the formatting
% for a particular field. After reading the data for a particular
-% \cn{bib} command, \lat/ steps through the style specification and
+% \cn{bib} command, \latex/ steps through the style specification and
% for each
% field listed, prints the field with the given formatting \emph{if
% and only if the field has a nonempty value}. The \verb'+' character
@@ -421,7 +394,7 @@
% author={Bertram, A.},
% author={Wentworth, R.},
%\end{verbatim}
-% then the final value of the \fld{author} field seen when \lat/
+% then the final value of the \fld{author} field seen when \latex/
% processes the style specification will be
% \begin{verbatim}
% \name{Bertram, A.}\name{Wentworth, R.}
@@ -488,7 +461,7 @@
% These are for text subscripts
% and superscripts, with \cn{tprime} producing a superscript prime
% symbol. Unlike the standard \cn{textsuperscript} and
-% \cn{textsubscript} functions provided by \lat/, these do not use
+% \cn{textsubscript} functions provided by \latex/, these do not use
% math mode at all.\footnote{There is one drawback: If you don't
% want to get the prime symbol for \cn{tprime} from the \fnt{cmsy}
% font, you will need to redefine \cn{tprime} in some suitable
@@ -632,11 +605,11 @@
% It will be a while yet before we get to any actual code. First we
% need to understand what the code needs to accomplish in order to
% provide the user interface described above in a way that is as
-% compatible as possible with existing \lat/ mechanisms.
+% compatible as possible with existing \latex/ mechanisms.
%
-% \subsubsection{Normal \lat/ processing of cites}
+% \subsubsection{Normal \latex/ processing of cites}
%
-% \paragraph{First \lat/ pass}
+% \paragraph{First \latex/ pass}
%
% Various commands are written to the \fn{.aux} file that are
% mostly used by \bibtex/.
@@ -646,7 +619,7 @@
% include `moo' in the list of cited items to be searched for.
% The \cn{cite} command also checks to see if \cs{b@moo} contains
% the corresponding citation label, but since this is the first
-% pass, the label won't be known yet, so \lat/ emits an `Undefined
+% pass, the label won't be known yet, so \latex/ emits an `Undefined
% citation' warning and prints a placeholder (i.e., \textbf{???})
% instead of the citation label.
%
@@ -671,7 +644,7 @@
%
% For a document named \fn{xyz.tex}, the command \verb'bibtex xyz' is
% used to invoke \bibtex/. It looks in \fn{xyz.aux} to find the
-% citation information written there by \lat/. For each \cn{citation} line,
+% citation information written there by \latex/. For each \cn{citation} line,
% \bibtex/ searches for a corresponding entry in the specified
% \fn{.bib} files and formats it. The entire list is then sorted in
% whatever way dictated by the bibliography style, and written out to
@@ -683,18 +656,18 @@
% Springer Verlag, New York (1995).
%\end{verbatim}
%
-% \paragraph{Second \lat/ pass}
+% \paragraph{Second \latex/ pass}
%
% Now the \fn{.bbl} file exists and contains some \cn{bibitem}
-% commands. At \cnm{begin}{document}, \lat/ reads the \fn{.aux} file,
+% commands. At \cnm{begin}{document}, \latex/ reads the \fn{.aux} file,
% hoping to find some \cn{bibcite} commands, but it will not find
% them until the next time around. \cn{citation}, \cn{bibstyle}, and
-% \cn{bibdata} commands in the \fn{.aux} file are simply ignored by \lat/.
-% Then \lat/ proceeds to typeset the body of the document.
+% \cn{bibdata} commands in the \fn{.aux} file are simply ignored by \latex/.
+% Then \latex/ proceeds to typeset the body of the document.
% \begin{enumerate}
% \item Instances of \cn{cite} still print question marks.
%
-% \item The \cn{bibliography} command causes \lat/ to input \fn{xyz.bbl}
+% \item The \cn{bibliography} command causes \latex/ to input \fn{xyz.bbl}
% and typeset its contents.
%
% \item A \cnm{bibitem}{moo} command writes one line to the
@@ -707,16 +680,16 @@
%
% \end{enumerate}
%
-% \paragraph{Third \lat/ pass}
+% \paragraph{Third \latex/ pass}
%
% Now the \fn{.aux} file contains some \cn{bibcite} commands. Once again,
-% \lat/ reads the \fn{.aux} file when it reaches \cnm{begin}{document}.
+% \latex/ reads the \fn{.aux} file when it reaches \cnm{begin}{document}.
% \begin{enumerate}
%
-% \item A \cnmm{bibcite}{moo}{Moody} causes \lat/ to define \cs{b@moo}
+% \item A \cnmm{bibcite}{moo}{Moody} causes \latex/ to define \cs{b@moo}
% with `Moody' as the replacement text.
%
-% \item If two \cn{bibcite} commands have the same citation key, \lat/
+% \item If two \cn{bibcite} commands have the same citation key, \latex/
% gives a warning message. This happens at \cnm{begin}{document},
% during the reading of the \fn{.aux} file.
%
@@ -724,7 +697,7 @@
% the appropriate labels obtained from the \fn{.aux} file.
%
% \item If there are any \cn{cite} commands for which the \fn{.aux} file did
-% not have a \cn{bibcite} command, \lat/ will give an `Undefined
+% not have a \cn{bibcite} command, \latex/ will give an `Undefined
% citation' warning. This often happens if the \fn{.aux} file is incomplete
% due to a \TeX{} error on the preceding pass.
% \end{enumerate}
@@ -861,7 +834,7 @@
% Standard declaration of package name and date.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{amsrefs}[2007/10/22 v2.03]
+\ProvidesPackage{amsrefs}[2010/08/17 v2.09]
% \end{macrocode}
%
% \begin{macro}{\amsrefs@warning@nl}
@@ -1038,7 +1011,7 @@
%
% \begin{macro}{\get@numberof}
% This is a generic macro for counting the number of elements in a
-% \lat/-style list.
+% \latex/-style list.
% The first argument is a \cs{count} register that will receive the
% final count; the second argument is the control sequence that
% separates elements of the list, and the third argument is the
@@ -1857,7 +1830,7 @@
% The \env{biblist} environment can be used with a section or chapter
% heading.
%
-% Use a standard \lat/ counter for numbering bibliography items.
+% Use a standard \latex/ counter for numbering bibliography items.
% \begin{macrocode}
\newcounter{bib}
% \end{macrocode}
@@ -1883,12 +1856,20 @@
% \end{macrocode}
% \end{environment}
%
+% \begin{macro}{\biblistfont}
+% \begin{macrocode}
+\newcommand{\biblistfont}{%
+ \normalfont
+ \footnotesize
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@biblist}
% \begin{macrocode}
\newcommand\@biblist[1][]{%
\stepcounter{bib@env}
- \normalfont
- \footnotesize
+ \biblistfont
\labelsep .5em\relax
\list{\BibLabel}{%
\restore@labelwidth
@@ -2000,7 +1981,9 @@
% \begin{macro}{\BibLabel}
% \begin{macrocode}
\newcommand{\BibLabel}{%
- [\hyper@anchorstart{cite.\CurrentBib}\relax\thebib\hyper@anchorend]%
+ \hfill
+ \Hy@raisedlink{\hyper@anchorstart{cite.\CurrentBib}\hyper@anchorend}%
+ [\thebib]%
}
% \end{macrocode}
% \end{macro}
@@ -2830,7 +2813,7 @@
% Also, the way that the \cn{selectlanguage} command checks to see
% whether a language has been properly defined for babel use is to
% see if \cs{dateLANGUAGE} is defined. And if we tried to select an
-% undefined language, the result would be a \lat/ error.
+% undefined language, the result would be a \latex/ error.
% \begin{macrocode}
\def\bib@selectlanguage{%
\@ifsame@patterns{\languagename}{\bib@language}{}{%
@@ -3196,7 +3179,7 @@
% If you have a file that contains \pkg{amsrefs}-style
% \cn{bib} entries, you can use it as a database and extract items
% from it for use in another document. In typical relatively simple
-% scenarios, the extraction can be done by \lat/ itself on the first
+% scenarios, the extraction can be done by \latex/ itself on the first
% pass, so that citations in the text will be successfully resolved
% on the second pass (possibly even the first, depending on what kind
% of bibliography sorting is used).
@@ -3429,7 +3412,7 @@
% The second status flag is~1 if this key has already been used by a
% define-cite command (such as \cn{bib}); 0~otherwise. This makes it
% possible to issue a warning message as soon as the conflict is seen,
-% on the first \lat/ run, instead of on a subsequent run during the
+% on the first \latex/ run, instead of on a subsequent run during the
% processing of the \fn{.aux} file.
%
% When an author/year citation scheme is in use, args 3 and~4 hold
@@ -3480,7 +3463,7 @@
% -> \cite@bc\b@xyz\citesel{blub}
%\end{verbatim}
%
-% Canceling the old \lat/ definition of \verb*'\cite ' prevents
+% Canceling the old \latex/ definition of \verb*'\cite ' prevents
% certain problems that could arise with the \pkg{showkeys} package.
% \begin{macrocode}
\expandafter\let\csname cite \endcsname\relax
@@ -4512,14 +4495,20 @@
%
% \begin{macro}{\shade@cite}
% \begin{macrocode}
-\newcommand{\shade@cite}{\overshadebox{shaderef-gray}}
+\newcommand{\shade@cite}{\printref}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\format@cite}
+% \begin{macrocode}
+\def\format@cite#1{\shade@cite{\citeform{#1}}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ar@hyperlink}
% \begin{macrocode}
\def\ar@hyperlink#1{%
- \hyper@@link [cite]{}{cite.\extr@cite#1}{\shade@cite{#1}}%
+ \hyper@@link[cite]{}{cite.\extr@cite#1}{\format@cite{#1}}%
}
% \end{macrocode}
% \end{macro}
@@ -4535,12 +4524,13 @@
% \begin{macrocode}
\AtBeginDocument{%
\@ifpackageloaded{shaderef}{}{%
- \let\shade@cite\@empty
+ \let\shade@cite\@firstofone
}%
\@ifpackageloaded{hyperref}{}{%
- \let\ar@hyperlink\shade@cite
+ \def\ar@hyperlink{\format@cite}%
\let\hyper@anchorstart\@gobble
\let\hyper@anchorend\relax
+ \let\Hy@raisedlink\@firstofone
}%
\@ifpackageloaded{showkeys}{%
\@ifpackagewith{showkeys}{notcite}{%
@@ -6953,7 +6943,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@scanforMR}
+% \begin{macro}{\strip@MRprefix}
% \begin{macrocode}
\def\strip@MRprefix#1#2#3#4\@nil{%
\def\@tempa{#1#2#3#4}%
@@ -7687,7 +7677,7 @@
% \begin{macro}{\BibLabel}
% \begin{macrocode}
\def\BibLabel{%
- \hyper@anchorstart{cite.\CurrentBib}\relax\hyper@anchorend
+ \Hy@raisedlink{\hyper@anchorstart{cite.\CurrentBib}\relax\hyper@anchorend}%
}
% \end{macrocode}
% \end{macro}
@@ -8182,5 +8172,5 @@
\endinput
% \end{macrocode}
%
-% \CheckSum{5139}
+% \CheckSum{5151}
% \Finale