diff options
author | Karl Berry <karl@freefriends.org> | 2013-02-01 23:59:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-02-01 23:59:33 +0000 |
commit | a70d6f1377ea01eeaff566f72280cb46ea5d7384 (patch) | |
tree | af0146af88e266455f770af56b2e5c66269144df /Master/texmf-dist/tex/latex/amsrefs | |
parent | 017f337f3d69a9d9c9d70b904a7a0a09f3b4331e (diff) |
amsrefs 2.12 (29jan13)
git-svn-id: svn://tug.org/texlive/trunk@29007 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/amsrefs')
-rw-r--r-- | Master/texmf-dist/tex/latex/amsrefs/amsbst.sty | 15 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/amsrefs/amsrefs.sty | 198 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/amsrefs/textcmds.sty | 30 |
3 files changed, 190 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/latex/amsrefs/amsbst.sty b/Master/texmf-dist/tex/latex/amsrefs/amsbst.sty index 3df94e71a53..d4ec93f0f2a 100644 --- a/Master/texmf-dist/tex/latex/amsrefs/amsbst.sty +++ b/Master/texmf-dist/tex/latex/amsrefs/amsbst.sty @@ -6,7 +6,7 @@ %% %% amsrefs.dtx (with options: `bst') %% -%% Copyright 2001, 2004, 2006, 2007, 2010, 2012 American Mathematical Society. +%% Copyright 2001, 2004, 2006, 2007, 2010, 2012, 2013 American Mathematical Society. %% %% American Mathematical Society %% Technical Support @@ -34,7 +34,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{amsbst}[2012/05/08 v2.10] +\ProvidesPackage{amsbst}[2013/01/16 v2.12] \BibSpec{article}{% +{} {\PrintAuthors} {author} +{.} { } {title} @@ -157,6 +157,17 @@ +{.} { } {note} +{.} {} {transition} } + +\BibSpec{webpage}{% + +{} {\PrintAuthors} {author} + +{.} { } {title} + +{:} { } {subtitle} + +{.} { \PrintDateB} {date} + +{.} { \url} {url} + +{.} { Accessed \PrintDateField} {accessdate} + +{.} { } {note} + +{.} {} {transition} +} \renewcommand{\PrintEditorsA}[1]{% \def\current@bibfield{\bib'editor}% \PrintNames{}{, editor\Plural{s}}{#1}% diff --git a/Master/texmf-dist/tex/latex/amsrefs/amsrefs.sty b/Master/texmf-dist/tex/latex/amsrefs/amsrefs.sty index fedd73ba008..96eaff49d00 100644 --- a/Master/texmf-dist/tex/latex/amsrefs/amsrefs.sty +++ b/Master/texmf-dist/tex/latex/amsrefs/amsrefs.sty @@ -6,7 +6,7 @@ %% %% amsrefs.dtx (with options: `pkg') %% -%% Copyright 2001, 2004, 2006, 2007, 2010, 2012 American Mathematical Society. +%% Copyright 2001, 2004, 2006, 2007, 2010, 2012, 2013 American Mathematical Society. %% %% American Mathematical Society %% Technical Support @@ -34,7 +34,7 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{amsrefs}[2012/05/08 v2.10] +\ProvidesPackage{amsrefs}[2013/01/16 v2.12] \def\amsrefs@warning@nl{\PackageWarningNoLine{amsrefs}} \@ifpackagewith{amsrefs}{beta}{% \amsrefs@warning@nl{The beta option is obsolete}% @@ -227,6 +227,7 @@ \DefineAdditiveKey{bib}{issn}{\fld@elt} \DefineAdditiveKey{bib}{review}{\fld@elt} \DefineAdditiveKey{bib}{partial}{\fld@elt} +\DefineSimpleKey{bib}{accessdate} \DefineSimpleKey{bib}{address} \DefineSimpleKey{bib}{book} \DefineSimpleKey{bib}{booktitle} @@ -490,6 +491,17 @@ +{.} {} {transition} +{} {\SentenceSpace \PrintReviews} {review} } + +\BibSpec{webpage}{% + +{} {\PrintAuthors} {author} + +{,} { \emph} {title} + +{:} { \emph} {subtitle} + +{} { \PrintDate} {date} + +{,} { \url} {url} + +{.} { Accessed \PrintDateField} {accessdate} + +{.} { } {note} + +{.} {} {transition} +} \BibSpecAlias{periodical}{book} \BibSpecAlias{collection}{book} \BibSpecAlias{proceedings}{book} @@ -514,6 +526,8 @@ +{,} { } {address} } \newcounter{bib} +\DefineSimpleKey{biblist}{prefix} +\DefineSimpleKey{biblist}{labels} \newenvironment{biblist}{% \setcounter{bib}\z@ \@biblist @@ -529,10 +543,34 @@ \normalfont \footnotesize } +\def\amsrefs@lbibitem[#1]#2{% + \begingroup + \def\CurrentBib{#2}% + \def\thebib{#1}% + \@nmbrlistfalse + \item\leavevmode + \if@filesw + {\let\protect\noexpand + \immediate\write\@auxout{\string\bibcite{#2}{{#1}{}}}}% + \fi + \endgroup + \ignorespaces +} + +\def\amsrefs@bibitem#1{% + \def\CurrentBib{#1}% + \item + \if@filesw + \immediate\write\@auxout{\string\bibcite{#1}{{\the\value{\@listctr}}{}}}% + \fi + \ignorespaces +} \newcommand\@biblist[1][]{% \stepcounter{bib@env} \biblistfont \labelsep .5em\relax + \let\@bibitem\amsrefs@bibitem + \let\@lbibitem\amsrefs@lbibitem \list{\BibLabel}{% \restore@labelwidth \@maxlabelwidth\z@ @@ -547,6 +585,20 @@ \widowpenalty\clubpenalty \frenchspacing \ResetCapSFCodes + \star@{\@biblistsetup}{}% +} +\newcommand{\@biblistsetup}[1]{% + \RestrictedSetKeys{}{biblist}{\the\rsk@toks}{#1}% + \rkvIfEmpty{biblist}{prefix}{}{% + \let\amsrefs@label@prefix\biblist'prefix + }% + \rkvIfEmpty{biblist}{labels}{}{% + \@ifundefined{amsrefs@option@\biblist'labels}{% + \amsrefs@warning{Invalid label style `\biblist'labels`}% + }{% + \csname amsrefs@option@\biblist'labels\endcsname + }% + }% } \def\@endbiblist{% \save@labelwidth @@ -617,10 +669,13 @@ }% } \newcommand{\BibItem}[2]{% - \def\@tempa{#1}% + \vdef\@tempa{#1}% + \edef\@tempa{% + \edef\@nx\@tempa{\@nx\@xp\@nx\zap@space\@tempa\space\@nx\@empty}% + }% + \@tempa \edef\@tempb{% - \@nx\@bibdef\@xp\@nx\csname setbib@#2\endcsname{#2}% - {\macrotext\@tempa}% + \@nx\@bibdef\@xp\@nx\csname setbib@#2\endcsname{#2}{\@tempa}% }% \@tempb } @@ -751,7 +806,6 @@ \afterassignment\@gobble \@xp\xdef\csname bi@#1\endcsname } -\def\numeric@refs{00} \def\bib@print#1#2#3{% \bib@start{#1}% \let\setbib@@#3% @@ -1043,6 +1097,34 @@ \let\generate@label\relax \def\cite@label{\@currentlabel} \let\alpha@label\relax +\def\alpha@label@{% + \ifx\@empty\bib'label + \def\thebib{\CurrentBib}% + \else + \let\thebib\bib'label + \fi +}% +\def\amsrefs@option@numeric{% + \let\alpha@label\relax + \let\generate@label\relax + % \@nmbrlisttrue +} +\def\amsrefs@option@alphabetic{% + \let\alpha@label\alpha@label@ + \let\generate@label\generate@alphalabel + \let\calc@author@part\calc@author@part@ + \let\@suffix@format\@alph + \let\append@label@year\append@label@year@ + % \@nmbrlistfalse +} +\def\amsrefs@option@shortalphabetic{% + \let\alpha@label\alpha@label@ + \let\generate@label\generate@alphalabel + \let\calc@author@part\calc@author@part@short + \let\@suffix@format\@arabic + \let\append@label@year\@empty + % \@nmbrlistfalse +} \def\bib@cite#1{% \def\CurrentBib{#1}% \alpha@label % modify \thebib if necessary @@ -1124,6 +1206,13 @@ Duplicate \protect\bib\space key `\CurrentBib ' detected\MessageBreakNS}% } +\def\DuplicateBibLabelWarning{% + \amsrefs@warning{% + Duplicate biblabel stem `\current@stem ' detected.\MessageBreakNS + This usually means the order of the bibitems\MessageBreakNS + is incompatible with the style of labels\MessageBreakNS + you are using}% +} \def\bibcite@write#1{% \if@filesw \begingroup @@ -1162,7 +1251,11 @@ \begingroup \protected@edef\@{% \endgroup - \protect\section*{#1}% + \ifx\@bibtitlestyle\undefined + \protect\section*{#1}% + \else + \protect\@bibtitlestyle + \fi \protect\bib@div@mark{#1}% }% \@ @@ -2106,12 +2199,14 @@ \let\current@stem\@empty \let\previous@year\@empty \let\current@year\@empty +\let\amsrefs@label@prefix\@empty +\def\thebib{\amsrefs@label@prefix\@arabic\c@bib} \def\append@to@stem{\global\@concat\current@stem} \def\generate@alphalabel{% \ifx\bib'label\@empty \begingroup \global\let\previous@stem\current@stem - \global\let\current@stem\@empty + \global\let\current@stem\amsrefs@label@prefix \@apply\auto@protect\amsrefs@textsymbols \@apply\auto@protect\amsrefs@textaccents \auto@protect\name @@ -2131,13 +2226,16 @@ \@tempa \fi } -\def\calc@author@part{% +\def\calc@author@part@{% \ifnum \@tempcnta = 1 \@xp\@oneauthorlabel\@xp{\@tempa}% \else \@xp\@multiauthorlabel\@xp{\@tempa}% \fi } +\def\calc@author@part@short{% + \@xp\@multiauthorlabel\@xp{\@tempa}% +}% \def\@firstone#1{\@car#1\@empty\@nil} \def\@firstthree#1{\@carcube#1\@empty\@empty\@empty\@nil} \let\@nametoken\@firstone @@ -2187,7 +2285,7 @@ } \newcommand{\etalchar}[1]{$^{#1}$} \def\year@short#1#2#3#4\@nil{#3#4} -\def\append@label@year{% +\def\append@label@year@{% \safe@set\@tempcnta\bib@year \edef\bib@citeyear{\the\@tempcnta}% \append@to@stem{% @@ -2209,6 +2307,15 @@ \ifx\previous@year\current@year \@tempswatrue \fi + \else + \begingroup + \let\name\@firstofone + \@ifundefined{amsrefs@stem@\current@stem}{% + \expandafter\gdef\csname amsrefs@stem@\current@stem\endcsname{}% + }{% + \DuplicateBibLabelWarning + }% + \endgroup \fi \if@tempswa \global\advance\alpha@suffix\@ne @@ -2620,7 +2727,6 @@ } \newcommand{\PrintDOI}[1]{% DOI #1% - \IfEmptyBibField{volume}{, (to appear in print)}{}% } \newcommand{\PrintDatePV}[1]{% \IfEmptyBibField{doi}{% @@ -2636,13 +2742,22 @@ } \newcommand{\PrintDate}[1]{(\print@date)} \newcommand{\PrintDateB}[1]{\print@date} -\def\print@date{% +\newcommand{\PrintDateField}[1]{% + \@ifempty{#1}{}{% + \begingroup + \bib@parsedate{#1}% + \print@full@date + \endgroup + }% +} +\def\print@full@date{% \ifx\bib@month\@empty \else \print@month@day \fi \bib@year } +\let\print@date\print@full@date \def\print@month@day{% \bib@monthname \ifx\@empty\bib@day \else \nobreakspace\number 0\bib@day,\fi @@ -2709,34 +2824,13 @@ } \IfOption{alphabetic}{% \def\bibtex@style{amsra}% - \def\alpha@label{% - \ifx\@empty\bib'label - \def\thebib{\CurrentBib}% - \else - \let\thebib\bib'label - \fi - }% - \let\generate@label\generate@alphalabel \let\process@citelist\process@citelist@unsorted - \def\numeric@refs{01}% + \amsrefs@option@alphabetic }{} \IfOption{shortalphabetic}{% \def\bibtex@style{amsrs}% - \def\alpha@label{% - \ifx\@empty\bib'label - \def\thebib{\CurrentBib}% - \else - \let\thebib\bib'label - \fi - }% - \let\@suffix@format\@arabic - \def\calc@author@part{% - \@xp\@multiauthorlabel\@xp{\@tempa}% - }% - \let\append@label@year\@empty - \let\generate@label\generate@alphalabel \let\process@citelist\process@citelist@unsorted - \def\numeric@refs{01}% + \amsrefs@option@shortalphabetic }{} \AtBeginDocument{% \@ifpackageloaded{backref}{% @@ -2853,6 +2947,21 @@ }{} }{} \IfOption{author-year}{}{\PopCatcodes \endinput} +\renewcommand{\@biblistsetup}[1]{% + \RestrictedSetKeys{}{biblist}{\the\rsk@toks}{#1}% + \rkvIfEmpty{biblist}{prefix}{}{% + \amsrefs@warning{% + The `prefix' biblist option cannot be used\MessageBreak + with the author-year option.% + }% + }% + \rkvIfEmpty{biblist}{labels}{}{% + \amsrefs@warning{% + The `labels' biblist option cannot be used\MessageBreak + with the author-year option.% + }% + }% +} \def\generate@label{% \ifx\bib'label\@empty \begingroup @@ -2883,7 +2992,6 @@ \def\citesel@authoryear#1#2#3#4#5{\PrintCNY{#3}{#4}} \def\citesel@object#1#2#3#4#5{\PrintCiteNames{#3} \citeleft#4} \let\citesel\citesel@authoryear -\def\numeric@refs{01}% \def\citeleft{(}% \def\citeright{)}% \def\@citeleft{\ifx\citesel\citesel@object\else\citeleft\fi}% @@ -2902,6 +3010,13 @@ \cites{#1}% \endgroup } +\DeclareRobustCommand{\citeyear}[1]{% + \begingroup + \let\citeleft\@empty + \let\citeright\@empty + \star@{\cite@a\citesel@year{#1}}{}% + \endgroup +} \DeclareRobustCommand{\ocite}[1]{% \star@{\cite@a\citesel@object{#1}}{}% } @@ -3096,6 +3211,17 @@ +{.} {} {transition} +{} {\SentenceSpace \PrintReviews} {review} } + +\BibSpec{webpage}{% + +{} {\PrintAuthors} {author} + +{.} { \PrintDate} {date} + +{.} { \emph} {title} + +{:} { \emph} {subtitle} + +{,} { \url} {url} + +{.} { Accessed \PrintDateField} {accessdate} + +{.} { } {note} + +{.} {} {transition} +} \PopCatcodes \endinput %% diff --git a/Master/texmf-dist/tex/latex/amsrefs/textcmds.sty b/Master/texmf-dist/tex/latex/amsrefs/textcmds.sty index a0323397298..38170cb4dbb 100644 --- a/Master/texmf-dist/tex/latex/amsrefs/textcmds.sty +++ b/Master/texmf-dist/tex/latex/amsrefs/textcmds.sty @@ -32,23 +32,23 @@ %% The Current Maintainer of this work is the American Mathematical %% Society. %% -\ProvidesPackage{textcmds}[2007/10/19 v1.06] +\ProvidesPackage{textcmds}[2012/08/02 v2.00] \providecommand{\mdash}{\textemdash\penalty\exhyphenpenalty} \providecommand{\ndash}{\textendash\penalty\exhyphenpenalty} -\newcommand{\qd}{\textquestiondown} -\newcommand{\xd}{\textexclamdown} -\newcommand{\ldq}{\textquotedblleft} -\newcommand{\rdq}{\textquotedblright} -\newcommand{\lsq}{\textquoteleft} -\newcommand{\rsq}{\textquoteright} -\newcommand{\bul}{\textbullet}% -\newcommand{\vsp}{\textvisiblespace}% -\newcommand{\pdc}{\textperiodcentered}% -\newcommand{\vrt}{\textbar}% -\newcommand{\cir}{\textasciicircum}% -\newcommand{\til}{\textasciitilde}% -\newcommand{\bsl}{\textbackslash}% -\newcommand{\cwm}{\textcompwordmark}% +\providecommand{\qd}{\textquestiondown} +\providecommand{\xd}{\textexclamdown} +\providecommand{\ldq}{\textquotedblleft} +\providecommand{\rdq}{\textquotedblright} +\providecommand{\lsq}{\textquoteleft} +\providecommand{\rsq}{\textquoteright} +\providecommand{\bul}{\textbullet}% +\providecommand{\vsp}{\textvisiblespace}% +\providecommand{\pdc}{\textperiodcentered}% +\providecommand{\vrt}{\textbar}% +\providecommand{\cir}{\textasciicircum}% +\providecommand{\til}{\textasciitilde}% +\providecommand{\bsl}{\textbackslash}% +\providecommand{\cwm}{\textcompwordmark}% \providecommand{\qq}[1]{\ldq#1\/\rdq} \providecommand{\q}[1]{\lq#1\/\rq} \newcommand{\supsize}{% |