diff -u texlive-extra-2009/debian/changelog texlive-extra-2009/debian/changelog --- texlive-extra-2009/debian/changelog +++ texlive-extra-2009/debian/changelog @@ -1,3 +1,9 @@ +texlive-extra (2009-7ubuntu4) lucid; urgency=low + + * Update revtex to 4.1r + + -- Robert Schroll Tue, 16 Nov 2010 00:31:51 -0500 + texlive-extra (2009-7ubuntu3) lucid; urgency=low * debian/control: Drop purifyeps from texlive-extra-utils' only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/reftest4-1.tex +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/reftest4-1.tex @@ -0,0 +1,205 @@ +% ****** Start of file reftest.tex ****** +% +% This file is part of the APS files in the REVTeX 4.1 distribution. +% Version 4.1 of REVTeX, July 1, 2008. +% +% Copyright (c) 2009 The American Physical Society. +% +% See the REVTeX 4.1 README file for restrictions and more information. +% +\documentclass{revtex4}% +\begin{document}% + +\typeout{Filename: reftest4-1.tex for revtex 4.1i 2009/10/19 (AO)} +% This document, when typeset, prompts for the name of a LaTeX auxiliary (.aux) file +% and then processes that file, paying attention to +% keys that have been cited (via \citation) +% or defined (via \bibcite). +% It then prints out diagnostics indicating +% * any keys that were cited but never defined, +% * any keys that were defined but never cited, and +% * keys that were cited and defined, but not in the same order. +% +% BibTeX takes care of such things automatically, +% so there is little use for such a test when using BibTeX. +% +% A separate question: will this file run under revtex4.cls? +% I can see two lines in my .aux with the potential for problems: +% \global \mathchardef \firstnote@num\z@ \relax +% \global\NAT@numberstrue + +\makeatletter + +\def\g@bbletw@#1#2{}% +\def\g@bble@ne#1{}% + +\let\bibdata\g@bble@ne +\let\newlabel\g@bbletw@ +\let\@writefile\g@bbletw@ +\let\bibstyle\g@bble@ne + +\@tempcnta\z@ +\@tempcntb\z@ + +\def\bibcite#1#2{% + \advance\@tempcnta\@ne + \expandafter\bib@one\csname bib#1\expandafter\endcsname\expandafter{\the\@tempcnta}{#1}% +} + +\def\bib@one#1#2#3{% + \@ifnotrelax#1{% + \typeout{*** Tag "#3" used in more than one \string\bibitem.}% + \typeout{\space\space\space\space You must correct this problem before continuing (Bailing out).}% + \@@end + }{% + \def#1{#2}% + \expandafter\def\csname bib@num#2\endcsname{#3}% + }% +}% + +\def\citation#1{% + \@for\@tempa:={#1}\do{% + \expandafter\cite@one\csname cite\@tempa\expandafter\endcsname\expandafter{\@tempa}% + }% +} + +\def\cite@one#1#2{% + \expandafter\@ifx\expandafter{\csname cite*\endcsname#1}{% + \@booleantrue\@cite@star@sw + }{% + \@ifnotrelax#1{% + }{% + \advance\@tempcntb\@ne + \expandafter\cite@one@\expandafter#1\expandafter{\the\@tempcntb}{#2}% + }% + }% +}% +\expandafter\def\csname cite*\endcsname{*}% +\@booleanfalse\@cite@star@sw + +\def\cite@one@#1#2#3{% + \def#1{#2}% + \expandafter\def\csname cite@num#2\endcsname{#3}% +}% + +\def\strut{\vrule height12pt depth4pt width0pt}% + +\typein[\filename]{Type in file name (no extension)}% +\expandafter\input\expandafter{\filename.aux}% + +\expandafter\def\expandafter\bibtotal\expandafter{\the\@tempcnta}% +\expandafter\def\expandafter\citetotal\expandafter{\the\@tempcntb}% + +\def\app@undefined#1#2#3{% + \expandafter\@ifnotrelax\csname#2#1\endcsname{}{% + \appdef#3{#1, }% + } +}% + +\let\uncitedbibs\@empty +\@tempcnta\z@ +\@ifnum{\bibtotal>\@tempcnta}{% + \loopwhile{% + \advance\@tempcnta\@ne + \expandafter\app@undefined\csname bib@num\the\@tempcnta\endcsname{cite}\uncitedbibs + \@ifnum{\bibtotal>\@tempcnta}% + }% +}% + +\let\undefinedcites\@empty +\@tempcnta\z@ +\@ifnum{\citetotal>\@tempcnta}{% + \loopwhile{% + \advance\@tempcnta\@ne + \expandafter\app@undefined\csname cite@num\the\@tempcnta\endcsname{bib}\undefinedcites + \@ifnum{\citetotal>\@tempcnta}% + }% +}% + +\def\addit@bad#1#2{% + \expandafter\@ifnotrelax\csname bib#1\endcsname{% + \@ifx{#1#2}{% + \addit{#1}{OK}% + }{% + \advance\@tempcntb\@ne + \addit{#1}{\bf Out of order}% + }% + }{% + \addit{#1}{\bf Undefined}% + }% +}% +\def\ordertable{}% +\def\table@line#1#2{% + \hbox to\hsize{% + \vrule + \hbox to.5\hsize{\ #1\hss}% + \hss\vrule\hss\strut + \hbox to.5\hsize{\ #2\hss}% + \vrule + }% + \hrule + \vskip\z@skip +}% +\def\addit#1#2{% + \appdef\ordertable{\table@line{#1}{#2}}% +}% + +\@tempcnta\z@ +\@tempcntb\z@ +\@ifnum{\citetotal>\@tempcnta}{% + \loopwhile{% + \advance\@tempcnta\@ne + \expandafter\addit@bad\csname cite@num\the\@tempcnta\expandafter\endcsname\csname bib@num\the\@tempcnta\endcsname + \@ifnum{\citetotal>\@tempcnta}% + }% +}{}% +\expandafter\def\expandafter\citesdisordered\expandafter{\the\@tempcntb}% + +Analysis of \filename.aux, according to rules of \emph{Physical Review}: +All bibitems must occur in the bibliography in order of their first citation in the +file, and all bibitems must be cited in the paper. + +\def\@tempa{\textbf{Bibitems that were not explicitly cited:} }% +\@ifx@empty\uncitedbibs{% + \appdef\@tempa{none.}% +}{% + \appdef\@tempa{\uncitedbibs\ \@cite@star@sw{were implicitly cited.}{please cite or remove bibitem(s).}}% +}% +\@tempa\expandafter\typeout\expandafter{\@tempa}\par + +\def\@tempa{\textbf{Citations not defined in bibliography:} }% +\@ifx@empty\undefinedcites{% + \appdef\@tempa{none.}% +}{% + \appdef\@tempa{\undefinedcites\space please add bibitem(s) or remove cite(s).}% +}% +\@tempa\expandafter\typeout\expandafter{\@tempa}\par + +\@ifnum{\citesdisordered=\z@}{% + \def\@tempa{\textbf{The order of the bibitems is OK.}}% + \@tempa\expandafter\typeout\expandafter{\@tempa}\par +}{% + \def\@tempa{% + \textbf{There + \@ifnum{\citesdisordered<\tw@}{was an error}{were \citesdisordered\ errors} + in the order of your bibitems.}% + }% + \@tempa\expandafter\typeout\expandafter{\@tempa} + \@ifx@empty\uncitedbibs{\@ifx@empty\undefinedcites{\true@sw}{\false@sw}}{\false@sw}% + {(This is in addition to the problems noted above.) }{}% + Please check the following table to see what the problems were. + Status in boldface signifies that a correction is needed. \par +}% + \emph{NOTE: + This table is a complete listing of all your citations, in order of their first occurrence: + your bibitems should be in the order shown in the first column of this table. + }\par + \small + \smallskip + \hrule + \table@line{\textbf{Citation key}}{\textbf{Status}}% + \smallskip + \hrule + \ordertable +\end{document} +% ****** End of file reftest.tex ****** only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/aps12pt4-1.rtx +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/aps12pt4-1.rtx @@ -18,7 +18,7 @@ %% See the REVTeX 4 README file for restrictions and more information. %% \ProvidesFile{aps12pt4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \ifx\undefined\substyle@ext \def\@tempa{% \endinput @@ -97,6 +97,7 @@ \headheight 12pt \headsep 25pt \topskip 10pt +\splittopskip\topskip \footskip 30pt \textheight=665.5\p@ \appdef\setup@hook{% @@ -110,8 +111,11 @@ \columnsep 10pt \columnseprule 0pt \footnotesep 1pt -\skip\footins 25.25pt plus 4pt minus 2pt -\def\footnoterule{\kern-5.25pt\hrule width.5in\kern4.85pt\relax} +\skip\footins 25.25pt plus 4pt minus 12pt +\def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\f@ur + \kern-\dimen@\hrule width.5in\kern\dimen@ +}% \floatsep 14pt plus 2pt minus 4pt \textfloatsep 20pt plus 2pt minus 4pt \intextsep 14pt plus 4pt minus 4pt only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/aps11pt4-1.rtx +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/aps11pt4-1.rtx @@ -18,7 +18,7 @@ %% See the REVTeX 4 README file for restrictions and more information. %% \ProvidesFile{aps11pt4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \ifx\undefined\substyle@ext \def\@tempa{% \endinput @@ -97,6 +97,7 @@ \headheight 12pt \headsep 25pt \topskip 10pt +\splittopskip\topskip \footskip 30pt \textheight=665.5\p@ \appdef\setup@hook{% @@ -110,8 +111,11 @@ \columnsep 10pt \columnseprule 0pt \footnotesep 1pt -\skip\footins 25.25pt plus 4pt minus 2pt -\def\footnoterule{\kern-5.25pt\hrule width.5in\kern4.85pt\relax} +\skip\footins 25.25pt plus 4pt minus 12pt +\def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\f@ur + \kern-\dimen@\hrule width.5in\kern\dimen@ +}% \floatsep 14pt plus 2pt minus 4pt \textfloatsep 20pt plus 2pt minus 4pt \intextsep 14pt plus 4pt minus 4pt only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/revsymb4-1.sty +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/revsymb4-1.sty @@ -19,7 +19,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1996/12/01]% \ProvidesPackage{revsymb4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \def\REVSYMB@warn#1{\PackageWarningNoLine{revsymb}{#1}}% \DeclareRobustCommand\lambdabar{% \bgroup only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/ltxgrid.sty +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/ltxgrid.sty @@ -22,9 +22,9 @@ %% %%% @LaTeX-file{ %%% filename = "ltxgrid.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "5462", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -46,30 +46,37 @@ %%% docstring = "The checksum field above generated by ltxdoc", %%% } \NeedsTeXFormat{LaTeX2e}[1995/12/01]% -\ProvidesFile{ltxgrid.sty}% - [2009/10/09 4.1h page grid package]% \fileversion +\ProvidesFile{% +ltxgrid% +.sty% +}% + [2010/07/25/20:33:00 4.1r page grid package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion \def\package@name{ltxgrid}% \expandafter\PackageInfo\expandafter{\package@name}{% Page grid for \protect\LaTeXe, by A. Ogawa (arthur_ogawa at sbcglobal.net)% }% \RequirePackage{ltxutil}% -\typeout{% - ltxgrid [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% -}% \newcounter{linecount} \def\loop@line#1#2{% \par \hb@xt@\hsize{% \global\advance#1\@ne \edef\@tempa{\@ifnum{100>#1}{0}{}\@ifnum{10>#1}{0}{}\number#1}% - \@tempa\edef\@tempa{\special{trace:\@tempa}}\@tempa + \@tempa\edef\@tempa{\special{line:\@tempa}}\@tempa \vrule depth2.5\p@#2\leaders\hrule\hfil }% }% \def\lineloop#1{% \loopwhile{\loop@line\c@linecount{}\@ifnum{#1>\c@linecount}}% }% +\def\linefoot#1{% + \loop@line\c@linecount{% + \footnote{% + #1\special{foot:#1}\vrule depth2.5\p@\leaders\hrule\hfill + }% + }% +}% \let\@@mark\mark \let\@@topmark\topmark \let\@@firstmark\firstmark @@ -147,6 +154,7 @@ \expandafter\@ifx\expandafter{\csname output@-\the\execute@message@pen\endcsname\output@procedure}{% \let\output@procedure\@message@saved }{}% + \ltxgrid@info@sw{\class@info{\string\dispatch@output}\say\output@procedure\saythe\holdinginserts}{}% \outputdebug@sw{\output@debug}{}% \output@procedure }% @@ -155,40 +163,51 @@ \expandafter\let\expandafter#1\csname output@\the\count@\endcsname }% \def\output@debug{% - \saythe\inputlineno - \saythe\holdinginserts - \saythe\outputpenalty - \saythe\interlinepenalty - \saythe\brokenpenalty - \saythe\clubpenalty - \saythe\widowpenalty - \saythe\displaywidowpenalty - \saythe\predisplaypenalty - \saythe\interdisplaylinepenalty - \saythe\postdisplaypenalty - \say\output@procedure - \saythe\badness - \say\thepagegrid - \saythe\pagegrid@col - \saythe\pagegrid@cur - \saythe\insertpenalties - \say\@@botmark - \saythe\pagegoal - \saythe\pagetotal - \saythe{\badness\@cclv}% - \say\@toplist - \say\@botlist - \say\@dbltoplist - \say\@deferlist - \trace@scroll{% + \def\@tempa{\save@message}% + \@ifx{\output@procedure\@tempa}{% + \true@sw + }{% + \@ifnum{\outputpenalty=-\save@column@insert@pen}{% + \@ifnum{\holdinginserts>\z@}% + }{% + \false@sw + }% + }% + {}{\output@debug@}% +}% +\def\output@debug@{% + \saythe\outputpenalty + \saythe\interlinepenalty + \saythe\brokenpenalty + \saythe\clubpenalty + \saythe\widowpenalty + \saythe\displaywidowpenalty + \saythe\predisplaypenalty + \saythe\interdisplaylinepenalty + \saythe\postdisplaypenalty + \saythe\badness + \say\thepagegrid + \saythe\pagegrid@col + \saythe\pagegrid@cur + \saythe\insertpenalties + \say\@@botmark + \saythe\pagegoal + \saythe\pagetotal + \saythe{\badness\@cclv}% + \say\@toplist + \say\@botlist + \say\@dbltoplist + \say\@deferlist + \trace@scroll{% \showbox\@cclv \showbox\@cclv@saved \showbox\pagesofar + \showbox\csname col@1\endcsname \showbox\footsofar - \showbox\footins@saved \showbox\footins + \showbox\footins@saved \showlists - }% + }% }% \@ifxundefined{\outputdebug@sw}{% \@booleanfalse\outputdebug@sw @@ -294,13 +313,9 @@ }% }{}% \@cclv@nontrivial@sw{% - \expandafter\let\expandafter\output@prep@\csname output@prep@\bot@envir \endcsname - \outputdebug@sw{\say\output@prep@}{}% - \@ifx{\output@prep@\relax}{\output@prep@document}{\output@prep@}% + \expandafter\output@do@prep\csname output@prep@\bot@envir \endcsname \@makecolumn\true@sw - \expandafter\let\expandafter\output@column@\csname output@column@\thepagegrid\endcsname - \outputdebug@sw{\say\output@column@}{}% - \@ifx{\output@column@\relax}{\output@column@one}{\output@column@}% + \expandafter\output@column@do\csname output@column@\thepagegrid\endcsname \protect@penalty\do@startcolumn@pen \clearpage@sw{% \protect@penalty\do@endpage@pen @@ -315,6 +330,14 @@ \global\@mparbottom\z@ \global\@textfloatsheight\z@ }% +\def\output@do@prep#1{% + \outputdebug@sw{\class@info{Prep: \string#1}}{}% + \@ifx{#1\relax}{\output@prep@document}{#1}% +}% +\def\output@column@do#1{% + \outputdebug@sw{\class@info{Output column: \string#1}}{}% + \@ifx{#1\relax}{\output@column@one}{#1}% +}% \def\void@cclv{\begingroup\setbox\z@\box\@cclv\endgroup}% \def\remove@lastbox{\setbox\z@\lastbox}% \def\@cclv@nontrivial@sw{% @@ -404,67 +427,90 @@ \@ifnum{\outputpenalty<\@M}{\penalty\outputpenalty}{}% }% \def\output@init@document{% - \set@adj@footins\vsize\global\vsize\vsize + \ltxgrid@info@sw{\class@info{\string\output@init@document}}{}% + \global\vsize\vsize }% \def\output@prep@document{% - \@ifvoid\footsofar{}{% - \setbox\footins\vbox\bgroup + \ltxgrid@foot@info@sw{\class@info{\string\output@prep@document}\trace@scroll{\showbox\footins\showbox\footsofar}}{}% + \@ifvoid\footsofar{% + }{% + \global\setbox\footins\vbox\bgroup \unvbox\footsofar \@ifvoid\footins{}{% \marry@baselines \unvbox\footins }% \egroup + \ltxgrid@foot@info@sw{\trace@box\footins}{}% }% }% \def\output@post@document{}% \let\@opcol\@undefined \def\@makecolumn#1{% - \setbox\@outputbox\vbox{% + \ltxgrid@foot@info@sw{\class@info{\string\@makecolumn\string#1}}{}% + \setbox\@outputbox\vbox\bgroup \boxmaxdepth\@maxdepth \@tempdima\dp\@cclv \unvbox\@cclv \vskip-\@tempdima - }% + \egroup \xdef\@freelist{\@freelist\@midlist}\global\let\@midlist\@empty \show@text@box@size \@combinefloats #1{% \@combineinserts\@outputbox\footins }{% - \combine@foot@inserts + \combine@foot@inserts\footsofar\footins }% \set@adj@colht\dimen@ \count@\vbadness \vbadness\@M - \setbox\@outputbox\vbox to\dimen@{% + \setbox\@outputbox\vbox to\dimen@\bgroup \@texttop \dimen@\dp\@outputbox \unvbox\@outputbox \vskip-\dimen@ \@textbottom - }% + \egroup \vbadness\count@ \global\maxdepth\@maxdepth }% \let\@makespecialcolbox\@undefined \def\@combineinserts#1#2{% - \setbox#1\vbox{% + \ltxgrid@foot@info@sw{\class@info{\string\@combineinserts\string#1\string#2}\trace@box#2}{}% + \setbox#1\vbox\bgroup \unvbox#1% - \vbox{% - \@ifvoid#2{}{% - \show@box@size{Combining inserts}#2% - \vskip\skip#2% - \color@begingroup - \normalcolor - \footnoterule - \nointerlineskip - \box#2% - \color@endgroup - }{}% - }% - }% + \@ifvoid{#2}{}{% + \dimen@\ht#2\advance\dimen@\dp#2\advance\dimen@\skip#2% + \show@box@size{Combining inserts}#2% + \vskip\skip#2% + \setbox\z@\vbox{\footnoterule}\dimen@i\ht\z@ + \color@begingroup + \normalcolor + \cleaders\box\z@\vskip\dimen@i\kern-\dimen@i + \csname combine@insert@\the\pagegrid@col\endcsname#2% + \color@endgroup + \kern-\dimen@\kern\dimen@ + }% + \egroup + \ltxgrid@foot@info@sw{\trace@box#1}{}% +}% +\def\combine@insert@tw@#1{% + \compose@footnotes@two#1\@ifvbox{#1}{\unvbox}{\box}#1% +}% +\def\combine@insert@@ne#1{% + \compose@footnotes@one#1\@ifvbox{#1}{\unvbox}{\box}#1% +}% +\def\twocolumn@grid@setup{% + \expandafter\let\csname combine@insert@1\endcsname\combine@insert@tw@ + \expandafter\let\csname combine@insert@2\endcsname\combine@insert@@ne +}% +\def\onecolumn@grid@setup{% + \expandafter\let\csname combine@insert@1\endcsname\combine@insert@@ne + \expandafter\let\csname combine@insert@2\endcsname\combine@insert@@ne }% +\let\columngrid@setup\onecolumn@grid@setup +\columngrid@setup \appdef\@floatplacement{% \global\@fpmin\@fpmin }% @@ -758,20 +804,21 @@ \mathchardef\do@newpage@pen=10001 \expandafter\let\csname output@-\the\do@newpage@pen\endcsname\relax \def\@clearfloatplacement{% - \global\@topnum \maxdimen % \c@topnumber - \global\@toproom \maxdimen % \topfraction\@colht - \global\@botnum \maxdimen % \c@bottomnumber - \global\@botroom \maxdimen % \bottomfraction\@colht - \global\@colnum \maxdimen % \c@totalnumber - \global\@dbltopnum \maxdimen % \c@dbltopnumber - \global\@dbltoproom \maxdimen % \dbltopfraction\@colht - \global\@textmin \z@ % \@colht\advance \@textmin -\@dbltoproom - \global\@fpmin \z@ % \dblfloatpagefraction\textheight + \global\@topnum \maxdimen + \global\@toproom \maxdimen + \global\@botnum \maxdimen + \global\@botroom \maxdimen + \global\@colnum \maxdimen + \global\@dbltopnum \maxdimen + \global\@dbltoproom \maxdimen + \global\@textmin \z@ + \global\@fpmin \z@ \let\@testfp\@gobble \appdef\@setfloattypecounts{\@fpstype16\advance\@fpstype\m@ne}% }% \let\@doclearpage\@undefined \let\@makefcolumn\@undefined +\let\@makecol\@undefined \def\clr@top@firstmark{% \global\let\saved@@topmark\@undefined \global\let\saved@@firstmark\@empty @@ -1131,18 +1178,30 @@ }% }% \def\savecolumn@moving{% + \ltxgrid@info@sw{\class@info{\string\savecolumn@moving}}{}% \@cclv@nontrivial@sw{% \save@column }{% \void@cclv }% \@ifvoid\footins{}{% - \outputdebug@sw{\trace@box\footins}{}% - \global\setbox\footins@saved\vbox{\unvbox\footins@saved\marry@baselines\unvbox\footins}% + \ltxgrid@foot@info@sw{\class@info{\string\savecolumn@moving}\trace@scroll{\showbox\footins@saved\showbox\footins}}{}% + \@ifvoid\footins@saved{% + \global\setbox\footins@saved\box\footins + }{% + \global\setbox\footins@saved\vbox\bgroup + \unvbox\footins@saved + \marry@baselines + \unvbox\footins + \egroup + }% + \ltxgrid@foot@info@sw{\trace@box\footins@saved}{}% \protect@penalty\save@column@insert@pen }% }% \newbox\footins@saved +\newbox\footins@recovered +\newbox\column@recovered \mathchardef\save@message@pen=10018 \@namedef{output@-\the\save@message@pen}{\save@message}% \def\save@message{% @@ -1158,7 +1217,11 @@ \@execute@message\save@column@pen }% \def\execute@message@insert#1{% - \@execute@message\save@column@insert@pen{\setbox \footins \box \footins@saved#1}% + \@execute@message\save@column@insert@pen{% + \setbox \footins \box \footins@saved + \ltxgrid@foot@info@sw{\class@info{\string\execute@message@insert}\trace@box\footins}{}% + #1% + }% }% \long\def\@execute@message#1#2{% \begingroup @@ -1276,34 +1339,46 @@ \def\thepagegrid{one}% \newbox\pagesofar \newbox\footsofar -\def\combine@foot@inserts{% - \@ifvoid\footins{% - }{% - \@ifvoid\footsofar{% - \global\setbox\footsofar\box\footins - }{% - \global\setbox\footsofar\vbox\bgroup - \unvbox\footsofar - \marry@baselines - \unvbox\footins +\def\combine@foot@inserts#1#2{% + \ltxgrid@info@sw{\class@info{\string\combine@foot@inserts\string#1\string#2}}{}% + \@ifvoid#1{% + \ltxgrid@foot@info@sw{\trace@box#2}{}\global\setbox#1\box#2% + }{% + \global\setbox#1\vbox\bgroup + \ltxgrid@foot@info@sw{\trace@box#1}{}\unvbox#1% + \@ifvoid#2{}{% + \marry@baselines + \ltxgrid@foot@info@sw{\trace@box#2}{}\unvbox#2% + }% \egroup }% - }% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2}}{}% }% \newcommand\onecolumngrid{\do@columngrid{one}{\@ne}}% \let\onecolumn\@undefined \def\open@column@one#1{% + \ltxgrid@info@sw{\class@info{\string\open@column@one\string#1}}{}% \unvbox\pagesofar + \@ifvoid{\footsofar}{}{% + \insert\footins\bgroup\unvbox\footsofar\egroup + \penalty\z@ + }% \gdef\thepagegrid{one}% \global\pagegrid@col#1% \global\pagegrid@cur\@ne - \set@colht + \global\count\footins\@m + \global\divide\count\footins\tw@ \set@column@hsize\pagegrid@col + \set@colht }% \def\shut@column@one{% + \ltxgrid@info@sw{\class@info{\string\shut@column@one}}{}% \@makecolumn\false@sw - \global\setbox\pagesofar\vbox{\unvbox\@outputbox\recover@footins}% - \combine@foot@inserts + \global\setbox\pagesofar\vbox\bgroup + \recover@column\@outputbox\footsofar\column@recovered\footins@recovered + \egroup + \begingroup\setbox\z@\box\@outputbox\endgroup + \combine@foot@inserts\footsofar\footins \set@colht }% \def\float@column@one{% @@ -1346,13 +1421,19 @@ \let\twocolumn\@undefined \let\@topnewpage\@undefined \def\open@column@mlt#1{% + \ltxgrid@info@sw{\class@info{\string\open@column@mlt\string#1}}{}% + \@ifvoid{\footsofar}{}{% + \insert\footins\bgroup\unvbox\footsofar\egroup + }% \gdef\thepagegrid{mlt}% \global\pagegrid@col#1% \global\pagegrid@cur\@ne + \global\count\footins\@m \set@column@hsize\pagegrid@col \set@colht }% \def\shut@column@mlt{% + \ltxgrid@info@sw{\class@info{\string\shut@column@mlt}}{}% \@cclv@nontrivial@sw{% \@makecolumn\false@sw \@ifnum{\pagegrid@cur<\pagegrid@col}{% @@ -1364,7 +1445,7 @@ }% \@ifnum{\pagegrid@cur>\@ne}{% \csname balance@\the\pagegrid@col\endcsname - \grid@column{}% + \grid@column\@outputbox{}% \@combinepage\false@sw \@combinedblfloats \global\setbox\pagesofar\box\@outputbox @@ -1416,7 +1497,7 @@ \global\advance\pagegrid@cur\@ne }{% \set@adj@colht\dimen@ - \grid@column{}% + \grid@column\@outputbox{}% \@output@combined@page }% }% @@ -1425,6 +1506,31 @@ \def\@addmarginpar@mlt{% emits a boolean \@ifnum{\pagegrid@cur=\@ne}% }% +\def\set@footnotewidth@one{% + \hsize\columnwidth + \linewidth\hsize +}% +\def\set@footnotewidth@two{\set@footnotewidth@mlt\tw@}% +\def\set@footnotewidth@mlt#1{% + \hsize\textwidth + \advance\hsize\columnsep + \divide\hsize#1% + \advance\hsize-\columnsep + \linewidth\hsize +}% +\def\compose@footnotes@one#1{% + \ltxgrid@foot@info@sw{\class@info{\string\compose@footnotes@one\string#1}\trace@box#1}{}% +}% +\let\compose@footnotes\compose@footnotes@one +\def\compose@footnotes@two#1{% + \ltxgrid@foot@info@sw{\class@info{\string\compose@footnotes@two\string#1}\trace@box#1}{}% + \setbox\z@\box\@tempboxa + \let\recover@column\recover@column@null + \let\marry@baselines\@empty + \balance@two#1\@tempboxa + \global\setbox#1\hbox to\textwidth{\box#1\hfil\box\@tempboxa}% + \ltxgrid@foot@info@sw{\trace@box#1}{}% +}% \let\pagegrid@cur\col@number \let\col@number\@undefined \newcount\pagegrid@col @@ -1435,7 +1541,7 @@ \def\pagegrid@init{% \advance\pagegrid@cur\@ne \@ifnum{\pagegrid@cur<\pagegrid@col}{% - \csname newbox\expandafter\endcsname\csname col@\the\pagegrid@cur\endcsname + \csname newbox\expandafter\endcsname\csname col@\the\pagegrid@cur\endcsname \pagegrid@init }{% }% @@ -1443,46 +1549,52 @@ \appdef\class@documenthook{% \pagegrid@init }% -\def\grid@column#1{% - \global\setbox\@outputbox\vbox{% - \hb@xt@\textwidth{% - \vrule\@height\z@\@width\z@\@if@empty{#1}{}{\@depth#1}% +\def\grid@column#1#2{% + \ltxgrid@info@sw{\class@info{\string\grid@column\string#1}}{}% + \global\setbox#1\vbox\bgroup + \hb@xt@\textwidth\bgroup + \vrule\@height\z@\@width\z@\@if@empty{#2}{}{\@depth#2}% \pagegrid@cur\@ne - \append@column - \box@column\@outputbox - }% - \vskip\z@skip % FIXME: page depth! - }% + \@ifnum{\pagegrid@cur<\pagegrid@col}{\loopwhile{\append@column@\pagegrid@cur\pagegrid@col}}{}% + \box@column#1% + \egroup + \vskip\z@skip + \egroup }% -\def\append@column{% - \@ifnum{\pagegrid@cur<\pagegrid@col}{% - \expandafter\box@column\csname col@\the\pagegrid@cur\endcsname - \hfil - \vrule \@width\columnseprule - \hfil - \advance\pagegrid@cur\@ne - \append@column - }{% - }% +\def\append@column@#1#2{% + \expandafter\box@column\csname col@\the#1\endcsname + \hfil\vrule\@width\columnseprule\hfil + \advance#1\@ne + \@ifnum{#1<#2}% }% \def\box@column#1{% + \ltxgrid@info@sw{\class@info{\string\box@column\string#1}}{}% \raise\topskip - \hb@xt@\columnwidth{% + \hb@xt@\columnwidth\bgroup \dimen@\ht#1\@ifdim{\dimen@>\@colht}{\dimen@\@colht}{}% \count@\vbadness\vbadness\@M \dimen@ii\vfuzz\vfuzz\maxdimen - \outputdebug@sw{\saythe\@colht\saythe\dimen@}{}% - \vtop to\dimen@ - {\hrule\@height\z@ + \ltxgrid@info@sw{\saythe\@colht\saythe\dimen@}{}% + \vtop to\dimen@\bgroup + \hrule\@height\z@ \unvbox#1% \raggedcolumn@skip - }% + \egroup \vfuzz\dimen@ii \vbadness\count@ \hss - }% + \egroup }% \def\marry@baselines{% + \begingroup + \setbox\z@\lastbox + \@ifvoid{\z@}{% + \endgroup + }{% + \aftergroup\kern + \aftergroup-% + \expandafter\box\expandafter\z@\expandafter\endgroup\the\dp\z@\relax + }% \vskip\marry@skip\relax }% \gdef\marry@skip{\z@skip}% @@ -1501,6 +1613,7 @@ \vskip\z@\raggedcolumn@sw{\@plus.0001fil\@minus.0001fil}{}\relax }% \def\@combinepage#1{% + \ltxgrid@foot@info@sw{\class@info{\string\@combinepage\string#1}}{}% \@ifvoid\pagesofar{}{% \setbox\@outputbox\vbox{% \unvbox\pagesofar @@ -1512,6 +1625,7 @@ \@ifvoid\footsofar{}{% \show@box@size{Combining page footnotes}\footsofar \setbox\footins\box\footsofar + \compose@footnotes \@combineinserts\@outputbox\footins }% }{% @@ -1576,18 +1690,20 @@ \set@colroom }% \def\set@adj@textheight#1{% + \ltxgrid@info@sw{\class@info{\string\set@adj@textheight\string#1}\saythe\textheight}{}% #1\textheight \def\@elt{\adj@page#1}% \@booleantrue\firsttime@sw\@dbltoplist \let\@elt\relax \global#1#1\relax - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\saythe#1}{}% }% \def\set@colroom{% + \ltxgrid@info@sw{\class@info{\string\set@colroom}}{}% \set@adj@colht\@colroom \@if@empty\enlarge@colroom{}{% \global\advance\@colroom\enlarge@colroom\relax - \outputdebug@sw{\saythe\@colroom}{}% + \ltxgrid@info@sw{\saythe\@colroom}{}% }% \@ifdim{\@colroom>\topskip}{}{% \ltxgrid@info{Not enough room: \string\@colroom=\the\@colroom; increasing to \the\topskip}% @@ -1598,16 +1714,15 @@ }% \def\set@vsize{% \global\vsize\@colroom - \outputdebug@sw{\saythe\vsize}{}% + \ltxgrid@info@sw{\class@info{\string\set@vsize\string\vsize=\string\colroom}\saythe\vsize}{}% }% \def\set@adj@colht#1{% #1\@colht - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\set@adj@colht\string#1-\string\pagesofar}\saythe#1}{}% \@ifvoid\pagesofar{}{% \advance#1-\ht\pagesofar\advance#1-\dp\pagesofar - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\pagesofar}\saythe#1}{}% }% - \set@adj@footins#1% \def\@elt{\adj@column#1}% \@booleantrue\firsttime@sw\@toplist \@booleantrue\firsttime@sw\@botlist @@ -1616,25 +1731,18 @@ \def\adj@column#1#2{% \advance#1-\ht#2% \advance#1-\firsttime@sw{\textfloatsep\@booleanfalse\firsttime@sw}{\floatsep}% - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\adj@column\string#1-\string#2}\saythe#1}{}% }% \def\adj@page#1#2{% \advance#1-\ht#2% \advance#1-\firsttime@sw{\dbltextfloatsep\@booleanfalse\firsttime@sw}{\dblfloatsep}% - \outputdebug@sw{\saythe#1}{}% -}% -\def\set@adj@footins#1{% - \@booleanfalse\temp@sw - \set@adj@box#1\footins - \set@adj@box#1\footins@saved - \set@adj@box#1\footsofar - \temp@sw{\advance#1-\skip\footins}{}% + \ltxgrid@info@sw{\class@info{\string\adj@page\string#1-\string#2}\saythe#1}{}% }% \def\set@adj@box#1#2{% \@ifvoid#2{}{% \advance#1-\ht#2\advance#1-\dp#2% \@booleantrue\temp@sw - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@foot@info@sw{\class@info{\string\set@adj@box\string#2}\saythe#1}{}% }% }% \appdef\@outputpage@tail{% @@ -1648,66 +1756,59 @@ \toks@{% \setbox\footins\box\footsofar \balance@two\col@1\@outputbox - \combine@foot@inserts - \@ifvoid\footsofar{}{% - \global - \setbox\footsofar\vbox\bgroup - \setbox\z@\box\@tempboxa - \let\recover@footins\relax - \balance@two\footsofar\@tempboxa - \hb@xt@\textwidth{\box\footsofar\hfil\box\@tempboxa}% - \egroup - }% + \global\setbox\col@1\box\col@1 + \global\setbox\@outputbox\box\@outputbox + \combine@foot@inserts\footsofar\footins }% \aftergroup\def\aftergroup\balance@2\expandafter \endgroup\expandafter{\the\toks@}% \def\balance@two#1#2{% + \ltxgrid@info@sw{\class@info{\string\balance@two\string#1\string#2}}{}% \outputdebug@sw{\trace@scroll{\showbox#1\showbox#2}}{}% - \setbox\@ne\vbox{% - \@ifvoid#1{}{% - \unvcopy#1\recover@footins - \@ifvoid#2{}{\marry@baselines}% - }% - \@ifvoid#2{}{% - \unvcopy#2\recover@footins - }% - }% + \setbox\thr@@\copy\footsofar + \setbox\@ne\vbox\bgroup + \@ifvoid{#1}{}{% + \recover@column#1\footsofar\column@recovered\footins@recovered + \@ifvoid{#2}{}{\marry@baselines}% + }% + \@ifvoid{#2}{}{% + \recover@column#2\footsofar\column@recovered\footins@recovered + }% + \egroup + \outputdebug@sw{\trace@scroll{\showbox\@ne}}{}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox\footsofar}}{}% \dimen@\ht\@ne\divide\dimen@\tw@ \dimen@i\dimen@ \vbadness\@M \vfuzz\maxdimen + \splittopskip\topskip \loopwhile{% - \dimen@i=.5\dimen@i - \outputdebug@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% \setbox\z@\copy\@ne\setbox\tw@\vsplit\z@ to\dimen@ - \setbox\z@ \vbox{% - \unvcopy\z@ - \setbox\z@\vbox{\unvbox\z@ \remove@lastbox\aftergroup\vskip\aftergroup-\expandafter}\the\dp\z@\relax - }% - \setbox\tw@\vbox{% - \unvcopy\tw@ - \setbox\z@\vbox{\unvbox\tw@\remove@lastbox\aftergroup\vskip\aftergroup-\expandafter}\the\dp\z@\relax - }% + \remove@depth\z@\remove@depth\tw@ \dimen@ii\ht\tw@\advance\dimen@ii-\ht\z@ - \@ifdim{\dimen@i>.5\p@}{% - \advance\dimen@\@ifdim{\dimen@ii<\z@}{}{-}\dimen@i - \true@sw + \dimen@i=.5\dimen@i + \ltxgrid@info@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% + \@ifdim{\dimen@ii<.5\p@}{% + \@ifdim{\dimen@ii>-.5\p@}% }{% - \@ifdim{\dimen@ii<\z@}{% - \advance\dimen@\tw@\dimen@i - \true@sw - }{% - \false@sw - }% + \false@sw }% - }% - \outputdebug@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% - \@ifdim{\ht\z@=\z@}{% - \@ifdim{\ht\tw@=\z@}{% + {% \true@sw }{% + \@ifdim{\dimen@i<.5\p@}% + }% + {% \false@sw }% + {% + \advance\dimen@\@ifdim{\dimen@ii<\z@}{}{-}\dimen@i + \true@sw + }% + }% + \ltxgrid@info@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% + \@ifdim{\ht\z@=\z@}{% + \@ifdim{\ht\tw@=\z@}% }{% \true@sw }% @@ -1716,38 +1817,63 @@ \ltxgrid@info{Unsatifactorily balanced columns: giving up}% \setbox\tw@\box#1% \setbox\z@ \box#2% + \global\setbox\footsofar\box\thr@@ }% \setbox\tw@\vbox{\unvbox\tw@\vskip\z@skip}% \setbox\z@ \vbox{\unvbox\z@ \vskip\z@skip}% \set@colht \dimen@\ht\z@\@ifdim{\dimen@<\ht\tw@}{\dimen@\ht\tw@}{}% \@ifdim{\dimen@>\@colroom}{\dimen@\@colroom}{}% - \outputdebug@sw{\saythe{\ht\z@}\saythe{\ht\tw@}\saythe\@colroom\saythe\dimen@}{}% + \ltxgrid@info@sw{\saythe{\ht\z@}\saythe{\ht\tw@}\saythe\@colroom\saythe\dimen@}{}% \setbox#1\vbox to\dimen@{\unvbox\tw@\unskip\raggedcolumn@skip}% \setbox#2\vbox to\dimen@{\unvbox\z@ \unskip\raggedcolumn@skip}% \outputdebug@sw{\trace@scroll{\showbox#1\showbox#2}}{}% }% -\def\recover@footins{% - \skip\z@ \lastskip\unskip - \skip\@ne\lastskip\unskip - \setbox\z@\lastbox - \@ifvbox\z@{% - \setbox\z@\vbox{% - \unvbox\z@ - \setbox\z@\lastbox - \@ifvoid\z@{}{% - \global\setbox\footsofar\vbox{% - \unvbox\footsofar - \@ifvbox\z@{% - \unvbox\z@ - }{% - \box\z@ - }% - }% - }% +\def\remove@depth#1{% + \setbox#1\vbox\bgroup + \unvcopy#1% + \setbox\z@\vbox\bgroup + \unvbox#1% + \setbox\z@\lastbox + \aftergroup\kern\aftergroup-\expandafter + \egroup + \the\dp\z@\relax + \egroup +}% +\def\recover@column#1#2#3#4{% + \ltxgrid@info@sw{\class@info{\string\recover@column\string#1\string#2\string#3\string#4}}{}% + \setbox#4\vbox{\unvcopy#1}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#4}}{}% + \dimen@\ht#4% + \ltxgrid@foot@info@sw{\saythe\dimen@}{}% + \setbox#4\vbox\bgroup + \unvbox#4\unskip + \dimen@i\lastkern\unkern\advance\dimen@i\lastkern + \@ifdim{\dimen@i=\z@}{% + \dimen@i\lastkern\unkern + \ltxgrid@foot@info@sw{\saythe\dimen@i}{}% + \aftergroup\dimen@i + \expandafter\egroup\the\dimen@i\relax + }{% + \egroup }% - }{}% - \outputdebug@sw{\trace@box\footsofar}{}% + \@ifdim{\dimen@i<\z@}{% + \advance\dimen@\dimen@i + \ltxgrid@foot@info@sw{\saythe\dimen@i\saythe\dimen@}{}% + \splittopskip\z@skip + \global\setbox#3\vsplit#4 to\dimen@ + \global\setbox#4\vbox{\unvbox#4}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2\showbox#3\showbox#4}}{}% + \global\setbox#2\vbox\bgroup\unvbox#2\vskip\z@skip\unvbox#4\egroup + }{% + \setbox#3\box#4% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2\showbox#3\showbox#4}}{}% + }% + \unvbox#3% + \loopwhile{\dimen@\lastskip\@ifdim{\dimen@>\z@}{\unskip\true@sw}{\false@sw}}% +}% +\def\recover@column@null#1#2#3#4{% + \unvcopy#1% }% \prepdef\@begindocumenthook{% \open@column@one\@ne @@ -2175,6 +2301,9 @@ \vbadness\count@ }{}% }% +\appdef\@outputpage@head{% + \@ifx{\LS@rot\@undefined}{}{\LS@rot}% +}% \def\ltxgrid@info{% \ltxgrid@info@sw{\class@info}{\@gobble}% }% @@ -2183,6 +2312,7 @@ \ltxgrid@warn@sw{\class@warn}{\@gobble}% }% \@booleantrue\ltxgrid@warn@sw +\@booleanfalse\ltxgrid@foot@info@sw \def\def@next@handler#1#2#3{% \advance#1\@ne\mathchardef#2\the#1% \expandafter\def\csname output@-\the#1\endcsname{#3}% only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/ltxutil.sty +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/ltxutil.sty @@ -22,9 +22,9 @@ %% %%% @LaTeX-file{ %%% filename = "ltxutil.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "4094", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -46,16 +46,16 @@ %%% docstring = "The checksum field above generated by ltxdoc", %%% } \NeedsTeXFormat{LaTeX2e}[1995/12/01]% -\ProvidesFile{ltxutil.sty}% - [2009/10/09 4.1h utilities package]% \fileversion +\ProvidesFile{% +ltxutil% +.sty% +}% + [2010/07/25/20:33:00 4.1r utilities package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion \def\package@name{ltxutil}% \expandafter\PackageInfo\expandafter{\package@name}{% Utility macros for \protect\LaTeXe, by A. Ogawa (arthur_ogawa at sbcglobal.net)% }% -\typeout{% - ltxutil [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% -}% \def\class@err#1{\ClassError{\class@name}{#1}\@eha}% \def\class@warn#1{\ClassWarningNoLine{\class@name}{#1}}% \def\class@info#1{\ClassInfo{\class@name}{#1}}% @@ -206,6 +206,7 @@ \let\class@documenthook\@empty \let\class@enddocumenthook\@empty \def\enddocument{% + \let\AtEndDocument\@firstofone \@enddocumenthook \@checkend{document}% \clear@document @@ -213,7 +214,6 @@ \deadcycles\z@ \@@end }% -\def\clear@document{\clearpage}% \def\check@aux{\do@check@aux}% \def\do@check@aux{% \@if@sw\if@filesw\fi{% @@ -246,6 +246,15 @@ }% }{}% }% +\def\clear@document{% + \clearpage + \do@output@cclv{% + \Call@AfterLastShipout + }% +}% +\appdef\class@documenthook{% + \providecommand\Call@AfterLastShipout{}% +}% \def\class@extension#1#2{% \IfFileExists{#1.#2}{% \expandafter\class@extensionfile\csname ver@\@currname.\@currext\endcsname{#1}#2% @@ -449,11 +458,12 @@ \set@footnotewidth \@parboxrestore \protected@edef\@currentlabel{% - \csname p@footnote\endcsname\@thefnmark + \csname p@\@mpfn\endcsname\@thefnmark }% \color@begingroup \@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1% + \@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -464,17 +474,7 @@ \splittopskip\footnotesep \splitmaxdepth\dp\strutbox }% -\def\set@footnotewidth{% - \hsize\columnwidth - \linewidth\hsize -}% -\def\set@footnotewidth@ii{% - \hsize\textwidth - \advance\hsize\columnsep - \divide\hsize\tw@ - \advance\hsize-\columnsep - \linewidth\hsize -}% +\def\set@footnotewidth{\set@footnotewidth@one}% \def\robustify@contents{% \let \label \@gobble \let \index \@gobble @@ -1870,9 +1870,11 @@ \@nameuse{l@f@#2}% \ignorespaces#3\unskip\nobreak\hskip\skip@ \hb@xt@\rightskip{\hfil\unhbox\@tempboxa}\hskip-\rightskip\hskip\z@skip - \par - \expandafter\aftergroup\csname tocdim@#2\endcsname\expandafter - \endgroup\the\@tempdima\relax + \expandafter\par + \expandafter\aftergroup\csname tocdim@#2% + \expandafter\endcsname + \expandafter\endgroup + \the\@tempdima\relax }% \def\set@tocdim@pagenum#1#2{% \setbox#1\hbox{\ignorespaces#2}% @@ -1923,26 +1925,116 @@ \advance\leftskip\@totalleftmargin }% \let\set@listindent\set@listindent@parshape -\providecommand\href[0]{\begingroup\@sanitize\@href}% -\def\@href#1{\@@startlink{#1}\@@href}% -\def\@@href#1{\endgroup#1\@@endlink}% -\providecommand \url [0]{\begingroup\@sanitize \@url }% +\providecommand\href[0]{\begingroup\@sanitize@url\@href}% +\def\@href#1{\@@startlink{#1}\endgroup\@@href}% +\def\@@href#1{#1\@@endlink}% +\providecommand \url [0]{\begingroup\@sanitize@url \@url }% \def \@url #1{\endgroup\@href {#1}{\URL@prefix#1}}% \providecommand \URL@prefix [0]{URL }% +\providecommand\doi[0]{\begingroup\@sanitize@url\@doi}% +\def\@doi#1{\endgroup\@@startlink{\doibase#1}doi:\discretionary {}{}{}#1\@@endlink }% +\providecommand \doibase [0]{http://dx.doi.org/}% +\providecommand \@sanitize@url[0]{\chardef\cat@space\the\catcode`\ \@sanitize\catcode`\ \cat@space}% +\def\@@startlink#1{}% +\def\@@endlink{}% \@ifxundefined \pdfoutput {\true@sw}{\@ifnum{\z@=\pdfoutput}{\true@sw}{\false@sw}}% {% - \def\@@startlink#1{\leavevmode\special{html:}}% - \def\@@endlink{\special{html:}}% + \def\@@startlink@hypertext#1{\leavevmode\special{html:}}% + \def\@@endlink@hypertext{\special{html:}}% }{% - \def\@@startlink#1{% + \def\@@startlink@hypertext#1{% \leavevmode \pdfstartlink\pdfstartlink@attr user{/Subtype/Link/A<>}% \relax }% - \def\@@endlink{\pdfendlink}% + \def\@@endlink@hypertext{\pdfendlink}% \def\pdfstartlink@attr{attr{/Border[0 0 1 ]/H/I/C[0 1 1]}}% }% +\def\hypertext@enable@ltx{% + \let\@@startlink\@@startlink@hypertext + \let\@@endlink\@@endlink@hypertext +}% +\def\href@Hy{\hyper@normalise \href@ }% +\def\href@Hy@ltx{\@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}}% +\def\Hy@href#{\hyper@normalise\href@}% +\begingroup + \endlinechar=-1 % + \catcode`\^^A=14 % + \catcode`\^^M\active + \catcode`\%\active + \catcode`\#\active + \catcode`\_\active + \catcode`\$\active + \catcode`\&\active + \gdef\hyper@normalise@ltx{^^A + \begingroup + \catcode`\^^M\active + \def^^M{ }^^A + \catcode`\%\active + \let%\@percentchar + \let\%\@percentchar + \catcode`\#\active + \def#{\hyper@hash}^^A + \def\#{\hyper@hash}^^A + \@makeother\&^^A + \edef&{\string&}^^A + \edef\&{\string&}^^A + \edef\textunderscore{\string_}^^A + \let\_\textunderscore + \catcode`\_\active + \let_\textunderscore + \let~\hyper@tilde + \let\~\hyper@tilde + \let\textasciitilde\hyper@tilde + \let\\\@backslashchar + \edef${\string$}^^A + \Hy@safe@activestrue + \hyper@n@rmalise + }^^A + \catcode`\#=6 ^^A + \gdef\Hy@ActiveCarriageReturn@ltx{^^M}^^A + \gdef\hyper@n@rmalise@ltx#1#2{^^A + \def\Hy@tempa{#2}^^A + \ifx\Hy@tempa\Hy@ActiveCarriageReturn + \Hy@ReturnAfterElseFi{^^A + \hyper@@normalise{#1}^^A + }^^A + \else + \Hy@ReturnAfterFi{^^A + \hyper@@normalise{#1}{#2}^^A + }^^A + \fi + }^^A + \gdef\hyper@@normalise@ltx#1#2{^^A + \edef\Hy@tempa{^^A + \endgroup + \noexpand#1{\Hy@RemovePercentCr#2%^^M\@nil}^^A + }^^A + \Hy@tempa + }^^A + \gdef\Hy@RemovePercentCr@ltx#1%^^M#2\@nil{^^A + #1^^A + \ifx\limits#2\limits + \else + \Hy@ReturnAfterFi{^^A + \Hy@RemovePercentCr #2\@nil + }^^A + \fi + }^^A +\endgroup +\def\switch@hyperref@href{% + \expandafter\@ifx\expandafter{\csname href \endcsname\href@Hy}{ + \class@info{Repairing hyperref 6.75r \string\href}% + \let\hyper@normalise\hyper@normalise@ltx + \let\hyper@@normalise\hyper@@normalise@ltx + \let\hyper@n@rmalise\hyper@n@rmalise@ltx + \let\Hy@ActiveCarriageReturn\Hy@ActiveCarriageReturn@ltx + \let\Hy@RemovePercentCr\Hy@RemovePercentCr@ltx + \let\href\href@Hy@ltx + }{}% +}% +\appdef\document@inithook{\switch@hyperref@href}% \def\typeout@org#1{% \begingroup \set@display@protect only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/revtex4-1.cls +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/revtex4-1.cls @@ -27,7 +27,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1996/12/01]% \ProvidesClass{revtex4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \let\class@name\@gtempa \GenericInfo{}{\space Copyright (c) 2009 The American Physical Society.^^J @@ -46,7 +46,8 @@ \expandafter\@@end \fi \typeout{% - ltxutil [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% +ltxutil% + [2010/07/25/20:33:00 4.1r utilities package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion }% \def\class@err#1{\ClassError{\class@name}{#1}\@eha}% \def\class@warn#1{\ClassWarningNoLine{\class@name}{#1}}% @@ -198,6 +199,7 @@ \let\class@documenthook\@empty \let\class@enddocumenthook\@empty \def\enddocument{% + \let\AtEndDocument\@firstofone \@enddocumenthook \@checkend{document}% \clear@document @@ -205,7 +207,6 @@ \deadcycles\z@ \@@end }% -\def\clear@document{\clearpage}% \def\check@aux{\do@check@aux}% \def\do@check@aux{% \@if@sw\if@filesw\fi{% @@ -238,6 +239,15 @@ }% }{}% }% +\def\clear@document{% + \clearpage + \do@output@cclv{% + \Call@AfterLastShipout + }% +}% +\appdef\class@documenthook{% + \providecommand\Call@AfterLastShipout{}% +}% \def\class@extension#1#2{% \IfFileExists{#1.#2}{% \expandafter\class@extensionfile\csname ver@\@currname.\@currext\endcsname{#1}#2% @@ -441,11 +451,12 @@ \set@footnotewidth \@parboxrestore \protected@edef\@currentlabel{% - \csname p@footnote\endcsname\@thefnmark + \csname p@\@mpfn\endcsname\@thefnmark }% \color@begingroup \@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1% + \@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -456,17 +467,7 @@ \splittopskip\footnotesep \splitmaxdepth\dp\strutbox }% -\def\set@footnotewidth{% - \hsize\columnwidth - \linewidth\hsize -}% -\def\set@footnotewidth@ii{% - \hsize\textwidth - \advance\hsize\columnsep - \divide\hsize\tw@ - \advance\hsize-\columnsep - \linewidth\hsize -}% +\def\set@footnotewidth{\set@footnotewidth@one}% \def\robustify@contents{% \let \label \@gobble \let \index \@gobble @@ -1862,9 +1863,11 @@ \@nameuse{l@f@#2}% \ignorespaces#3\unskip\nobreak\hskip\skip@ \hb@xt@\rightskip{\hfil\unhbox\@tempboxa}\hskip-\rightskip\hskip\z@skip - \par - \expandafter\aftergroup\csname tocdim@#2\endcsname\expandafter - \endgroup\the\@tempdima\relax + \expandafter\par + \expandafter\aftergroup\csname tocdim@#2% + \expandafter\endcsname + \expandafter\endgroup + \the\@tempdima\relax }% \def\set@tocdim@pagenum#1#2{% \setbox#1\hbox{\ignorespaces#2}% @@ -1915,26 +1918,116 @@ \advance\leftskip\@totalleftmargin }% \let\set@listindent\set@listindent@parshape -\providecommand\href[0]{\begingroup\@sanitize\@href}% -\def\@href#1{\@@startlink{#1}\@@href}% -\def\@@href#1{\endgroup#1\@@endlink}% -\providecommand \url [0]{\begingroup\@sanitize \@url }% +\providecommand\href[0]{\begingroup\@sanitize@url\@href}% +\def\@href#1{\@@startlink{#1}\endgroup\@@href}% +\def\@@href#1{#1\@@endlink}% +\providecommand \url [0]{\begingroup\@sanitize@url \@url }% \def \@url #1{\endgroup\@href {#1}{\URL@prefix#1}}% \providecommand \URL@prefix [0]{URL }% +\providecommand\doi[0]{\begingroup\@sanitize@url\@doi}% +\def\@doi#1{\endgroup\@@startlink{\doibase#1}doi:\discretionary {}{}{}#1\@@endlink }% +\providecommand \doibase [0]{http://dx.doi.org/}% +\providecommand \@sanitize@url[0]{\chardef\cat@space\the\catcode`\ \@sanitize\catcode`\ \cat@space}% +\def\@@startlink#1{}% +\def\@@endlink{}% \@ifxundefined \pdfoutput {\true@sw}{\@ifnum{\z@=\pdfoutput}{\true@sw}{\false@sw}}% {% - \def\@@startlink#1{\leavevmode\special{html:}}% - \def\@@endlink{\special{html:}}% + \def\@@startlink@hypertext#1{\leavevmode\special{html:}}% + \def\@@endlink@hypertext{\special{html:}}% }{% - \def\@@startlink#1{% + \def\@@startlink@hypertext#1{% \leavevmode \pdfstartlink\pdfstartlink@attr user{/Subtype/Link/A<>}% \relax }% - \def\@@endlink{\pdfendlink}% + \def\@@endlink@hypertext{\pdfendlink}% \def\pdfstartlink@attr{attr{/Border[0 0 1 ]/H/I/C[0 1 1]}}% }% +\def\hypertext@enable@ltx{% + \let\@@startlink\@@startlink@hypertext + \let\@@endlink\@@endlink@hypertext +}% +\def\href@Hy{\hyper@normalise \href@ }% +\def\href@Hy@ltx{\@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}}% +\def\Hy@href#{\hyper@normalise\href@}% +\begingroup + \endlinechar=-1 % + \catcode`\^^A=14 % + \catcode`\^^M\active + \catcode`\%\active + \catcode`\#\active + \catcode`\_\active + \catcode`\$\active + \catcode`\&\active + \gdef\hyper@normalise@ltx{^^A + \begingroup + \catcode`\^^M\active + \def^^M{ }^^A + \catcode`\%\active + \let%\@percentchar + \let\%\@percentchar + \catcode`\#\active + \def#{\hyper@hash}^^A + \def\#{\hyper@hash}^^A + \@makeother\&^^A + \edef&{\string&}^^A + \edef\&{\string&}^^A + \edef\textunderscore{\string_}^^A + \let\_\textunderscore + \catcode`\_\active + \let_\textunderscore + \let~\hyper@tilde + \let\~\hyper@tilde + \let\textasciitilde\hyper@tilde + \let\\\@backslashchar + \edef${\string$}^^A + \Hy@safe@activestrue + \hyper@n@rmalise + }^^A + \catcode`\#=6 ^^A + \gdef\Hy@ActiveCarriageReturn@ltx{^^M}^^A + \gdef\hyper@n@rmalise@ltx#1#2{^^A + \def\Hy@tempa{#2}^^A + \ifx\Hy@tempa\Hy@ActiveCarriageReturn + \Hy@ReturnAfterElseFi{^^A + \hyper@@normalise{#1}^^A + }^^A + \else + \Hy@ReturnAfterFi{^^A + \hyper@@normalise{#1}{#2}^^A + }^^A + \fi + }^^A + \gdef\hyper@@normalise@ltx#1#2{^^A + \edef\Hy@tempa{^^A + \endgroup + \noexpand#1{\Hy@RemovePercentCr#2%^^M\@nil}^^A + }^^A + \Hy@tempa + }^^A + \gdef\Hy@RemovePercentCr@ltx#1%^^M#2\@nil{^^A + #1^^A + \ifx\limits#2\limits + \else + \Hy@ReturnAfterFi{^^A + \Hy@RemovePercentCr #2\@nil + }^^A + \fi + }^^A +\endgroup +\def\switch@hyperref@href{% + \expandafter\@ifx\expandafter{\csname href \endcsname\href@Hy}{ + \class@info{Repairing hyperref 6.75r \string\href}% + \let\hyper@normalise\hyper@normalise@ltx + \let\hyper@@normalise\hyper@@normalise@ltx + \let\hyper@n@rmalise\hyper@n@rmalise@ltx + \let\Hy@ActiveCarriageReturn\Hy@ActiveCarriageReturn@ltx + \let\Hy@RemovePercentCr\Hy@RemovePercentCr@ltx + \let\href\href@Hy@ltx + }{}% +}% +\appdef\document@inithook{\switch@hyperref@href}% \def\typeout@org#1{% \begingroup \set@display@protect @@ -1952,7 +2045,8 @@ \let\typeout\typeout@ltx }{}% \typeout{% - ltxfront [2009/10/06/20:20 4.1g]: Arthur Ogawa (after David P. Carlisle)% +ltxfront% + [2010/07/25/20:33:00 4.1r frontmatter package (AO,DPC)]% \fileversion }% \appdef\class@documenthook{\frontmatter@init}% \let\frontmatter@init\@empty @@ -1997,6 +2091,7 @@ \@author@init }% \def\@author@def#1#2{% + \frontmatterverbose@sw{\typeout{\string\author\space\string\collaboration}}{}% \move@AU\move@AF\move@AUAF \let\@AF@join\@author@join #1% @@ -2027,18 +2122,29 @@ \frontmatterverbose@sw{\say#3}{}% }% \def\@author@finish{% + \frontmatterverbose@sw{\typeout{\string\@author@finish}}{}% \move@AU\move@AF - \@ifx{\AU@grp\@empty}{}{% + \@ifx{\AU@grp\@empty}{% + \@ifx{\CO@grp\@empty}% + }{% + \false@sw + }% + {}{% \@ifx{\AF@grp\@empty}{% \begingroup - \frontmatterverbose@sw{\say\AU@grp}{}% \let\href\@secondoftwo \let\AU@opr\@secondofthree \let\CO@opr\@secondofthree \let\footnote\@gobble - \class@warn{Assuming \string\noaffiliation\space for \AU@grp}% + \@ifx{\CO@grp\@empty}{% + \class@warn{Assuming \string\noaffiliation\space for authors}% + \frontmatterverbose@sw{\say\AU@grp}% + }{% + \class@warn{Assuming \string\noaffiliation\space for collaboration}% + \frontmatterverbose@sw{\say\CO@grp}{}% + }% \endgroup - \@affil@def{}\move@AF + \@affil@none\move@AF }{}% }% \move@AUAF @@ -2055,6 +2161,7 @@ {\cat@comma@active\gdef,{\active@comma}}% \def\active@comma{,\penalty-300\relax}% \newcommand\affiliation{% + \frontmatterverbose@sw{\typeout{\string\affiliation}}{}% \move@AU\move@AF \begingroup \cat@comma@active @@ -2066,15 +2173,20 @@ \@affil@def{#1}% }% \newcommand\frontmatter@noaffiliation{% + \frontmatterverbose@sw{\typeout{\string\noaffiliation}}{}% \move@AU\move@AF - \@affil@def{}\move@AF + \@affil@none\move@AF \move@AUAF }% \def\blankaffiliation{{}}% \def\@affil@cleared{{{}}{}}% +\def\@affil@nil{{\relax}{}}% \appdef\frontmatter@init{% \@affil@init }% +\def\@affil@none{% + \let\@affil\@affil@nil +}% \def\@affil@init{% \let\@affil\@affil@cleared }% @@ -2101,17 +2213,18 @@ \@ifx{\@tempb\@tempd}{}{% \class@warn{% Ancillary information for \@tempa\space must not be different! - Please put it on the first instance% + Please put all of it on the first instance% }% }% }% }% {% - \@if@empty{\expandafter\@firstoftwo\@affil}{% - \def\@tempc{\z@}% - \@argswap@val{\z@}% + \@ifx{\@affil\@affil@nil}{% + \def\@tempc{0}% + \@argswap@val{0}% }{% \advance\c@affil\@ne + \expandafter\def\expandafter\@tempc\expandafter{\the\c@affil}% \expandafter\@argswap@val\expandafter{\the\c@affil}% }% {% @@ -2121,8 +2234,9 @@ }% }% }% - \appdef@eval\AF@grp{\the\c@affil}% }% + \appdef@eval\AF@grp\@tempc + \frontmatterverbose@sw{\say\AF@grp}{}% \@affil@init }% }% @@ -2161,29 +2275,26 @@ }% }% \def\move@AUAF{% - \@ifx{\AF@grp\@empty}% - {% - \@ifx{\@empty\CO@grp}{}{% + \frontmatterverbose@sw{\say\AU@grp\say\AF@grp\say\CO@grp}{}% + \@ifx{\AF@grp\@empty}{% + \@ifx{\@empty\CO@grp}{% + }{% + \appdef \@AAC@list{\AF@opr{{0}}}% \appdef@e \@AAC@list{\CO@grp}% \appdef@e \@AFG@list{\CO@grp}% \let\CO@grp\@empty }% }{% - \appdef \@AAC@list{\AF@opr}% - \appdef@eval\@AAC@list{\AF@grp}% - \appdef@e \@AAC@list{\AU@grp}% - \frontmatterverbose@sw{\say\@AAC@list}{}% + \appdef \@AAC@list{\AF@opr}% + \appdef@eval\@AAC@list{\AF@grp}% + \appdef@e \@AAC@list{\AU@grp}% \@ifx{\@empty\AU@grp}{% - \@ifx{\@empty\CO@grp}{% - \false@sw - }{% - \true@sw - }% + \@ifx{\@empty\CO@grp}% }{% - \true@sw + \false@sw }% {% - \@ifx{\@empty\AF@grp}{}{% + }{% \@booleanfalse\temp@sw \def\AFG@opr{\x@match\AF@grp}% \let\CO@opr\@author@gobble @@ -2192,12 +2303,11 @@ \appdef \@AFG@list{\AFG@opr}% \appdef@eval\@AFG@list{\AF@grp}% }% - }% \@ifx{\@empty\CO@grp}{}{% + \appdef@e \@AAC@list{\CO@grp}% \appdef@e \@AFG@list{\CO@grp}% \let\CO@grp\@empty }% - }{% }% \let\CO@grp\@empty \let\AU@grp\@empty @@ -2235,10 +2345,9 @@ \newcommand*\homepage[1][]{\begingroup\sanitize@url\@homepage{#1}}% \def\@homepage#1#2{% \endgroup - \@AF@join{#1\url{#2}}% + \@AF@join{#1\href{#2}{#2}}% }% \appdef\class@documenthook{% - \providecommand\url{}% \providecommand\href[1]{}% }% \def\frontmatter@thanks{% implicit #1 @@ -2269,26 +2378,11 @@ \def\@listand{\@ifnum{\@tempcnta=\tw@}{\andname\space}{}}% \def\@listcomma@comma{\@ifnum{\@tempcnta>\@ne}{,}{}}% \def\@listcomma@comma@UK{\@ifnum{\@tempcnta>\tw@}{,}{}}% -\def\@collaboration@err#1#2{% -}% +\def\@collaboration@gobble#1#2#3{}% \def\doauthor#1#2#3{% \ignorespaces#1\unskip\@listcomma \begingroup - \def\@tempifx{#3}% - \@ifx{\@tempifx\@empty}{% - \false@sw - }{% - \@ifnum{\c@affil<\affil@cutoff}{% - \false@sw - }{% - \true@sw - }% - }% - {% - #3\aftergroup\true@sw - }{% - \aftergroup\false@sw - }% + #3% \@if@empty{#2}{\endgroup{}{}}{\endgroup{\comma@space}{}\frontmatter@footnote{#2}}% \space \@listand }% @@ -2323,18 +2417,19 @@ \expandafter{\@tempb}% }{% \stepcounter\@mpfn - \protected@xdef\@tempb{\the\csname c@\@mpfn\endcsname}% - \expandafter\frontmatter@footnotemark - \expandafter{\@tempb}% - \expandafter\g@addto@macro - \expandafter\@FMN@list + \expandafter\expandafter + \expandafter\frontmatter@foot@mark + \expandafter\expandafter \expandafter{% - \expandafter \@TBN@opr - \expandafter {\@tempb}{#1}% - }% + \expandafter \the\csname c@\@mpfn\endcsname + }{#1}% }% \endgroup }% +\def\frontmatter@foot@mark#1#2{% + \frontmatter@footnotemark{#1}% + \g@addto@macro\@FMN@list{\@TBN@opr{#1}{#2}}% +}% \appdef\frontmatter@init{% \global\let\@FMN@list\@empty }% @@ -2344,7 +2439,7 @@ \begingroup \hyper@linkstart {link}{frontmatter.#1}% \csname c@\@mpfn\endcsname#1\relax - \def\@thefnmark{\thempfn}% + \def\@thefnmark{\frontmatter@thefootnote}% \@makefnmark \hyper@linkend \endgroup @@ -2418,10 +2513,10 @@ \set@footnotefont \set@footnotewidth \@parboxrestore - \protected@edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}% + \protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}% \color@begingroup \frontmatter@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -2551,9 +2646,10 @@ \def\titleblock@produce{% \begingroup \ltx@footnote@pop - \let\thefootnote\frontmatter@thefootnote + \def\@mpfn{mpfootnote}% + \def\thempfn{\thempfootnote}% + \c@mpfootnote\z@ \let\@makefnmark\frontmatter@makefnmark - \global\c@footnote\z@ \frontmatter@setup \thispagestyle{titlepage}\label{FirstPage}% \frontmatter@title@produce @@ -2602,7 +2698,7 @@ \def\frontmatter@author@produce@script{% \begingroup \let\@author@present\@author@present@script - \frontmatterverbose@sw{\say\@AAC@list}{}% + \frontmatterverbose@sw{\typeout{\string\frontmatter@author@produce@script:}\say\@AAC@list\say\@AFF@list\say\@AFG@list}{}% \let\AU@temp\@empty \@tempcnta\z@ \let\AF@opr \@gobble @@ -2623,7 +2719,6 @@ \begingroup \frontmatter@above@affiliation@script \let\AFF@opr \@affil@script - \frontmatterverbose@sw{\say\@AFF@list}{}% \@AFF@list \frontmatter@footnote@produce \par @@ -2639,6 +2734,7 @@ \begingroup \frontmatter@collaboration@above \@affilID@def{}% + \@tempcnta\z@ \@author@present{}{(\ignorespaces#3\unskip)}{#4}% \par \endgroup @@ -2682,10 +2778,7 @@ \def\@author@present@script#1#2#3{% \begingroup \gdef\comma@space{\textsuperscript{,\,}}% - \doauthor{#2}{#3}{% - \let\@tempa\@empty - \expandafter\@affil@present@script\@affilID@temp\relax - }% + \doauthor{#2}{#3}{\@affil@present@script}% \endgroup \advance\@tempcnta\m@ne }% @@ -2705,14 +2798,21 @@ }% }% }% -\def\@affil@present@script#1{% +\def\@affil@present@script{% + \let\@tempa\@empty + \expandafter\@affil@present@script@\@affilID@temp\relax +}% +\def\@affil@present@script@#1{% \@ifx{\relax#1}{% - \@ifx{\@tempa\@empty}{}{% + \@ifx{\@tempa\@empty}{% + \aftergroup\false@sw + }{% \textsuperscript{\expandafter\@affilcomma\@tempa\relax\relax}% + \aftergroup\true@sw }% }{% - \@ifx{\z@#1}{}{\appdef\@tempa{{#1}}}% - \@affil@present@script + \@ifnum{#1=\z@}{}{\appdef\@tempa{{#1}}}% + \@affil@present@script@ }% }% \@provide\@author@parskip{\z@skip}% @@ -2720,7 +2820,7 @@ \begingroup \let\@author@present\@author@present@group \frontmatter@authorformat - \frontmatterverbose@sw{\say\@AFG@list}{}% + \frontmatterverbose@sw{\typeout{\string\frontmatter@author@produce@group:}\say\@AAC@list\say\@AFF@list\say\@AFG@list}{}% \let\AU@temp\@empty \set@listcomma@list\AU@temp \def\CO@opr{\@collaboration@present\AU@temp}% @@ -2735,7 +2835,6 @@ \@provide\frontmatter@authorbelow{}% \def\affils@present@group#1{% \begingroup - \frontmatterverbose@sw{\say\@AAC@list}{}% \def\AF@temp{#1}% \@tempcnta\z@ \let\AU@opr \@undefined @@ -2768,9 +2867,8 @@ \def@after@address \runinaddress@sw{% }{% - \tightenlines@sw{% - }{% - \parskip\z@ %space between affilations in grouped mode + \tightenlines@sw{}{% + \parskip\z@ }% \appdef\after@address\par }% @@ -2790,7 +2888,7 @@ }{% \let\AU@opr \@author@gobble }% - \let\CO@opr \@collaboration@err + \let\CO@opr \@collaboration@gobble }% \def\@affilID@match#1#2{% \def\@tempifx{#2}% @@ -2799,7 +2897,7 @@ }{% \let\AU@opr \@author@gobble }% - \let\CO@opr \@collaboration@err + \let\CO@opr \@collaboration@gobble }% \def\do@affil@fromgroup#1#2{% \@ifx{\relax#2}{}{% @@ -2823,9 +2921,12 @@ }% \def\@author@present@group#1#2#3{% \gdef\comma@space{\gdef\comma@space{\textsuperscript{,\,}}}% - \doauthor{#2}{#3}{}% + \doauthor{#2}{#3}{\@affil@present@group}% \advance\@tempcnta\m@ne }% +\def\@affil@present@group{% + \aftergroup\false@sw +}% \def\@pacs@produce#1{% \showPACS@sw{% \begingroup @@ -2859,7 +2960,7 @@ \def\present@FM@footnote#1#2{% \begingroup \csname c@\@mpfn\endcsname#1\relax - \def\@thefnmark{\thempfn}% + \def\@thefnmark{\frontmatter@thefootnote}% \frontmatter@footnotetext{#2}% \endgroup }% @@ -2873,7 +2974,7 @@ \@ifxundefined\comma@space {\let\comma@space\@empty}{}% }% \def\frontmatter@thefootnote{% - \altaffilletter@sw{\@alph}{\@fnsymbol}\c@footnote + \altaffilletter@sw{\@alph}{\@fnsymbol}{\csname c@\@mpfn\endcsname}% }% \@ifx{\altaffilletter@sw\@undefined}{\@booleantrue\altaffilletter@sw}{}% \def\frontmatter@makefnmark{% @@ -2884,7 +2985,7 @@ \long\def\frontmatter@makefntext#1{% \parindent 1em \noindent - \Hy@raisedlink{\hyper@anchorstart{frontmatter.\the\c@footnote}\hyper@anchorend}% + \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}% \@makefnmark #1% }% @@ -2980,7 +3081,8 @@ \let\noaffiliation\@empty }% \typeout{% - ltxgrid [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% +ltxgrid% + [2010/07/25/20:33:00 4.1r page grid package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion }% \newcounter{linecount} \def\loop@line#1#2{% @@ -2988,13 +3090,20 @@ \hb@xt@\hsize{% \global\advance#1\@ne \edef\@tempa{\@ifnum{100>#1}{0}{}\@ifnum{10>#1}{0}{}\number#1}% - \@tempa\edef\@tempa{\special{trace:\@tempa}}\@tempa + \@tempa\edef\@tempa{\special{line:\@tempa}}\@tempa \vrule depth2.5\p@#2\leaders\hrule\hfil }% }% \def\lineloop#1{% \loopwhile{\loop@line\c@linecount{}\@ifnum{#1>\c@linecount}}% }% +\def\linefoot#1{% + \loop@line\c@linecount{% + \footnote{% + #1\special{foot:#1}\vrule depth2.5\p@\leaders\hrule\hfill + }% + }% +}% \let\@@mark\mark \let\@@topmark\topmark \let\@@firstmark\firstmark @@ -3072,6 +3181,7 @@ \expandafter\@ifx\expandafter{\csname output@-\the\execute@message@pen\endcsname\output@procedure}{% \let\output@procedure\@message@saved }{}% + \ltxgrid@info@sw{\class@info{\string\dispatch@output}\say\output@procedure\saythe\holdinginserts}{}% \outputdebug@sw{\output@debug}{}% \output@procedure }% @@ -3080,40 +3190,51 @@ \expandafter\let\expandafter#1\csname output@\the\count@\endcsname }% \def\output@debug{% - \saythe\inputlineno - \saythe\holdinginserts - \saythe\outputpenalty - \saythe\interlinepenalty - \saythe\brokenpenalty - \saythe\clubpenalty - \saythe\widowpenalty - \saythe\displaywidowpenalty - \saythe\predisplaypenalty - \saythe\interdisplaylinepenalty - \saythe\postdisplaypenalty - \say\output@procedure - \saythe\badness - \say\thepagegrid - \saythe\pagegrid@col - \saythe\pagegrid@cur - \saythe\insertpenalties - \say\@@botmark - \saythe\pagegoal - \saythe\pagetotal - \saythe{\badness\@cclv}% - \say\@toplist - \say\@botlist - \say\@dbltoplist - \say\@deferlist - \trace@scroll{% + \def\@tempa{\save@message}% + \@ifx{\output@procedure\@tempa}{% + \true@sw + }{% + \@ifnum{\outputpenalty=-\save@column@insert@pen}{% + \@ifnum{\holdinginserts>\z@}% + }{% + \false@sw + }% + }% + {}{\output@debug@}% +}% +\def\output@debug@{% + \saythe\outputpenalty + \saythe\interlinepenalty + \saythe\brokenpenalty + \saythe\clubpenalty + \saythe\widowpenalty + \saythe\displaywidowpenalty + \saythe\predisplaypenalty + \saythe\interdisplaylinepenalty + \saythe\postdisplaypenalty + \saythe\badness + \say\thepagegrid + \saythe\pagegrid@col + \saythe\pagegrid@cur + \saythe\insertpenalties + \say\@@botmark + \saythe\pagegoal + \saythe\pagetotal + \saythe{\badness\@cclv}% + \say\@toplist + \say\@botlist + \say\@dbltoplist + \say\@deferlist + \trace@scroll{% \showbox\@cclv \showbox\@cclv@saved \showbox\pagesofar + \showbox\csname col@1\endcsname \showbox\footsofar - \showbox\footins@saved \showbox\footins + \showbox\footins@saved \showlists - }% + }% }% \@ifxundefined{\outputdebug@sw}{% \@booleanfalse\outputdebug@sw @@ -3219,13 +3340,9 @@ }% }{}% \@cclv@nontrivial@sw{% - \expandafter\let\expandafter\output@prep@\csname output@prep@\bot@envir \endcsname - \outputdebug@sw{\say\output@prep@}{}% - \@ifx{\output@prep@\relax}{\output@prep@document}{\output@prep@}% + \expandafter\output@do@prep\csname output@prep@\bot@envir \endcsname \@makecolumn\true@sw - \expandafter\let\expandafter\output@column@\csname output@column@\thepagegrid\endcsname - \outputdebug@sw{\say\output@column@}{}% - \@ifx{\output@column@\relax}{\output@column@one}{\output@column@}% + \expandafter\output@column@do\csname output@column@\thepagegrid\endcsname \protect@penalty\do@startcolumn@pen \clearpage@sw{% \protect@penalty\do@endpage@pen @@ -3240,6 +3357,14 @@ \global\@mparbottom\z@ \global\@textfloatsheight\z@ }% +\def\output@do@prep#1{% + \outputdebug@sw{\class@info{Prep: \string#1}}{}% + \@ifx{#1\relax}{\output@prep@document}{#1}% +}% +\def\output@column@do#1{% + \outputdebug@sw{\class@info{Output column: \string#1}}{}% + \@ifx{#1\relax}{\output@column@one}{#1}% +}% \def\void@cclv{\begingroup\setbox\z@\box\@cclv\endgroup}% \def\remove@lastbox{\setbox\z@\lastbox}% \def\@cclv@nontrivial@sw{% @@ -3329,67 +3454,90 @@ \@ifnum{\outputpenalty<\@M}{\penalty\outputpenalty}{}% }% \def\output@init@document{% - \set@adj@footins\vsize\global\vsize\vsize + \ltxgrid@info@sw{\class@info{\string\output@init@document}}{}% + \global\vsize\vsize }% \def\output@prep@document{% - \@ifvoid\footsofar{}{% - \setbox\footins\vbox\bgroup + \ltxgrid@foot@info@sw{\class@info{\string\output@prep@document}\trace@scroll{\showbox\footins\showbox\footsofar}}{}% + \@ifvoid\footsofar{% + }{% + \global\setbox\footins\vbox\bgroup \unvbox\footsofar \@ifvoid\footins{}{% \marry@baselines \unvbox\footins }% \egroup + \ltxgrid@foot@info@sw{\trace@box\footins}{}% }% }% \def\output@post@document{}% \let\@opcol\@undefined \def\@makecolumn#1{% - \setbox\@outputbox\vbox{% + \ltxgrid@foot@info@sw{\class@info{\string\@makecolumn\string#1}}{}% + \setbox\@outputbox\vbox\bgroup \boxmaxdepth\@maxdepth \@tempdima\dp\@cclv \unvbox\@cclv \vskip-\@tempdima - }% + \egroup \xdef\@freelist{\@freelist\@midlist}\global\let\@midlist\@empty \show@text@box@size \@combinefloats #1{% \@combineinserts\@outputbox\footins }{% - \combine@foot@inserts + \combine@foot@inserts\footsofar\footins }% \set@adj@colht\dimen@ \count@\vbadness \vbadness\@M - \setbox\@outputbox\vbox to\dimen@{% + \setbox\@outputbox\vbox to\dimen@\bgroup \@texttop \dimen@\dp\@outputbox \unvbox\@outputbox \vskip-\dimen@ \@textbottom - }% + \egroup \vbadness\count@ \global\maxdepth\@maxdepth }% \let\@makespecialcolbox\@undefined \def\@combineinserts#1#2{% - \setbox#1\vbox{% + \ltxgrid@foot@info@sw{\class@info{\string\@combineinserts\string#1\string#2}\trace@box#2}{}% + \setbox#1\vbox\bgroup \unvbox#1% - \vbox{% - \@ifvoid#2{}{% - \show@box@size{Combining inserts}#2% - \vskip\skip#2% - \color@begingroup - \normalcolor - \footnoterule - \nointerlineskip - \box#2% - \color@endgroup - }{}% + \@ifvoid{#2}{}{% + \dimen@\ht#2\advance\dimen@\dp#2\advance\dimen@\skip#2% + \show@box@size{Combining inserts}#2% + \vskip\skip#2% + \setbox\z@\vbox{\footnoterule}\dimen@i\ht\z@ + \color@begingroup + \normalcolor + \cleaders\box\z@\vskip\dimen@i\kern-\dimen@i + \csname combine@insert@\the\pagegrid@col\endcsname#2% + \color@endgroup + \kern-\dimen@\kern\dimen@ }% - }% + \egroup + \ltxgrid@foot@info@sw{\trace@box#1}{}% +}% +\def\combine@insert@tw@#1{% + \compose@footnotes@two#1\@ifvbox{#1}{\unvbox}{\box}#1% +}% +\def\combine@insert@@ne#1{% + \compose@footnotes@one#1\@ifvbox{#1}{\unvbox}{\box}#1% +}% +\def\twocolumn@grid@setup{% + \expandafter\let\csname combine@insert@1\endcsname\combine@insert@tw@ + \expandafter\let\csname combine@insert@2\endcsname\combine@insert@@ne }% +\def\onecolumn@grid@setup{% + \expandafter\let\csname combine@insert@1\endcsname\combine@insert@@ne + \expandafter\let\csname combine@insert@2\endcsname\combine@insert@@ne +}% +\let\columngrid@setup\onecolumn@grid@setup +\columngrid@setup \appdef\@floatplacement{% \global\@fpmin\@fpmin }% @@ -3683,20 +3831,21 @@ \mathchardef\do@newpage@pen=10001 \expandafter\let\csname output@-\the\do@newpage@pen\endcsname\relax \def\@clearfloatplacement{% - \global\@topnum \maxdimen % \c@topnumber - \global\@toproom \maxdimen % \topfraction\@colht - \global\@botnum \maxdimen % \c@bottomnumber - \global\@botroom \maxdimen % \bottomfraction\@colht - \global\@colnum \maxdimen % \c@totalnumber - \global\@dbltopnum \maxdimen % \c@dbltopnumber - \global\@dbltoproom \maxdimen % \dbltopfraction\@colht - \global\@textmin \z@ % \@colht\advance \@textmin -\@dbltoproom - \global\@fpmin \z@ % \dblfloatpagefraction\textheight + \global\@topnum \maxdimen + \global\@toproom \maxdimen + \global\@botnum \maxdimen + \global\@botroom \maxdimen + \global\@colnum \maxdimen + \global\@dbltopnum \maxdimen + \global\@dbltoproom \maxdimen + \global\@textmin \z@ + \global\@fpmin \z@ \let\@testfp\@gobble \appdef\@setfloattypecounts{\@fpstype16\advance\@fpstype\m@ne}% }% \let\@doclearpage\@undefined \let\@makefcolumn\@undefined +\let\@makecol\@undefined \def\clr@top@firstmark{% \global\let\saved@@topmark\@undefined \global\let\saved@@firstmark\@empty @@ -4056,18 +4205,30 @@ }% }% \def\savecolumn@moving{% + \ltxgrid@info@sw{\class@info{\string\savecolumn@moving}}{}% \@cclv@nontrivial@sw{% \save@column }{% \void@cclv }% \@ifvoid\footins{}{% - \outputdebug@sw{\trace@box\footins}{}% - \global\setbox\footins@saved\vbox{\unvbox\footins@saved\marry@baselines\unvbox\footins}% + \ltxgrid@foot@info@sw{\class@info{\string\savecolumn@moving}\trace@scroll{\showbox\footins@saved\showbox\footins}}{}% + \@ifvoid\footins@saved{% + \global\setbox\footins@saved\box\footins + }{% + \global\setbox\footins@saved\vbox\bgroup + \unvbox\footins@saved + \marry@baselines + \unvbox\footins + \egroup + }% + \ltxgrid@foot@info@sw{\trace@box\footins@saved}{}% \protect@penalty\save@column@insert@pen }% }% \newbox\footins@saved +\newbox\footins@recovered +\newbox\column@recovered \mathchardef\save@message@pen=10018 \@namedef{output@-\the\save@message@pen}{\save@message}% \def\save@message{% @@ -4083,7 +4244,11 @@ \@execute@message\save@column@pen }% \def\execute@message@insert#1{% - \@execute@message\save@column@insert@pen{\setbox \footins \box \footins@saved#1}% + \@execute@message\save@column@insert@pen{% + \setbox \footins \box \footins@saved + \ltxgrid@foot@info@sw{\class@info{\string\execute@message@insert}\trace@box\footins}{}% + #1% + }% }% \long\def\@execute@message#1#2{% \begingroup @@ -4201,34 +4366,46 @@ \def\thepagegrid{one}% \newbox\pagesofar \newbox\footsofar -\def\combine@foot@inserts{% - \@ifvoid\footins{% - }{% - \@ifvoid\footsofar{% - \global\setbox\footsofar\box\footins - }{% - \global\setbox\footsofar\vbox\bgroup - \unvbox\footsofar - \marry@baselines - \unvbox\footins +\def\combine@foot@inserts#1#2{% + \ltxgrid@info@sw{\class@info{\string\combine@foot@inserts\string#1\string#2}}{}% + \@ifvoid#1{% + \ltxgrid@foot@info@sw{\trace@box#2}{}\global\setbox#1\box#2% + }{% + \global\setbox#1\vbox\bgroup + \ltxgrid@foot@info@sw{\trace@box#1}{}\unvbox#1% + \@ifvoid#2{}{% + \marry@baselines + \ltxgrid@foot@info@sw{\trace@box#2}{}\unvbox#2% + }% \egroup }% - }% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2}}{}% }% \newcommand\onecolumngrid{\do@columngrid{one}{\@ne}}% \let\onecolumn\@undefined \def\open@column@one#1{% + \ltxgrid@info@sw{\class@info{\string\open@column@one\string#1}}{}% \unvbox\pagesofar + \@ifvoid{\footsofar}{}{% + \insert\footins\bgroup\unvbox\footsofar\egroup + \penalty\z@ + }% \gdef\thepagegrid{one}% \global\pagegrid@col#1% \global\pagegrid@cur\@ne - \set@colht + \global\count\footins\@m + \global\divide\count\footins\tw@ \set@column@hsize\pagegrid@col + \set@colht }% \def\shut@column@one{% + \ltxgrid@info@sw{\class@info{\string\shut@column@one}}{}% \@makecolumn\false@sw - \global\setbox\pagesofar\vbox{\unvbox\@outputbox\recover@footins}% - \combine@foot@inserts + \global\setbox\pagesofar\vbox\bgroup + \recover@column\@outputbox\footsofar\column@recovered\footins@recovered + \egroup + \begingroup\setbox\z@\box\@outputbox\endgroup + \combine@foot@inserts\footsofar\footins \set@colht }% \def\float@column@one{% @@ -4271,13 +4448,19 @@ \let\twocolumn\@undefined \let\@topnewpage\@undefined \def\open@column@mlt#1{% + \ltxgrid@info@sw{\class@info{\string\open@column@mlt\string#1}}{}% + \@ifvoid{\footsofar}{}{% + \insert\footins\bgroup\unvbox\footsofar\egroup + }% \gdef\thepagegrid{mlt}% \global\pagegrid@col#1% \global\pagegrid@cur\@ne + \global\count\footins\@m \set@column@hsize\pagegrid@col \set@colht }% \def\shut@column@mlt{% + \ltxgrid@info@sw{\class@info{\string\shut@column@mlt}}{}% \@cclv@nontrivial@sw{% \@makecolumn\false@sw \@ifnum{\pagegrid@cur<\pagegrid@col}{% @@ -4289,7 +4472,7 @@ }% \@ifnum{\pagegrid@cur>\@ne}{% \csname balance@\the\pagegrid@col\endcsname - \grid@column{}% + \grid@column\@outputbox{}% \@combinepage\false@sw \@combinedblfloats \global\setbox\pagesofar\box\@outputbox @@ -4341,7 +4524,7 @@ \global\advance\pagegrid@cur\@ne }{% \set@adj@colht\dimen@ - \grid@column{}% + \grid@column\@outputbox{}% \@output@combined@page }% }% @@ -4350,6 +4533,31 @@ \def\@addmarginpar@mlt{% emits a boolean \@ifnum{\pagegrid@cur=\@ne}% }% +\def\set@footnotewidth@one{% + \hsize\columnwidth + \linewidth\hsize +}% +\def\set@footnotewidth@two{\set@footnotewidth@mlt\tw@}% +\def\set@footnotewidth@mlt#1{% + \hsize\textwidth + \advance\hsize\columnsep + \divide\hsize#1% + \advance\hsize-\columnsep + \linewidth\hsize +}% +\def\compose@footnotes@one#1{% + \ltxgrid@foot@info@sw{\class@info{\string\compose@footnotes@one\string#1}\trace@box#1}{}% +}% +\let\compose@footnotes\compose@footnotes@one +\def\compose@footnotes@two#1{% + \ltxgrid@foot@info@sw{\class@info{\string\compose@footnotes@two\string#1}\trace@box#1}{}% + \setbox\z@\box\@tempboxa + \let\recover@column\recover@column@null + \let\marry@baselines\@empty + \balance@two#1\@tempboxa + \global\setbox#1\hbox to\textwidth{\box#1\hfil\box\@tempboxa}% + \ltxgrid@foot@info@sw{\trace@box#1}{}% +}% \let\pagegrid@cur\col@number \let\col@number\@undefined \newcount\pagegrid@col @@ -4360,7 +4568,7 @@ \def\pagegrid@init{% \advance\pagegrid@cur\@ne \@ifnum{\pagegrid@cur<\pagegrid@col}{% - \csname newbox\expandafter\endcsname\csname col@\the\pagegrid@cur\endcsname + \csname newbox\expandafter\endcsname\csname col@\the\pagegrid@cur\endcsname \pagegrid@init }{% }% @@ -4368,46 +4576,52 @@ \appdef\class@documenthook{% \pagegrid@init }% -\def\grid@column#1{% - \global\setbox\@outputbox\vbox{% - \hb@xt@\textwidth{% - \vrule\@height\z@\@width\z@\@if@empty{#1}{}{\@depth#1}% +\def\grid@column#1#2{% + \ltxgrid@info@sw{\class@info{\string\grid@column\string#1}}{}% + \global\setbox#1\vbox\bgroup + \hb@xt@\textwidth\bgroup + \vrule\@height\z@\@width\z@\@if@empty{#2}{}{\@depth#2}% \pagegrid@cur\@ne - \append@column - \box@column\@outputbox - }% - \vskip\z@skip % FIXME: page depth! - }% + \@ifnum{\pagegrid@cur<\pagegrid@col}{\loopwhile{\append@column@\pagegrid@cur\pagegrid@col}}{}% + \box@column#1% + \egroup + \vskip\z@skip + \egroup }% -\def\append@column{% - \@ifnum{\pagegrid@cur<\pagegrid@col}{% - \expandafter\box@column\csname col@\the\pagegrid@cur\endcsname - \hfil - \vrule \@width\columnseprule - \hfil - \advance\pagegrid@cur\@ne - \append@column - }{% - }% +\def\append@column@#1#2{% + \expandafter\box@column\csname col@\the#1\endcsname + \hfil\vrule\@width\columnseprule\hfil + \advance#1\@ne + \@ifnum{#1<#2}% }% \def\box@column#1{% + \ltxgrid@info@sw{\class@info{\string\box@column\string#1}}{}% \raise\topskip - \hb@xt@\columnwidth{% + \hb@xt@\columnwidth\bgroup \dimen@\ht#1\@ifdim{\dimen@>\@colht}{\dimen@\@colht}{}% \count@\vbadness\vbadness\@M \dimen@ii\vfuzz\vfuzz\maxdimen - \outputdebug@sw{\saythe\@colht\saythe\dimen@}{}% - \vtop to\dimen@ - {\hrule\@height\z@ + \ltxgrid@info@sw{\saythe\@colht\saythe\dimen@}{}% + \vtop to\dimen@\bgroup + \hrule\@height\z@ \unvbox#1% \raggedcolumn@skip - }% + \egroup \vfuzz\dimen@ii \vbadness\count@ \hss - }% + \egroup }% \def\marry@baselines{% + \begingroup + \setbox\z@\lastbox + \@ifvoid{\z@}{% + \endgroup + }{% + \aftergroup\kern + \aftergroup-% + \expandafter\box\expandafter\z@\expandafter\endgroup\the\dp\z@\relax + }% \vskip\marry@skip\relax }% \gdef\marry@skip{\z@skip}% @@ -4426,6 +4640,7 @@ \vskip\z@\raggedcolumn@sw{\@plus.0001fil\@minus.0001fil}{}\relax }% \def\@combinepage#1{% + \ltxgrid@foot@info@sw{\class@info{\string\@combinepage\string#1}}{}% \@ifvoid\pagesofar{}{% \setbox\@outputbox\vbox{% \unvbox\pagesofar @@ -4437,6 +4652,7 @@ \@ifvoid\footsofar{}{% \show@box@size{Combining page footnotes}\footsofar \setbox\footins\box\footsofar + \compose@footnotes \@combineinserts\@outputbox\footins }% }{% @@ -4501,18 +4717,20 @@ \set@colroom }% \def\set@adj@textheight#1{% + \ltxgrid@info@sw{\class@info{\string\set@adj@textheight\string#1}\saythe\textheight}{}% #1\textheight \def\@elt{\adj@page#1}% \@booleantrue\firsttime@sw\@dbltoplist \let\@elt\relax \global#1#1\relax - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\saythe#1}{}% }% \def\set@colroom{% + \ltxgrid@info@sw{\class@info{\string\set@colroom}}{}% \set@adj@colht\@colroom \@if@empty\enlarge@colroom{}{% \global\advance\@colroom\enlarge@colroom\relax - \outputdebug@sw{\saythe\@colroom}{}% + \ltxgrid@info@sw{\saythe\@colroom}{}% }% \@ifdim{\@colroom>\topskip}{}{% \ltxgrid@info{Not enough room: \string\@colroom=\the\@colroom; increasing to \the\topskip}% @@ -4523,16 +4741,15 @@ }% \def\set@vsize{% \global\vsize\@colroom - \outputdebug@sw{\saythe\vsize}{}% + \ltxgrid@info@sw{\class@info{\string\set@vsize\string\vsize=\string\colroom}\saythe\vsize}{}% }% \def\set@adj@colht#1{% #1\@colht - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\set@adj@colht\string#1-\string\pagesofar}\saythe#1}{}% \@ifvoid\pagesofar{}{% \advance#1-\ht\pagesofar\advance#1-\dp\pagesofar - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\pagesofar}\saythe#1}{}% }% - \set@adj@footins#1% \def\@elt{\adj@column#1}% \@booleantrue\firsttime@sw\@toplist \@booleantrue\firsttime@sw\@botlist @@ -4541,25 +4758,18 @@ \def\adj@column#1#2{% \advance#1-\ht#2% \advance#1-\firsttime@sw{\textfloatsep\@booleanfalse\firsttime@sw}{\floatsep}% - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\adj@column\string#1-\string#2}\saythe#1}{}% }% \def\adj@page#1#2{% \advance#1-\ht#2% \advance#1-\firsttime@sw{\dbltextfloatsep\@booleanfalse\firsttime@sw}{\dblfloatsep}% - \outputdebug@sw{\saythe#1}{}% -}% -\def\set@adj@footins#1{% - \@booleanfalse\temp@sw - \set@adj@box#1\footins - \set@adj@box#1\footins@saved - \set@adj@box#1\footsofar - \temp@sw{\advance#1-\skip\footins}{}% + \ltxgrid@info@sw{\class@info{\string\adj@page\string#1-\string#2}\saythe#1}{}% }% \def\set@adj@box#1#2{% \@ifvoid#2{}{% \advance#1-\ht#2\advance#1-\dp#2% \@booleantrue\temp@sw - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@foot@info@sw{\class@info{\string\set@adj@box\string#2}\saythe#1}{}% }% }% \appdef\@outputpage@tail{% @@ -4573,66 +4783,59 @@ \toks@{% \setbox\footins\box\footsofar \balance@two\col@1\@outputbox - \combine@foot@inserts - \@ifvoid\footsofar{}{% - \global - \setbox\footsofar\vbox\bgroup - \setbox\z@\box\@tempboxa - \let\recover@footins\relax - \balance@two\footsofar\@tempboxa - \hb@xt@\textwidth{\box\footsofar\hfil\box\@tempboxa}% - \egroup - }% + \global\setbox\col@1\box\col@1 + \global\setbox\@outputbox\box\@outputbox + \combine@foot@inserts\footsofar\footins }% \aftergroup\def\aftergroup\balance@2\expandafter \endgroup\expandafter{\the\toks@}% \def\balance@two#1#2{% + \ltxgrid@info@sw{\class@info{\string\balance@two\string#1\string#2}}{}% \outputdebug@sw{\trace@scroll{\showbox#1\showbox#2}}{}% - \setbox\@ne\vbox{% - \@ifvoid#1{}{% - \unvcopy#1\recover@footins - \@ifvoid#2{}{\marry@baselines}% + \setbox\thr@@\copy\footsofar + \setbox\@ne\vbox\bgroup + \@ifvoid{#1}{}{% + \recover@column#1\footsofar\column@recovered\footins@recovered + \@ifvoid{#2}{}{\marry@baselines}% }% - \@ifvoid#2{}{% - \unvcopy#2\recover@footins + \@ifvoid{#2}{}{% + \recover@column#2\footsofar\column@recovered\footins@recovered }% - }% + \egroup + \outputdebug@sw{\trace@scroll{\showbox\@ne}}{}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox\footsofar}}{}% \dimen@\ht\@ne\divide\dimen@\tw@ \dimen@i\dimen@ \vbadness\@M \vfuzz\maxdimen + \splittopskip\topskip \loopwhile{% - \dimen@i=.5\dimen@i - \outputdebug@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% \setbox\z@\copy\@ne\setbox\tw@\vsplit\z@ to\dimen@ - \setbox\z@ \vbox{% - \unvcopy\z@ - \setbox\z@\vbox{\unvbox\z@ \remove@lastbox\aftergroup\vskip\aftergroup-\expandafter}\the\dp\z@\relax - }% - \setbox\tw@\vbox{% - \unvcopy\tw@ - \setbox\z@\vbox{\unvbox\tw@\remove@lastbox\aftergroup\vskip\aftergroup-\expandafter}\the\dp\z@\relax - }% + \remove@depth\z@\remove@depth\tw@ \dimen@ii\ht\tw@\advance\dimen@ii-\ht\z@ - \@ifdim{\dimen@i>.5\p@}{% - \advance\dimen@\@ifdim{\dimen@ii<\z@}{}{-}\dimen@i - \true@sw + \dimen@i=.5\dimen@i + \ltxgrid@info@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% + \@ifdim{\dimen@ii<.5\p@}{% + \@ifdim{\dimen@ii>-.5\p@}% }{% - \@ifdim{\dimen@ii<\z@}{% - \advance\dimen@\tw@\dimen@i - \true@sw - }{% - \false@sw - }% + \false@sw }% - }% - \outputdebug@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% - \@ifdim{\ht\z@=\z@}{% - \@ifdim{\ht\tw@=\z@}{% + {% \true@sw }{% + \@ifdim{\dimen@i<.5\p@}% + }% + {% \false@sw }% + {% + \advance\dimen@\@ifdim{\dimen@ii<\z@}{}{-}\dimen@i + \true@sw + }% + }% + \ltxgrid@info@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% + \@ifdim{\ht\z@=\z@}{% + \@ifdim{\ht\tw@=\z@}% }{% \true@sw }% @@ -4641,38 +4844,63 @@ \ltxgrid@info{Unsatifactorily balanced columns: giving up}% \setbox\tw@\box#1% \setbox\z@ \box#2% + \global\setbox\footsofar\box\thr@@ }% \setbox\tw@\vbox{\unvbox\tw@\vskip\z@skip}% \setbox\z@ \vbox{\unvbox\z@ \vskip\z@skip}% \set@colht \dimen@\ht\z@\@ifdim{\dimen@<\ht\tw@}{\dimen@\ht\tw@}{}% \@ifdim{\dimen@>\@colroom}{\dimen@\@colroom}{}% - \outputdebug@sw{\saythe{\ht\z@}\saythe{\ht\tw@}\saythe\@colroom\saythe\dimen@}{}% + \ltxgrid@info@sw{\saythe{\ht\z@}\saythe{\ht\tw@}\saythe\@colroom\saythe\dimen@}{}% \setbox#1\vbox to\dimen@{\unvbox\tw@\unskip\raggedcolumn@skip}% \setbox#2\vbox to\dimen@{\unvbox\z@ \unskip\raggedcolumn@skip}% \outputdebug@sw{\trace@scroll{\showbox#1\showbox#2}}{}% }% -\def\recover@footins{% - \skip\z@ \lastskip\unskip - \skip\@ne\lastskip\unskip - \setbox\z@\lastbox - \@ifvbox\z@{% - \setbox\z@\vbox{% - \unvbox\z@ - \setbox\z@\lastbox - \@ifvoid\z@{}{% - \global\setbox\footsofar\vbox{% - \unvbox\footsofar - \@ifvbox\z@{% - \unvbox\z@ - }{% - \box\z@ - }% - }% - }% +\def\remove@depth#1{% + \setbox#1\vbox\bgroup + \unvcopy#1% + \setbox\z@\vbox\bgroup + \unvbox#1% + \setbox\z@\lastbox + \aftergroup\kern\aftergroup-\expandafter + \egroup + \the\dp\z@\relax + \egroup +}% +\def\recover@column#1#2#3#4{% + \ltxgrid@info@sw{\class@info{\string\recover@column\string#1\string#2\string#3\string#4}}{}% + \setbox#4\vbox{\unvcopy#1}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#4}}{}% + \dimen@\ht#4% + \ltxgrid@foot@info@sw{\saythe\dimen@}{}% + \setbox#4\vbox\bgroup + \unvbox#4\unskip + \dimen@i\lastkern\unkern\advance\dimen@i\lastkern + \@ifdim{\dimen@i=\z@}{% + \dimen@i\lastkern\unkern + \ltxgrid@foot@info@sw{\saythe\dimen@i}{}% + \aftergroup\dimen@i + \expandafter\egroup\the\dimen@i\relax + }{% + \egroup }% - }{}% - \outputdebug@sw{\trace@box\footsofar}{}% + \@ifdim{\dimen@i<\z@}{% + \advance\dimen@\dimen@i + \ltxgrid@foot@info@sw{\saythe\dimen@i\saythe\dimen@}{}% + \splittopskip\z@skip + \global\setbox#3\vsplit#4 to\dimen@ + \global\setbox#4\vbox{\unvbox#4}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2\showbox#3\showbox#4}}{}% + \global\setbox#2\vbox\bgroup\unvbox#2\vskip\z@skip\unvbox#4\egroup + }{% + \setbox#3\box#4% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2\showbox#3\showbox#4}}{}% + }% + \unvbox#3% + \loopwhile{\dimen@\lastskip\@ifdim{\dimen@>\z@}{\unskip\true@sw}{\false@sw}}% +}% +\def\recover@column@null#1#2#3#4{% + \unvcopy#1% }% \prepdef\@begindocumenthook{% \open@column@one\@ne @@ -5100,6 +5328,9 @@ \vbadness\count@ }{}% }% +\appdef\@outputpage@head{% + \@ifx{\LS@rot\@undefined}{}{\LS@rot}% +}% \def\ltxgrid@info{% \ltxgrid@info@sw{\class@info}{\@gobble}% }% @@ -5108,6 +5339,7 @@ \ltxgrid@warn@sw{\class@warn}{\@gobble}% }% \@booleantrue\ltxgrid@warn@sw +\@booleanfalse\ltxgrid@foot@info@sw \def\def@next@handler#1#2#3{% \advance#1\@ne\mathchardef#2\the#1% \expandafter\def\csname output@-\the#1\endcsname{#3}% @@ -5596,7 +5828,9 @@ \@booleantrue\balancelastpage@sw \DeclareOption{nopreprintnumbers}{\@booleanfalse\preprint@sw}% \DeclareOption{preprintnumbers}{\@booleantrue\preprint@sw}% -\let\preprint@sw\preprintsty@sw +\appdef\setup@hook{% + \@ifxundefined\preprint@sw{\let\preprint@sw\preprintsty@sw}{}% +}% \DeclareOption{hyperref}{% \class@warn{Class option "hyperref" is no longer supported.^^JEmploy \string\usepackage{hyperref} instead}% }% @@ -5655,27 +5889,38 @@ \DeclareOption{longbibliography}{\@booleantrue\longbibliography@sw}% \DeclareOption{nolongbibliography}{\@booleanfalse\longbibliography@sw}% \@booleanfalse\longbibliography@sw +\DeclareOption{eprint}{\@booleantrue\eprint@enable@sw}% +\DeclareOption{noeprint}{\@booleanfalse\eprint@enable@sw}% +\@booleantrue\eprint@enable@sw \@booleanfalse\twoside@sw \appdef\document@inithook{% \twoside@sw{\@twosidetrue}{\@twosidefalse}% }% \DeclareOption{twoside}{\@booleantrue \twoside@sw\@mparswitchfalse}% \DeclareOption{oneside}{\@booleanfalse\twoside@sw\@mparswitchtrue}% -\def\clear@document{% - \close@column -}% \DeclareOption{onecolumn}{\@booleanfalse\twocolumn@sw}% \DeclareOption{twocolumn}{\@booleantrue \twocolumn@sw}% \@booleanfalse\twocolumn@sw \def\select@column@grid{% \twocolumn@sw{% + \twocolumn@grid@setup \open@twocolumn }{% + \onecolumn@grid@setup }% }% \appdef\class@documenthook{% \select@column@grid }% +\appdef\setup@hook{% + \let\clearpage@ltx\clearpage + \prepdef\clear@document{\let\clearpage\clearpage@ltx\let\clear@document\@empty\close@column}% + \appdef\class@documenthook{% + \appdef\class@enddocumenthook{% + \let\clearpage\clear@document + }% + }% +}% \DeclareOption{author-year}{\@booleantrue\authoryear@sw}% \DeclareOption{numerical}{\@booleanfalse\authoryear@sw}% \@booleanfalse\authoryear@sw @@ -5848,14 +6093,22 @@ \force@deferlist@sw{}{; try class option [floatfix]}% }% }% -\DeclareOption{ltxgridinfo}{\@booleantrue\ltxgrid@info@sw}% -\DeclareOption{outputdebug}{\@booleantrue\outputdebug@sw}% +\DeclareOption{ltxgridinfo}{% + \@booleantrue\ltxgrid@info@sw +}% +\DeclareOption{outputdebug}{% + \@booleantrue\outputdebug@sw + \@booleantrue\ltxgrid@info@sw + \@booleantrue\ltxgrid@foot@info@sw + \traceoutput +}% \DeclareOption{raggedfooter}{\@booleanfalse\textheight@sw}% \DeclareOption{noraggedfooter}{\@booleantrue\textheight@sw}% \DeclareOption{frontmatterverbose}{\@booleantrue\frontmatterverbose@sw}% \@booleanfalse\frontmatterverbose@sw \DeclareOption{linenumbers}{% - \appdef\rtx@require@packages{% + \appdef + \class@documenthook{% \RequirePackage{lineno}[2005/11/02 v4.41]% \linenumbersep4pt\relax \linenumbers\relax @@ -5923,6 +6176,8 @@ }% }% }% +\DeclareOption{hypertext}{\hypertext@enable@ltx}% +\appdef\document@inithook{\@ifpackageloaded{hyperref}{\hypertext@enable@ltx}{}}% \DeclareOption{frontmatterverbose}{\@booleantrue\frontmatterverbose@sw}% \@booleanfalse\frontmatterverbose@sw \DeclareOption{inactive}{\@booleanfalse\frontmatter@syntax@sw}% @@ -5956,9 +6211,9 @@ }% %%% @LaTeX-file{ %%% filename = "revtex4-1.dtx", -%%% version = "4.1g", -%%% date = "2009/10/08", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "7177", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -6085,14 +6340,15 @@ \if@filesw \begingroup \advance\c@page\m@ne - \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}% + \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}{}{}{}}}% \endgroup \fi }% \appdef\clear@document{% - \clearpage - \lastpage@putlabel - \tally@box@size@sw{\total@text}{}% + \do@output@cclv{% + \lastpage@putlabel + \tally@box@size@sw{\total@text}{}% + }% }% \providecommand\write@column@totals{}% \appdef\rtx@require@packages{% @@ -6509,11 +6765,12 @@ {\end@dblfloat}% \newcounter{video} \renewcommand \thevideo {\@arabic\c@video} +\def\ext@video{lov}% +\def\fname@video{Video}% +\def\lovname{List of Videos}% \def\fps@video{tbp}% \def\ftype@video{4}% -\def\ext@video{lov}% \def\fnum@video{\fname@video~\thevideo}% -\def\fname@video{Video}% \appdef\document@inithook{% \@ifxundefined\c@float@type{}{% \global\setcounter{float@type}{8}% @@ -6650,8 +6907,8 @@ \let\NAT@def@citea@box\rtx@def@citea@box }% \def\rtx@def@citea{% + \def\@citea{\NAT@separator\NAT@space}% \advance\c@NAT@ctr\@ne - \let\@citea\NAT@separator \@ifnum{\count@>\tw@}{% \@ifnum{\c@NAT@ctr=\count@}{\appdef\@citea{\NAT@conj\NAT@space}}{}% }{% @@ -6667,10 +6924,27 @@ \expandafter\def\expandafter\@citea\expandafter{\expandafter\NAT@mbox\expandafter{\@citea}}% }% \def\NAT@conj{and}% +\def\NAT@BibitemShut#1{% + \def\@bibstop{#1}% + \let\bibitem@Stop\bibitemStop + \let\bibitem@NoStop\bibitemNoStop + \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{% + \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}% + }% +}% +\def\BibitemShut@ltx#1{% + \unskip + \def\@bibstop{#1}% + \let\bibitem@Stop\bibitemStop + \let\bibitem@NoStop\bibitemNoStop + \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{% + \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}% + }% +}% \newenvironment{thebibliography}{}{}% \let\@listi\@empty \appdef\rtx@require@packages{% - \RequirePackage[sort&compress]{natbib}[2008/12/08 8.3a (PWD, AO)]% + \RequirePackage[sort&compress]{natbib}[2009/11/07 8.31a (PWD, AO)]% \let@environment{NAT@thebibliography}{thebibliography}% \let@environment{thebibliography}{rtx@thebibliography}% \let\bibliographystyle@latex\bibliographystyle @@ -6699,25 +6973,44 @@ \let\NAT@citeyear\citeyear \let\onlinecite\rev@citealp \let\textcite\rev@citet +\@ifx{\BibitemShut\NAT@BibitemShut}{% + \class@info{Repairing natbib's \string\BibitemShut}% + \let\BibitemShut\BibitemShut@ltx +}{}% \let\bibliographystyle@latex\bibliographystyle -\def\bibliographystyle{\def\@bibstyle}% -\let\bibitemContinue\bibitemContinue@rtx +\def\bibliographystyle{\@booleantrue\bibliographystyle@sw\def\@bibstyle}% +\@booleanfalse\bibliographystyle@sw +\def\NAT@bibitem@cont{% + \let\bibitem@Stop\bibitemContinue@Stop + \let\bibitem@NoStop\bibitemContinue +}% +\def\bibitemNoStop{% + \@ifx@empty\@bibitemShut{.\spacefactor\@mmm\space}{\@bibitemShut}% +}% +\def\bibitemContinue{% + \@ifx@empty\@bibitemShut{;\spacefactor\@mmm\space}{\@bibitemShut}% +}% +\def\bibitemContinue@Stop{% + \@ifx@empty\@bibitemShut{\spacefactor\@mmm\space}{\@bibitemShut}% +}% }% -\def\bibitemContinue@rtx{;\spacefactor\@mmm\space}% \DeclareRobustCommand\onlinecite{\@onlinecite}% \DeclareRobustCommand\textcite{\@textcite}% \let\bibliography@latex\bibliography \def\bibliography#1{% - \@ifx@empty{\pre@bibdata}{% - \bibliography@latex{#1}% - }{% - \@if@empty{#1}{% - \expandafter\bibliography@latex\expandafter{\pre@bibdata}% + \auto@bib@empty + \begingroup + \let\auto@bib@innerbib\@empty + \@ifx@empty{\pre@bibdata}{% + \bibliography@latex{#1}% }{% - \expandafter\bibliography@latex\expandafter{\pre@bibdata,#1}% + \@if@empty{#1}{% + \expandafter\bibliography@latex\expandafter{\pre@bibdata}% + }{% + \expandafter\bibliography@latex\expandafter{\pre@bibdata,#1}% + }% }% - }% - \let\auto@bib\@empty + \endgroup }% \let\pre@bibdata\@empty \newenvironment{rtx@thebibliography}[1]{% @@ -6725,10 +7018,11 @@ \let\@TBN@opr\present@bibnote \@FMN@list }{% + \auto@bib@innerbib \edef\@currentlabel{\arabic{NAT@ctr}}% \label{LastBibItem}% \endNAT@thebibliography - \global\let\auto@bib\@empty + \aftergroup\auto@bib@empty }% \def\present@bibnote#1#2{% \item[% @@ -6736,7 +7030,7 @@ \normalfont \Hy@raisedlink{\hyper@anchorstart{frontmatter.#1}\hyper@anchorend}% \begingroup - \c@footnote#1\relax + \csname c@\@mpfn\endcsname#1\relax \frontmatter@thefootnote \endgroup }% @@ -6745,6 +7039,7 @@ \def\write@bibliographystyle{% \@ifxundefined\@bibstyle{}{% \expandafter\bibliographystyle@latex\expandafter{\@bibstyle}% + \bibliographystyle@sw{}{\@bibdataout@rev}% }% \global\let\write@bibliographystyle\relax }% @@ -6797,8 +7092,8 @@ }% \def\mini@note{\save@note\mini@notes}%Implicit #2 \def\save@note#1#2{% - \stepcounter{footnote}% - \protected@xdef\@thefnmark{\the\c@footnote}% + \stepcounter\@mpfn + \protected@xdef\@thefnmark{\thempfn}% \@footnotemark \expandafter\g@addto@macro \expandafter#1% @@ -6822,13 +7117,16 @@ \long\def\@endnotetext#1{% \begingroup \endnote@relax - \immediate\write\@bibdataout{@MISC{\@endnotelabel,note="#1"}}%year="\@endnotelabel", + \immediate\write\@bibdataout{% + @FOOTNOTE{% + \@endnotelabel,% + key="\@endnotelabel",% + note="#1"% + }% + }% \endgroup }% \newwrite\@bibdataout -\appdef\class@documenthook{% - \immediate\openout\@bibdataout\pre@bibdata.\bibdata@ext\relax -}% \def\endnote@relax{% \let\label\relax \let\index\relax \let\glossary\relax \let\cite \relax \let\ref \relax \let\pageref \relax @@ -6838,21 +7136,23 @@ \newlinechar`\^^M% \let\begin\relax \let\end\relax }% -\def\printendnotes{% - \class@warn{The \string\printendnotes\space command no longer serves any function. Please remove it from your document.}% -}% -\mathchardef\firstnote@num\z@ -\appdef\class@documenthook{% - \global\c@footnote\firstnote@num - \appdef\maketitle{\global\c@footnote\firstnote@num}% +\appdef\class@documenthook{\@bibdataout@init}% +\def\@bibdataout@init{% + \immediate\openout\@bibdataout\pre@bibdata.\bibdata@ext\relax }% -\def\set@firstnote#1{% - \@ifnum{\firstnote@num=#1\relax}{}{% - \class@warn@end{Endnote numbers changed: rerun LaTeX}% - }% - \immediate\write\@mainaux{% - \global\mathchardef\string\firstnote@num#1\relax +\def\@bibdataout@rev{% + \immediate\write\@bibdataout{% + @CONTROL{% + REVTEX41Control% + \eprint@enable@sw{}{,eprint=""}% + }% }% + \if@filesw + \immediate\write\@auxout{\string\citation{REVTEX41Control}}% + \fi +}% +\def\printendnotes{% + \class@warn{The \string\printendnotes\space command no longer serves any function. Please remove it from your document.}% }% \def\make@footnote@endnote{% \footinbib@sw{% @@ -6880,7 +7180,7 @@ \def\auto@bib{% \@ifx@empty\@FMN@list{% \footinbib@sw{% - \@ifnum{\thefootnote>\z@}{% + \@ifnum{\csname c@\@mpfn\endcsname>\z@}{% \true@sw }{% \test@bbl@sw @@ -6895,10 +7195,12 @@ \bibliography{}% }{}% }% +\def\auto@bib@empty{% + \let\auto@bib\@empty +}% \def\test@bbl@sw{% - \begingroup + \setbox\z@\vbox\bgroup \let\providecommand\providecommand@j@nk - \let@environment{thebibliography}{thebibliography@nogroup}% \let\bibfield\@gobbletwo \let\bibinfo\@gobbletwo \let\translation\@gobble @@ -6913,9 +7215,9 @@ \let\emph\@gobble \@booleanfalse\bibitem@sw \let\bibitem\bibitem@set - \setbox\z@\vbox{\IfFileExists {\jobname.bbl}{\@@input\@filef@und}{}}% + \auto@bib@innerbib \bibitem@sw{\aftergroup\true@sw}{\aftergroup\false@sw}% - \endgroup + \egroup }% \newcommand\bibitem@set[1][]{% \bibitem@sw{}{% @@ -6923,6 +7225,17 @@ \aftergroup\@booleantrue\aftergroup\bibitem@sw }% }% +\def\auto@bib@innerbib{% + \begingroup + \let@environment{thebibliography}{thebibliography@nogroup}% + \bibliography{}% + \endgroup +}% +\def\thebibliography@nogroup#1{% + \endgroup + \def\@currenvir{thebibliography}% +}% +\def\endthebibliography@nogroup{\begingroup}% \long\def \@gobblethree #1#2#3{}% \def\providecommand@j@nk#1[#2]{% \@ifnum{#2=\z@}{\def\j@nk}{% @@ -6934,8 +7247,6 @@ }% }% }% -\def\thebibliography@nogroup#1{\endgroup\def\@currenvir{thebibliography}}% -\def\endthebibliography@nogroup{\begingroup}% \def\thepage{\@arabic\c@page}% \appdef\setup@hook{% \tabbingsep \labelsep @@ -7009,7 +7320,6 @@ \onecolumngrid \begingroup \let\@footnotetext\frontmatter@footnotetext - \let\set@footnotewidth\set@footnotewidth@ii \ltx@no@footnote #1% \endgroup @@ -7024,30 +7334,30 @@ \newenvironment{widetext@grid}{% \par\ignorespaces \setbox\widetext@top\vbox{% - \vskip15\p@ \hb@xt@\hsize{% \leaders\hrule\hfil \vrule\@height6\p@ }% - \vskip6\p@ }% \setbox\widetext@bot\hb@xt@\hsize{% \vrule\@depth6\p@ \leaders\hrule\hfil }% \onecolumngrid + \vskip10\p@ \dimen@\ht\widetext@top\advance\dimen@\dp\widetext@top \cleaders\box\widetext@top\vskip\dimen@ - \let\set@footnotewidth\set@footnotewidth@ii + \vskip6\p@ \prep@math@patch }{% \par + \vskip6\p@ \setbox\widetext@bot\vbox{% \hb@xt@\hsize{\hfil\box\widetext@bot}% - \vskip14\p@ }% \dimen@\ht\widetext@bot\advance\dimen@\dp\widetext@bot \cleaders\box\widetext@bot\vskip\dimen@ + \vskip8.5\p@ \twocolumngrid\global\@ignoretrue \@endpetrue }% @@ -7055,6 +7365,8 @@ \newbox\widetext@bot \def\set@page@grid{% \twocolumn@sw{% + \let\set@footnotewidth\set@footnotewidth@two + \let\compose@footnotes\compose@footnotes@two \let@environment{widetext}{widetext@grid}% \let\title@column\title@column@grid \let\close@column\close@column@grid @@ -7236,20 +7548,6 @@ \@options \rtx@require@packages \setup@hook -\def\rtx@fin@warn{% - \@ifnum{\rtx@fin@year>\the\year\relax}{\true@sw}{% - \@ifnum{\rtx@fin@month>\the\month\relax}{\true@sw}{% - \@ifnum{\rtx@fin@day>\the\day\relax}{\true@sw}{% - \false@sw - }% - }% - }% - {% - \class@info{Beta software expires \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; updates available at http://publish.aps.org/revtex4/}% - }{% - \class@warn{Outdated software expired \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; please retrieve an update at http://publish.aps.org/revtex4/}% - }% -}% \endinput %% %% End of file `revtex4-1.cls'. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/aps10pt4-1.rtx +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/aps10pt4-1.rtx @@ -18,7 +18,7 @@ %% See the REVTeX 4 README file for restrictions and more information. %% \ProvidesFile{aps10pt4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \ifx\undefined\substyle@ext \def\@tempa{% \endinput @@ -99,14 +99,18 @@ \headheight 25pt \headsep 16pt \topskip 10pt +\splittopskip\topskip \footskip 30pt \textheight = 56pc \textwidth42.5pc \columnsep 1.5pc \columnseprule 0pt \footnotesep 1pt -\skip\footins 39pt plus 4pt minus 2pt -\def\footnoterule{\kern-19pt\hrule width.5in\kern18.6pt\relax}% +\skip\footins 39pt plus 4pt minus 12pt +\def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\tw@ + \kern-\dimen@\hrule width.5in\kern\dimen@ +}% \floatsep 12pt plus 2pt minus 2pt \textfloatsep 20pt plus 2pt minus 4pt \intextsep 12pt plus 2pt minus 2pt only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/ltxfront.sty +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/ltxfront.sty @@ -22,9 +22,9 @@ %% %%% @LaTeX-file{ %%% filename = "ltxfront.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "2012", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -46,16 +46,16 @@ %%% docstring = "The checksum field above generated by ltxdoc", %%% } \NeedsTeXFormat{LaTeX2e}[1995/12/01]% -\ProvidesFile{ltxfront.sty}% - [2009/10/09 4.1h frontmatter package]% \fileversion +\ProvidesFile{% +ltxfront% +.sty% +}% + [2010/07/25/20:33:00 4.1r frontmatter package (AO,DPC)]% \fileversion \def\package@name{ltxfront}% \expandafter\PackageInfo\expandafter{\package@name}{% Title page macros for \protect\LaTeXe, by A. Ogawa (arthur_ogawa at sbcglobal.net)% }% -\typeout{% - ltxfront [2009/10/06/20:20 4.1g]: Arthur Ogawa (after David P. Carlisle)% -}% \let\class@name\package@name \RequirePackage{ltxutil}% \DeclareOption{frontmatterverbose}{\@booleantrue\frontmatterverbose@sw}% @@ -134,6 +134,7 @@ \@author@init }% \def\@author@def#1#2{% + \frontmatterverbose@sw{\typeout{\string\author\space\string\collaboration}}{}% \move@AU\move@AF\move@AUAF \let\@AF@join\@author@join #1% @@ -164,18 +165,29 @@ \frontmatterverbose@sw{\say#3}{}% }% \def\@author@finish{% + \frontmatterverbose@sw{\typeout{\string\@author@finish}}{}% \move@AU\move@AF - \@ifx{\AU@grp\@empty}{}{% + \@ifx{\AU@grp\@empty}{% + \@ifx{\CO@grp\@empty}% + }{% + \false@sw + }% + {}{% \@ifx{\AF@grp\@empty}{% \begingroup - \frontmatterverbose@sw{\say\AU@grp}{}% \let\href\@secondoftwo \let\AU@opr\@secondofthree \let\CO@opr\@secondofthree \let\footnote\@gobble - \class@warn{Assuming \string\noaffiliation\space for \AU@grp}% + \@ifx{\CO@grp\@empty}{% + \class@warn{Assuming \string\noaffiliation\space for authors}% + \frontmatterverbose@sw{\say\AU@grp}% + }{% + \class@warn{Assuming \string\noaffiliation\space for collaboration}% + \frontmatterverbose@sw{\say\CO@grp}{}% + }% \endgroup - \@affil@def{}\move@AF + \@affil@none\move@AF }{}% }% \move@AUAF @@ -192,6 +204,7 @@ {\cat@comma@active\gdef,{\active@comma}}% \def\active@comma{,\penalty-300\relax}% \newcommand\affiliation{% + \frontmatterverbose@sw{\typeout{\string\affiliation}}{}% \move@AU\move@AF \begingroup \cat@comma@active @@ -203,15 +216,20 @@ \@affil@def{#1}% }% \newcommand\frontmatter@noaffiliation{% + \frontmatterverbose@sw{\typeout{\string\noaffiliation}}{}% \move@AU\move@AF - \@affil@def{}\move@AF + \@affil@none\move@AF \move@AUAF }% \def\blankaffiliation{{}}% \def\@affil@cleared{{{}}{}}% +\def\@affil@nil{{\relax}{}}% \appdef\frontmatter@init{% \@affil@init }% +\def\@affil@none{% + \let\@affil\@affil@nil +}% \def\@affil@init{% \let\@affil\@affil@cleared }% @@ -238,17 +256,18 @@ \@ifx{\@tempb\@tempd}{}{% \class@warn{% Ancillary information for \@tempa\space must not be different! - Please put it on the first instance% + Please put all of it on the first instance% }% }% }% }% {% - \@if@empty{\expandafter\@firstoftwo\@affil}{% - \def\@tempc{\z@}% - \@argswap@val{\z@}% + \@ifx{\@affil\@affil@nil}{% + \def\@tempc{0}% + \@argswap@val{0}% }{% \advance\c@affil\@ne + \expandafter\def\expandafter\@tempc\expandafter{\the\c@affil}% \expandafter\@argswap@val\expandafter{\the\c@affil}% }% {% @@ -258,8 +277,9 @@ }% }% }% - \appdef@eval\AF@grp{\the\c@affil}% }% + \appdef@eval\AF@grp\@tempc + \frontmatterverbose@sw{\say\AF@grp}{}% \@affil@init }% }% @@ -298,29 +318,26 @@ }% }% \def\move@AUAF{% - \@ifx{\AF@grp\@empty}% - {% - \@ifx{\@empty\CO@grp}{}{% + \frontmatterverbose@sw{\say\AU@grp\say\AF@grp\say\CO@grp}{}% + \@ifx{\AF@grp\@empty}{% + \@ifx{\@empty\CO@grp}{% + }{% + \appdef \@AAC@list{\AF@opr{{0}}}% \appdef@e \@AAC@list{\CO@grp}% \appdef@e \@AFG@list{\CO@grp}% \let\CO@grp\@empty }% }{% - \appdef \@AAC@list{\AF@opr}% - \appdef@eval\@AAC@list{\AF@grp}% - \appdef@e \@AAC@list{\AU@grp}% - \frontmatterverbose@sw{\say\@AAC@list}{}% + \appdef \@AAC@list{\AF@opr}% + \appdef@eval\@AAC@list{\AF@grp}% + \appdef@e \@AAC@list{\AU@grp}% \@ifx{\@empty\AU@grp}{% - \@ifx{\@empty\CO@grp}{% - \false@sw - }{% - \true@sw - }% + \@ifx{\@empty\CO@grp}% }{% - \true@sw + \false@sw }% {% - \@ifx{\@empty\AF@grp}{}{% + }{% \@booleanfalse\temp@sw \def\AFG@opr{\x@match\AF@grp}% \let\CO@opr\@author@gobble @@ -329,12 +346,11 @@ \appdef \@AFG@list{\AFG@opr}% \appdef@eval\@AFG@list{\AF@grp}% }% - }% \@ifx{\@empty\CO@grp}{}{% + \appdef@e \@AAC@list{\CO@grp}% \appdef@e \@AFG@list{\CO@grp}% \let\CO@grp\@empty }% - }{% }% \let\CO@grp\@empty \let\AU@grp\@empty @@ -372,10 +388,9 @@ \newcommand*\homepage[1][]{\begingroup\sanitize@url\@homepage{#1}}% \def\@homepage#1#2{% \endgroup - \@AF@join{#1\url{#2}}% + \@AF@join{#1\href{#2}{#2}}% }% \appdef\class@documenthook{% - \providecommand\url{}% \providecommand\href[1]{}% }% \def\frontmatter@thanks{% implicit #1 @@ -406,26 +421,11 @@ \def\@listand{\@ifnum{\@tempcnta=\tw@}{\andname\space}{}}% \def\@listcomma@comma{\@ifnum{\@tempcnta>\@ne}{,}{}}% \def\@listcomma@comma@UK{\@ifnum{\@tempcnta>\tw@}{,}{}}% -\def\@collaboration@err#1#2{% -}% +\def\@collaboration@gobble#1#2#3{}% \def\doauthor#1#2#3{% \ignorespaces#1\unskip\@listcomma \begingroup - \def\@tempifx{#3}% - \@ifx{\@tempifx\@empty}{% - \false@sw - }{% - \@ifnum{\c@affil<\affil@cutoff}{% - \false@sw - }{% - \true@sw - }% - }% - {% - #3\aftergroup\true@sw - }{% - \aftergroup\false@sw - }% + #3% \@if@empty{#2}{\endgroup{}{}}{\endgroup{\comma@space}{}\frontmatter@footnote{#2}}% \space \@listand }% @@ -460,18 +460,19 @@ \expandafter{\@tempb}% }{% \stepcounter\@mpfn - \protected@xdef\@tempb{\the\csname c@\@mpfn\endcsname}% - \expandafter\frontmatter@footnotemark - \expandafter{\@tempb}% - \expandafter\g@addto@macro - \expandafter\@FMN@list + \expandafter\expandafter + \expandafter\frontmatter@foot@mark + \expandafter\expandafter \expandafter{% - \expandafter \@TBN@opr - \expandafter {\@tempb}{#1}% - }% + \expandafter \the\csname c@\@mpfn\endcsname + }{#1}% }% \endgroup }% +\def\frontmatter@foot@mark#1#2{% + \frontmatter@footnotemark{#1}% + \g@addto@macro\@FMN@list{\@TBN@opr{#1}{#2}}% +}% \appdef\frontmatter@init{% \global\let\@FMN@list\@empty }% @@ -481,7 +482,7 @@ \begingroup \hyper@linkstart {link}{frontmatter.#1}% \csname c@\@mpfn\endcsname#1\relax - \def\@thefnmark{\thempfn}% + \def\@thefnmark{\frontmatter@thefootnote}% \@makefnmark \hyper@linkend \endgroup @@ -555,10 +556,10 @@ \set@footnotefont \set@footnotewidth \@parboxrestore - \protected@edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}% + \protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}% \color@begingroup \frontmatter@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -688,9 +689,10 @@ \def\titleblock@produce{% \begingroup \ltx@footnote@pop - \let\thefootnote\frontmatter@thefootnote + \def\@mpfn{mpfootnote}% + \def\thempfn{\thempfootnote}% + \c@mpfootnote\z@ \let\@makefnmark\frontmatter@makefnmark - \global\c@footnote\z@ \frontmatter@setup \thispagestyle{titlepage}\label{FirstPage}% \frontmatter@title@produce @@ -739,7 +741,7 @@ \def\frontmatter@author@produce@script{% \begingroup \let\@author@present\@author@present@script - \frontmatterverbose@sw{\say\@AAC@list}{}% + \frontmatterverbose@sw{\typeout{\string\frontmatter@author@produce@script:}\say\@AAC@list\say\@AFF@list\say\@AFG@list}{}% \let\AU@temp\@empty \@tempcnta\z@ \let\AF@opr \@gobble @@ -760,7 +762,6 @@ \begingroup \frontmatter@above@affiliation@script \let\AFF@opr \@affil@script - \frontmatterverbose@sw{\say\@AFF@list}{}% \@AFF@list \frontmatter@footnote@produce \par @@ -776,6 +777,7 @@ \begingroup \frontmatter@collaboration@above \@affilID@def{}% + \@tempcnta\z@ \@author@present{}{(\ignorespaces#3\unskip)}{#4}% \par \endgroup @@ -819,10 +821,7 @@ \def\@author@present@script#1#2#3{% \begingroup \gdef\comma@space{\textsuperscript{,\,}}% - \doauthor{#2}{#3}{% - \let\@tempa\@empty - \expandafter\@affil@present@script\@affilID@temp\relax - }% + \doauthor{#2}{#3}{\@affil@present@script}% \endgroup \advance\@tempcnta\m@ne }% @@ -842,14 +841,21 @@ }% }% }% -\def\@affil@present@script#1{% +\def\@affil@present@script{% + \let\@tempa\@empty + \expandafter\@affil@present@script@\@affilID@temp\relax +}% +\def\@affil@present@script@#1{% \@ifx{\relax#1}{% - \@ifx{\@tempa\@empty}{}{% + \@ifx{\@tempa\@empty}{% + \aftergroup\false@sw + }{% \textsuperscript{\expandafter\@affilcomma\@tempa\relax\relax}% + \aftergroup\true@sw }% }{% - \@ifx{\z@#1}{}{\appdef\@tempa{{#1}}}% - \@affil@present@script + \@ifnum{#1=\z@}{}{\appdef\@tempa{{#1}}}% + \@affil@present@script@ }% }% \@provide\@author@parskip{\z@skip}% @@ -857,7 +863,7 @@ \begingroup \let\@author@present\@author@present@group \frontmatter@authorformat - \frontmatterverbose@sw{\say\@AFG@list}{}% + \frontmatterverbose@sw{\typeout{\string\frontmatter@author@produce@group:}\say\@AAC@list\say\@AFF@list\say\@AFG@list}{}% \let\AU@temp\@empty \set@listcomma@list\AU@temp \def\CO@opr{\@collaboration@present\AU@temp}% @@ -872,7 +878,6 @@ \@provide\frontmatter@authorbelow{}% \def\affils@present@group#1{% \begingroup - \frontmatterverbose@sw{\say\@AAC@list}{}% \def\AF@temp{#1}% \@tempcnta\z@ \let\AU@opr \@undefined @@ -905,9 +910,8 @@ \def@after@address \runinaddress@sw{% }{% - \tightenlines@sw{% - }{% - \parskip\z@ %space between affilations in grouped mode + \tightenlines@sw{}{% + \parskip\z@ }% \appdef\after@address\par }% @@ -927,7 +931,7 @@ }{% \let\AU@opr \@author@gobble }% - \let\CO@opr \@collaboration@err + \let\CO@opr \@collaboration@gobble }% \def\@affilID@match#1#2{% \def\@tempifx{#2}% @@ -936,7 +940,7 @@ }{% \let\AU@opr \@author@gobble }% - \let\CO@opr \@collaboration@err + \let\CO@opr \@collaboration@gobble }% \def\do@affil@fromgroup#1#2{% \@ifx{\relax#2}{}{% @@ -960,9 +964,12 @@ }% \def\@author@present@group#1#2#3{% \gdef\comma@space{\gdef\comma@space{\textsuperscript{,\,}}}% - \doauthor{#2}{#3}{}% + \doauthor{#2}{#3}{\@affil@present@group}% \advance\@tempcnta\m@ne }% +\def\@affil@present@group{% + \aftergroup\false@sw +}% \def\@pacs@produce#1{% \showPACS@sw{% \begingroup @@ -996,7 +1003,7 @@ \def\present@FM@footnote#1#2{% \begingroup \csname c@\@mpfn\endcsname#1\relax - \def\@thefnmark{\thempfn}% + \def\@thefnmark{\frontmatter@thefootnote}% \frontmatter@footnotetext{#2}% \endgroup }% @@ -1010,7 +1017,7 @@ \@ifxundefined\comma@space {\let\comma@space\@empty}{}% }% \def\frontmatter@thefootnote{% - \altaffilletter@sw{\@alph}{\@fnsymbol}\c@footnote + \altaffilletter@sw{\@alph}{\@fnsymbol}{\csname c@\@mpfn\endcsname}% }% \@ifx{\altaffilletter@sw\@undefined}{\@booleantrue\altaffilletter@sw}{}% \def\frontmatter@makefnmark{% @@ -1021,7 +1028,7 @@ \long\def\frontmatter@makefntext#1{% \parindent 1em \noindent - \Hy@raisedlink{\hyper@anchorstart{frontmatter.\the\c@footnote}\hyper@anchorend}% + \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}% \@makefnmark #1% }% @@ -1118,11 +1125,17 @@ }% \def\thanks@latex#1{% \footnotemark + \expandafter\expandafter \expandafter\gappdef + \expandafter\expandafter \expandafter\@thanks + \expandafter\expandafter \expandafter{% + \expandafter\expandafter \expandafter\footnotetext - \expandafter[\the\c@footnote]{#1}}% + \expandafter\expandafter + \expandafter[% + \expandafter\the\csname c@\@mpfn\endcsname]{#1}}% }% \@booleanfalse\altaffilletter@sw \@if@sw\if@titlepage\fi{\@booleantrue}{\@booleanfalse}\titlepage@sw @@ -1136,7 +1149,13 @@ \def\frontmatter@affiliationfont{\centering\itshape}% \def\frontmatter@RRAP@format{\centering\large}% \def\frontmatter@preabstractspace{1.5em}% -\def\frontmatter@footnotetext{\footnotetext[\csname c@\@mpfn\endcsname]}% +\long\def\frontmatter@footnotetext{% + \expandafter\expandafter + \expandafter\footnotetext + \expandafter\expandafter + \expandafter[% + \expandafter\the\csname c@\@mpfn\endcsname]% +}% \def\and@space{\\}% \def\andname{and}% \endinput only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/aps4-1.rtx +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/aps4-1.rtx @@ -19,7 +19,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1996/12/01]% \ProvidesFile{aps4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \ifx\undefined\substyle@ext \def\@tempa{% \endinput @@ -38,36 +38,36 @@ \DeclareOption{prstab}{\change@journal{prstab}}% \DeclareOption{prstper}{\change@journal{prstper}}% \DeclareOption{rmp}{\change@journal{rmp}}% -\def\ao{Appl.\ Opt.\ }% -\def\ap{Appl.\ Phys.\ }% -\def\apl{Appl.\ Phys.\ Lett.\ }% -\def\apj{Astrophys.\ J.\ }% -\def\bell{Bell Syst.\ Tech.\ J.\ }% -\def\jqe{IEEE J.\ Quantum Electron.\ }% -\def\assp{IEEE Trans.\ Acoust.\ Speech Signal Process.\ }% -\def\aprop{IEEE Trans.\ Antennas Propag.\ }% -\def\mtt{IEEE Trans.\ Microwave Theory Tech.\ }% -\def\iovs{Invest.\ Ophthalmol.\ Vis.\ Sci.\ }% -\def\jcp{J.\ Chem.\ Phys.\ }% -\def\jmo{J.\ Mod.\ Opt.\ }% -\def\josa{J.\ Opt.\ Soc.\ Am.\ }% -\def\josaa{J.\ Opt.\ Soc.\ Am.\ A }% -\def\josab{J.\ Opt.\ Soc.\ Am.\ B }% -\def\jpp{J.\ Phys.\ (Paris) }% -\def\nat{Nature (London) }% -\def\oc{Opt.\ Commun.\ }% -\def\ol{Opt.\ Lett.\ }% -\def\pl{Phys.\ Lett.\ }% -\def\pra{Phys.\ Rev.\ A }% -\def\prb{Phys.\ Rev.\ B }% -\def\prc{Phys.\ Rev.\ C }% -\def\prd{Phys.\ Rev.\ D }% -\def\pre{Phys.\ Rev.\ E }% -\def\prl{Phys.\ Rev.\ Lett.\ }% -\def\rmp{Rev.\ Mod.\ Phys.\ }% -\def\pspie{Proc.\ Soc.\ Photo-Opt.\ Instrum.\ Eng.\ }% -\def\sjqe{Sov.\ J.\ Quantum Electron.\ }% -\def\vr{Vision Res.\ }% +\def\ao{Appl.\ Opt.}% +\def\ap{Appl.\ Phys.}% +\def\apl{Appl.\ Phys.\ Lett.}% +\def\apj{Astrophys.\ J.}% +\def\bell{Bell Syst.\ Tech.\ J.}% +\def\jqe{IEEE J.\ Quantum Electron.}% +\def\assp{IEEE Trans.\ Acoust.\ Speech Signal Process.}% +\def\aprop{IEEE Trans.\ Antennas Propag.}% +\def\mtt{IEEE Trans.\ Microwave Theory Tech.}% +\def\iovs{Invest.\ Ophthalmol.\ Vis.\ Sci.}% +\def\jcp{J.\ Chem.\ Phys.}% +\def\jmo{J.\ Mod.\ Opt.}% +\def\josa{J.\ Opt.\ Soc.\ Am.}% +\def\josaa{J.\ Opt.\ Soc.\ Am.\ A}% +\def\josab{J.\ Opt.\ Soc.\ Am.\ B}% +\def\jpp{J.\ Phys.\ (Paris)}% +\def\nat{Nature (London)}% +\def\oc{Opt.\ Commun.}% +\def\ol{Opt.\ Lett.}% +\def\pl{Phys.\ Lett.}% +\def\pra{Phys.\ Rev.\ A}% +\def\prb{Phys.\ Rev.\ B}% +\def\prc{Phys.\ Rev.\ C}% +\def\prd{Phys.\ Rev.\ D}% +\def\pre{Phys.\ Rev.\ E}% +\def\prl{Phys.\ Rev.\ Lett.}% +\def\rmp{Rev.\ Mod.\ Phys.}% +\def\pspie{Proc.\ Soc.\ Photo-Opt.\ Instrum.\ Eng.}% +\def\sjqe{Sov.\ J.\ Quantum Electron.}% +\def\vr{Vision Res.}% \def\@fnsymbol#1{% \ensuremath{% \ifcase#1\or @@ -399,13 +399,13 @@ \def\l@subparagraph#1#2{}% \let\toc@pre\toc@pre@auto \let\toc@post\toc@post@auto -\@booleantrue\raggedcolumn@sw +\@booleanfalse\raggedcolumn@sw \def\tableft@skip@float{\z@ plus\hsize}% \def\tabmid@skip@float{\@flushglue}% \def\tabright@skip@float{\z@ plus\hsize}% \def\array@row@pre@float{\hline\hline\noalign{\vskip\doublerulesep}}% \def\array@row@pst@float{\noalign{\vskip\doublerulesep}\hline\hline}% -\def\@makefntext#1{% +\long\def\@makefntext#1{% \def\baselinestretch{1}% \leftskip1em% \parindent1em% @@ -417,6 +417,19 @@ #1% \par }% +\long\def\frontmatter@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% + \noindent + \nobreak\hskip-\leftskip + \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}% + \hb@xt@\leftskip{% + \hss\@makefnmark\ % + }% + #1% + \par +}% \prepdef\appendix{% \par \let\@hangfrom@section\@hangfrom@appendix @@ -591,19 +604,31 @@ \def\rtx@apsprstper{% \class@info{APS journal PRST-PER selected}% \rtx@apsprb + \@booleantrue\longbibliography@sw }% \def\rtx@apsprstab{% \class@info{APS journal PRSTAB selected}% }% \@booleantrue\footinbib@sw +\appdef\@bibdataout@rev{\@bibdataout@aps}% +\def\@bibdataout@aps{% + \immediate\write\@bibdataout{% + @CONTROL{% + apsrev41Control% + \longbibliography@sw{% + ,author="00",editor="1",pages="1",title="0",year="0"% + }{% + ,author="08",editor="1",pages="0",title="",year="1"% + }% + }% + }% + \if@filesw + \immediate\write\@auxout{\string\citation{apsrev41Control}}% + \fi +}% \let\place@bibnumber\place@bibnumber@inl \def\@bibstyle{apsrev\substyle@post}% \appdef\setup@hook{% - \longbibliography@sw{% - \appdef\@bibstyle{long}% - }{}% -}% -\appdef\setup@hook{% \@ifx{\place@bibnumber\place@bibnumber@sup}{% \footinbib@sw{}{% \class@warn{Citations are superscript numbers: footnotes must be endnotes; changing to that configuration}% only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/apsrmp4-1.rtx +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/apsrmp4-1.rtx @@ -19,7 +19,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1996/12/01]% \ProvidesFile{apsrmp4-1} - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion \ifx\undefined\substyle@ext \def\@tempa{% \endinput @@ -107,8 +107,11 @@ }% }% \footnotesep 9.25pt - \skip\footins 36pt plus 4pt minus 2pt - \def\footnoterule{\kern-13pt\hrule width.5in\kern15.6pt\relax}% + \skip\footins 36pt plus 4pt minus 12pt + \def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\thr@@ + \kern-\dimen@\hrule width.5in\kern\dimen@ + }% \def\secnums@rtx{% \@ifxundefined\thepart{% \def\thepart{\Roman{part}}% @@ -204,9 +207,25 @@ \def\@caption@fignum@sep{\nobreak\hskip.5em plus.2em\ignorespaces}% \def\@bibstyle{apsrmp\substyle@post}% \@booleantrue\authoryear@sw -\let\cite\citep +\def\@bibdataout@aps{% + \immediate\write\@bibdataout{% + @CONTROL{% + apsrmp41Control% + \longbibliography@sw{% + ,author="03",editor="0",pages="1",title="0",year="0"% + }{% + ,author="0B",editor="0",pages="0",title="",year="1"% + }% + }% + }% + \if@filesw + \immediate\write\@auxout{\string\citation{apsrmp41Control}}% + \fi +}% \appdef\setup@hook{% - \bibpunct{(}{)}{;}{a}{,}{,}% + \bibpunct{(%) + }{%( + )}{;}{a}{,}{,}% \def\bibsection{% \expandafter\section\expandafter*\expandafter{\refname}% \@nobreaktrue @@ -215,6 +234,7 @@ \def\newblock{\ }% \bibhang10\p@ \bibsep\z@ + \let\cite\citep }% \@booleanfalse\footinbib@sw \appdef\setup@hook{% only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/tex/latex/revtex/aip4-1.rtx +++ texlive-extra-2009/texmf-dist/tex/latex/revtex/aip4-1.rtx @@ -28,9 +28,9 @@ %% %%% @LaTeX-file{ %%% filename = "aip.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:32:00 GMT-8", %%% checksum = "1163", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Institute of Physics. @@ -55,7 +55,7 @@ %%% } \NeedsTeXFormat{LaTeX2e}[1996/12/01]% \ProvidesFile{aip4-1.rtx}% - [2009/10/09 4.1h AIP substyle for REVTeX]% \fileversion + [2010/07/25 4.1r AIP substyle for REVTeX]% \fileversion \ifx\undefined\substyle@ext \def\@tempa{% \endinput @@ -85,6 +85,23 @@ \@booleantrue \aip@jtitx@sw \@booleanfalse\authoryear@sw \@booleanfalse\authornum@sw +\appdef\@bibdataout@rev{\@bibdataout@aip}% +\def\@bibdataout@aip{% + \immediate\write\@bibdataout{% + @CONTROL{% + aip41Control% + \longbibliography@sw{\true@sw}{\aip@jtitx@sw{\false@sw}{\true@sw}}% + {% + ,pages="1",title="0"% + }{% + ,pages="0",title=""% + }% + }% + }% + \if@filesw + \immediate\write\@auxout{\string\citation{aip41Control}}% + \fi +}% \@booleantrue\preprintsty@sw \@booleantrue\showPACS@sw \@booleantrue\showKEYS@sw @@ -602,7 +619,7 @@ \aip@jtitx@sw{% \def\@bibstyle{aipauth\substyle@post}% }{% - \def\@bibstyle{aipauth\substyle@post long}% + \def\@bibstyle{aipauth\substyle@post}% }% \authornum@sw{% \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}% @@ -623,7 +640,7 @@ \aip@jtitx@sw{% \def\@bibstyle{aipnum\substyle@post}% }{% - \def\@bibstyle{aipnum\substyle@post long}% + \def\@bibstyle{aipnum\substyle@post}% }% \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}% \let\onlinecite\rev@citealpnum only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/source/latex/revtex/ltxdocext.dtx +++ texlive-extra-2009/texmf-dist/source/latex/revtex/ltxdocext.dtx @@ -217,6 +217,7 @@ % consistently in all generated files and in the % typeset documentation. % \begin{macrocode} +% [2008/08/04 1.1b2 ltxdoc extensions package]% \fileversion % \end{macrocode} % only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/source/latex/revtex/ltxgrid.dtx +++ texlive-extra-2009/texmf-dist/source/latex/revtex/ltxgrid.dtx @@ -108,15 +108,15 @@ % % \fi % -% \GetFileInfo{ltxgrid.dtx}\CheckSum{5462} +% \GetFileInfo{ltxgrid.dtx}\CheckSum{5898} % % \iffalse ltxdoc klootch %<*package> %%% @LaTeX-file{ %%% filename = "ltxgrid.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "5462", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -206,10 +206,20 @@ % As desired, the following modules all % take common version information: % \begin{macrocode} -%\ProvidesFile{ltxgrid.sty}% -%<*driver> -\expandafter\ProvidesFile\expandafter{\jobname.dtx}% -% +%\typeout{% +%<*package|doc> +\ProvidesFile{% +% +%<*kernel|package|doc> +ltxgrid% +% +%<*doc> +.dtx% +% +%.sty% +%<*package|doc> +}% +% % \end{macrocode} % % The following line contains, for once and for all, @@ -217,10 +227,13 @@ % By various means, this information is reproduced % consistently in all generated files and in the % typeset documentation. +% Give credit where due. % \begin{macrocode} -%<*driver|package> - [2009/10/09 4.1h page grid package]% \fileversion -% +%<*doc|package|kernel> +% + [2010/07/25/20:33:00 4.1r page grid package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion +% +%}% % \end{macrocode} % % @@ -419,16 +432,26 @@ \changes{4.1b}{2008/08/04}{Procedure \cs{@outputpage@head} headpatches \cs{@outputpage}}% \changes{4.1b}{2008/08/04}{Procedure \cs{@outputpage@tail} tailpatches \cs{@outputpage}}% \changes{4.1b}{2008/08/04}{Procedure \cs{balance@2} defined more transparently}% -\changes{4.1b}{2008/08/04}{Procedure \cs{set@adj@footins} to adjust for footnotes and other inserts} \changes{4.1b}{2008/08/04}{Tally the height of the float} \changes{4.1b}{2008/08/04}{Use \cs{document@inithook} instead of \cs{AtBeginDocument}} \changes{4.1b}{2008/08/04}{Use \cs{trace@box} instead of \cs{showbox}} \changes{4.1f}{2009/07/07}{(AO, 515) Prevent line numbering within a footnote} \changes{4.1f}{2009/07/10}{(AO, 518) Tally register overflow when locument is long} \changes{4.1f}{2009/07/14}{(AO, 519) \cs{footins} content must be preserved and reintegrated} -\changes{4.1f}{2009/07/14}{(AO, 519) Do not use \cs{dimen@} register as a scratch register in \cs{set@adj@footins}} \changes{4.1f}{2009/07/15}{(AO, 519) Preserve footnotes that are in \cs{footsofar} across a page grid change} \changes{4.1g}{2009/10/06}{(AO, 531) Fix package \classname{float} } +\changes{4.1n}{2009/12/02}{Restore the \cs{lastbox} if it is not a footnote} +\changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +\changes{4.1n}{2009/12/18}{(AO, 571) Deconstruct balanced footnotes when needed} +\changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% +\changes{4.1n}{2010/01/02}{(AO, 571) Footnotes, when columns are balanced or when they are composed with their column}% +\changes{4.1n}{2010/01/02}{(AO, 571) Abandon \cs{recover@footins} in favor of \cs{recover@column}}% +\changes{4.1n}{2010/01/02}{(AO, 571) Use procedures \cs{output@do@prep} and \cs{output@column@do} as dispatchers} +\changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +\changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% +\changes{4.1n}{2010/01/02}{(AO, 571) footnote rule is leaders, so that it may be removed by \cs{vsplit}; mechanism of \cs{kern} signals to indicate footnote height}% +\changes{4.1o}{2010/02/02}{(AO, 576) Allow \classname{lscape} to act on \cs{@outputbox} at the right time}% +\changes{4.1p}{2010/02/24}{(AO, 583) Provide setup code also for footnotes in a one-column document}% \end{filecontents*} % \end{macrocode} @@ -780,20 +803,19 @@ % \end{macrocode} % % \subsection{Banner}% -% Credit where due. % \begin{macrocode} %<*kernel> -\typeout{% - ltxgrid [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% -}% % \end{macrocode} % % \subsection{Sundry}% % Here are assorted macro definitions. % \begin{macro}{\lineloop} -% The document-level command \cmd\lineloop\ sets numbered lines until the -% specified count is reached. -% This command is mainly used to construct test documents. +% \begin{macro}{\linefoot} +% The (document-level) command \cmd\lineloop\ sets numbered lines until the +% specified count is reached. +% The command \cmd\linefoot\ sets a single, automatically numbered line, but with a footnote (with the specified label); +% it automatically increments the line counter. +% These commands are typically used to construct test documents. % % Because the counter is globally advanced and never reset, successive % calls to \cmd\lineloop\ should have an argument ever larger. @@ -805,15 +827,23 @@ \hb@xt@\hsize{% \global\advance#1\@ne \edef\@tempa{\@ifnum{100>#1}{0}{}\@ifnum{10>#1}{0}{}\number#1}% - \@tempa\edef\@tempa{\special{trace:\@tempa}}\@tempa + \@tempa\edef\@tempa{\special{line:\@tempa}}\@tempa \vrule depth2.5\p@#2\leaders\hrule\hfil }% }% \def\lineloop#1{% \loopwhile{\loop@line\c@linecount{}\@ifnum{#1>\c@linecount}}% }% +\def\linefoot#1{% + \loop@line\c@linecount{% + \footnote{% + #1\special{foot:#1}\vrule depth2.5\p@\leaders\hrule\hfill + }% + }% +}% % \end{macrocode} % \end{macro} +% \end{macro} % % % \subsection{Mark Components}% @@ -1212,10 +1242,12 @@ }% % \end{macrocode} % Now test if the dispatcher is the special case of \cmd\execute@message@pen, in which case execute the \cmd\@message@saved. +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \expandafter\@ifx\expandafter{\csname output@-\the\execute@message@pen\endcsname\output@procedure}{% \let\output@procedure\@message@saved }{}% + \ltxgrid@info@sw{\class@info{\string\dispatch@output}\say\output@procedure\saythe\holdinginserts}{}% \outputdebug@sw{\output@debug}{}% \output@procedure }% @@ -1228,48 +1260,68 @@ }% % \end{macrocode} % +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% The following procedure is executed at the beginning of each visit to the output routine, +% contingent on the level of diagnostics specified. +% However, it bails out when the visit is part of a tight sequence of visits to the output routine. % \begin{macrocode} \def\output@debug{% - \saythe\inputlineno - \saythe\holdinginserts - \saythe\outputpenalty - \saythe\interlinepenalty - \saythe\brokenpenalty - \saythe\clubpenalty - \saythe\widowpenalty - \saythe\displaywidowpenalty - \saythe\predisplaypenalty - \saythe\interdisplaylinepenalty - \saythe\postdisplaypenalty - \say\output@procedure - \saythe\badness - \say\thepagegrid - \saythe\pagegrid@col - \saythe\pagegrid@cur -%\say\bot@envir - \saythe\insertpenalties -%\say\@@topmark -%\say\saved@@topmark -%\say\@@firstmark -%\say\saved@@firstmark - \say\@@botmark -%\say\saved@@botmark - \saythe\pagegoal - \saythe\pagetotal - \saythe{\badness\@cclv}% - \say\@toplist - \say\@botlist - \say\@dbltoplist - \say\@deferlist - \trace@scroll{% - \showbox\@cclv - \showbox\@cclv@saved - \showbox\pagesofar - \showbox\footsofar - \showbox\footins@saved - \showbox\footins - \showlists + \def\@tempa{\save@message}% + \@ifx{\output@procedure\@tempa}{% + \true@sw + }{% + \@ifnum{\outputpenalty=-\save@column@insert@pen}{% + \@ifnum{\holdinginserts>\z@}% + }{% + \false@sw + }% }% + {}{\output@debug@}% +}% +\def\output@debug@{% +% \saythe\inputlineno + \saythe\outputpenalty + \saythe\interlinepenalty + \saythe\brokenpenalty + \saythe\clubpenalty + \saythe\widowpenalty + \saythe\displaywidowpenalty + \saythe\predisplaypenalty + \saythe\interdisplaylinepenalty + \saythe\postdisplaypenalty + \saythe\badness + \say\thepagegrid + \saythe\pagegrid@col + \saythe\pagegrid@cur +% \say\bot@envir + \saythe\insertpenalties +% \say\@@topmark +% \say\saved@@topmark +% \say\@@firstmark +% \say\saved@@firstmark + \say\@@botmark +% \say\saved@@botmark + \saythe\pagegoal + \saythe\pagetotal + \saythe{\badness\@cclv}% + \say\@toplist + \say\@botlist + \say\@dbltoplist + \say\@deferlist + \trace@scroll{% + \showbox\@cclv + \showbox\@cclv@saved + \showbox\pagesofar +% \end{macrocode} +% Klootch! The following line provides only for two-column page grid; if debugging more columns, you must +% add more statements here. +% \begin{macrocode} + \showbox\csname col@1\endcsname + \showbox\footsofar + \showbox\footins + \showbox\footins@saved + \showlists + }% }% \@ifxundefined{\outputdebug@sw}{% \@booleanfalse\outputdebug@sw @@ -1425,11 +1477,12 @@ % would be added to the \cmd\pagesofar. My conclusion is that I had been treating them % exactly the same as floats, but that was a mistake. % -% Floats can be committed at the top of a column, in the middel, or at the bottom. +% Floats can be committed at the top of a column, in the middle, or at the bottom. % Footnotes (the only \cmd\insert\ that is used in \LaTeX) may only be committed at the bottom % of a column. So, it was necessary to provide two versions of \cmd\@combinepage, one % that committed \cmd\insert s, and the other that did not, the former used only when -% a \cmd\shipout\ was certain to be performed. +% a column of text was committed. Note that even after a column is committed, we could change our minds: +% for instance if in multicolumn grid and we decide to balance the columns. % % % \subsection{The natural output routine} @@ -1612,6 +1665,7 @@ % now empty. % \changes{4.1b}{2008/08/04}{Change \cs{@makecol} to \cs{@makecolumn} with argument} % \changes{4.1b}{2008/08/04}{Change \cs{set@colroom} to \cs{set@colht}} +% \changes{4.1n}{2010/01/02}{(AO, 571) Use procedures \cs{output@do@prep} and \cs{output@column@do} as dispatchers} % \begin{macrocode} \def\output@moving{% \set@top@firstmark @@ -1623,13 +1677,9 @@ }% }{}% \@cclv@nontrivial@sw{% - \expandafter\let\expandafter\output@prep@\csname output@prep@\bot@envir \endcsname - \outputdebug@sw{\say\output@prep@}{}% - \@ifx{\output@prep@\relax}{\output@prep@document}{\output@prep@}% + \expandafter\output@do@prep\csname output@prep@\bot@envir \endcsname \@makecolumn\true@sw - \expandafter\let\expandafter\output@column@\csname output@column@\thepagegrid\endcsname - \outputdebug@sw{\say\output@column@}{}% - \@ifx{\output@column@\relax}{\output@column@one}{\output@column@}% + \expandafter\output@column@do\csname output@column@\thepagegrid\endcsname \protect@penalty\do@startcolumn@pen \clearpage@sw{% \protect@penalty\do@endpage@pen @@ -1644,6 +1694,20 @@ \global\@mparbottom\z@ \global\@textfloatsheight\z@ }% +% \end{macrocode} +% Procedure \cmd\output@do@prep\ dispatches to the proper procedure to prepare page. +% \begin{macrocode} +\def\output@do@prep#1{% + \outputdebug@sw{\class@info{Prep: \string#1}}{}% + \@ifx{#1\relax}{\output@prep@document}{#1}% +}% +% \end{macrocode} +% Procedure \cmd\output@column@do\ dispatches to the proper procedure to output column or page. +% \begin{macrocode} +\def\output@column@do#1{% + \outputdebug@sw{\class@info{Output column: \string#1}}{}% + \@ifx{#1\relax}{\output@column@one}{#1}% +}% \def\void@cclv{\begingroup\setbox\z@\box\@cclv\endgroup}% \def\remove@lastbox{\setbox\z@\lastbox}% % \end{macrocode} @@ -1838,24 +1902,33 @@ % Upon our return, at \cmd\output@prep@\ time, the page break will accomodate the material; % it is now actually inserted by concatenating it with the contents of \cmd\footins. % The default processing for \cmd\output@post@\ is nil. -% \changes{4.1b}{2008/08/04}{Procedure \cs{set@adj@footins} to adjust for footnotes and other inserts} % \changes{4.1b}{2008/08/04}{Box \cs{footbox} changed to box \cs{footsofar}} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \def\output@init@document{% - \set@adj@footins\vsize\global\vsize\vsize + \ltxgrid@info@sw{\class@info{\string\output@init@document}}{}% + \global\vsize\vsize }% % \end{macrocode} % QUERY: the following procedure is very like \cmd\combine@foot@inserts. Should it be the same? +% Answer: no, the two differ: this procedure makes a local assignment of \cmd\footins; +% the latter makes a global assignment of \cmd\footsofar. +% +% Note: In a multicolumn document, footnotes must \emph{not} be balanced at this point. +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \def\output@prep@document{% - \@ifvoid\footsofar{}{% - \setbox\footins\vbox\bgroup + \ltxgrid@foot@info@sw{\class@info{\string\output@prep@document}\trace@scroll{\showbox\footins\showbox\footsofar}}{}% + \@ifvoid\footsofar{% + }{% + \global\setbox\footins\vbox\bgroup \unvbox\footsofar \@ifvoid\footins{}{% \marry@baselines \unvbox\footins }% \egroup + \ltxgrid@foot@info@sw{\trace@box\footins}{}% }% }% \def\output@post@document{}% @@ -1889,34 +1962,38 @@ % combine the footnote material, if not, we return with the \cmd\footins\ box unchanged. % % \changes{4.1f}{2009/07/14}{(AO, 519) \cs{footins} content must be preserved and reintegrated} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% \changes{4.1n}{2010/01/02}{(AO, 571) change calling sequence of \cs{combine@foot@inserts} to expose box registers}% % I changed the behavior of this procedure in the case where the argument is \cmd\false@sw: % send the unused footnote material to \cmd\footsofar. % \begin{macrocode} \def\@makecolumn#1{% - \setbox\@outputbox\vbox{% + \ltxgrid@foot@info@sw{\class@info{\string\@makecolumn\string#1}}{}% + \setbox\@outputbox\vbox\bgroup \boxmaxdepth\@maxdepth \@tempdima\dp\@cclv \unvbox\@cclv \vskip-\@tempdima - }% + \egroup \xdef\@freelist{\@freelist\@midlist}\global\let\@midlist\@empty \show@text@box@size \@combinefloats #1{% \@combineinserts\@outputbox\footins }{% - \combine@foot@inserts + \combine@foot@inserts\footsofar\footins }% \set@adj@colht\dimen@ \count@\vbadness \vbadness\@M - \setbox\@outputbox\vbox to\dimen@{% + \setbox\@outputbox\vbox to\dimen@\bgroup \@texttop \dimen@\dp\@outputbox \unvbox\@outputbox \vskip-\dimen@ \@textbottom - }% + \egroup \vbadness\count@ \global\maxdepth\@maxdepth }% @@ -1925,28 +2002,99 @@ % \end{macro} % % \begin{macro}{\@combineinserts} -% We split out the procedure to add the \cmd\footins\ insertions to the packaged-up page. -% Any other non-trivial insertions should also be dealt with at this time. +% The procedure to add the specified insertions to the packaged-up page. +% All other classes of insertions should also be dealt with at this time. +% +% Note that the second argument must be a \cmd\newinsert\ register: we access the \cmd\box\ along with the \cmd\skip. +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% \changes{4.1n}{2010/01/02}{(AO, 571) footnote rule is leaders, so that it may be removed by \cs{vsplit}; mechanism of \cs{kern} signals to indicate footnote height}% % \begin{macrocode} \def\@combineinserts#1#2{% - \setbox#1\vbox{% + \ltxgrid@foot@info@sw{\class@info{\string\@combineinserts\string#1\string#2}\trace@box#2}{}% + \setbox#1\vbox\bgroup \unvbox#1% - \vbox{% - \@ifvoid#2{}{% - \show@box@size{Combining inserts}#2% - \vskip\skip#2% - \color@begingroup - \normalcolor - \footnoterule - \nointerlineskip - \box#2% - \color@endgroup - }{}% - }% - }% + \@ifvoid{#2}{}{% + \dimen@\ht#2\advance\dimen@\dp#2\advance\dimen@\skip#2% + \show@box@size{Combining inserts}#2% + \vskip\skip#2% +% \end{macrocode} +% The footnote rule is created as leaders, so that it may be removed automatically (via \cmd\vsplit) +% in the event the footnote is recovered from this column. +% Note that if \cmd\color@begingroup\ or \cmd\normalcolor\ produce marks, this technique will be confounded. +% \begin{macrocode} + \setbox\z@\vbox{\footnoterule}\dimen@i\ht\z@ + \color@begingroup + \normalcolor + \cleaders\box\z@\vskip\dimen@i\kern-\dimen@i + \csname combine@insert@\the\pagegrid@col\endcsname#2% + \color@endgroup +% \end{macrocode} +% The following tells \cmd\recover@column\ the size of the footnotes added here, including the skip glue above. +% \begin{macrocode} + \kern-\dimen@\kern\dimen@ + }% + \egroup + \ltxgrid@foot@info@sw{\trace@box#1}{}% +}% +% \end{macrocode} +% We provide for a layer of abstraction for the laying down of footnotes at the bottom of this column or page. +% \end{macro} +% +% \begin{macro}{\combine@insert@tw@} +% \begin{macro}{\combine@insert@@ne} +% \begin{macro}{\twocolumn@grid@setup} +% \begin{macro}{\onecolumn@grid@setup} +% \begin{macro}{\columngrid@setup} +% \changes{4.1p}{2010/02/24}{(AO, 583) Provide setup code also for footnotes in a one-column document}% +% The following two definitions cover the cases of a two-column document (with footnotes set on a single-column width), +% and a one-column document. +% However, the case of a two-column document with footnotes set on full text width is not covered. +% +% For a document in an overall two-column page grid, execute the commands +% \cmd\twocolumn@grid@setup\ followed by \cmd\open@twocolumn; +% if on the full page width (one-column grid), the command \cmd\onecolumn@grid@setup. +% +% The following is the way REVTeX does the initialization. +% The procedure \cmd\select@column@grid\ is executed at \cmd\AtBeginDocument\ time; +% the boolean \cmd\twocolumn@sw\ selects between the two alternatives. +% \begin{verbatim} +%\def\select@column@grid{% +% \twocolumn@sw{% +% \twocolumn@grid@setup +% \open@twocolumn +% }{% +% \onecolumn@grid@setup +% }% +%}% +%\appdef\class@documenthook{% +% \select@column@grid +%}% +% \end{verbatim} +% +% \begin{macrocode} +\def\combine@insert@tw@#1{% + \compose@footnotes@two#1\@ifvbox{#1}{\unvbox}{\box}#1% }% +\def\combine@insert@@ne#1{% + \compose@footnotes@one#1\@ifvbox{#1}{\unvbox}{\box}#1% +}% +\def\twocolumn@grid@setup{% + \expandafter\let\csname combine@insert@1\endcsname\combine@insert@tw@ + \expandafter\let\csname combine@insert@2\endcsname\combine@insert@@ne +}% +\def\onecolumn@grid@setup{% + \expandafter\let\csname combine@insert@1\endcsname\combine@insert@@ne + \expandafter\let\csname combine@insert@2\endcsname\combine@insert@@ne +}% +\let\columngrid@setup\onecolumn@grid@setup +\columngrid@setup % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\@floatplacement} % In standard \LaTeX, someone (DPC?) makes the assumption that \cmd\@fpmin\ can be assigned @@ -2472,7 +2620,7 @@ % % An optimization might be to clear \cmd\clearpage@sw\ as part of the same interrupt, % but that would actually not work properly, because it is necessary for \cmd\do@endpage\ to -% possibly invoke furhter visits to the output routine before clearpage processing ceases. +% possibly invoke further visits to the output routine before clearpage processing ceases. % \begin{macrocode} \def\newpage@prep{% \if@noskipsec @@ -2549,20 +2697,32 @@ % \end{macro} % % \begin{macro}{\@clearfloatplacement} -% The procedure \cmd\@clearfloatplacement\ sets all of the float placement parameters -% to completely permissive values. The standard values appear as comments. +% The procedure \cmd\@clearfloatplacement\ sets the float placement parameters +% to completely permissive values (except for \cmd\@fpmin). The standard values are: +% +% \begin{tabular}{ll} +%\cmd\@topnum &\cmd\c@topnumber\\ +%\cmd\@toproom &\cmd\topfraction\cmd\@colht\\ +%\cmd\@botnum &\cmd\c@bottomnumber\\ +%\cmd\@botroom &\cmd\bottomfraction\cmd\@colht\\ +%\cmd\@colnum &\cmd\c@totalnumber\\ +%\cmd\@fpmin &\cmd\floatpagefraction\cmd\@colht\\ +%\cmd\@dbltopnum &\cmd\c@dbltopnumber\\ +%\cmd\@dbltoproom &\cmd\dbltopfraction\cmd\@colht\\ +%\cmd\@textmin &\cmd\@colht\cmd\advance\cmd\@textmin -\cmd\@dbltoproom\\ +%\cmd\@fpmin &\cmd\dblfloatpagefraction\cmd\textheight +% \end{tabular} % \begin{macrocode} \def\@clearfloatplacement{% - \global\@topnum \maxdimen % \c@topnumber - \global\@toproom \maxdimen % \topfraction\@colht - \global\@botnum \maxdimen % \c@bottomnumber - \global\@botroom \maxdimen % \bottomfraction\@colht - \global\@colnum \maxdimen % \c@totalnumber -%\global\@fpmin \z@ % \floatpagefraction\@colht - \global\@dbltopnum \maxdimen % \c@dbltopnumber - \global\@dbltoproom \maxdimen % \dbltopfraction\@colht - \global\@textmin \z@ % \@colht\advance \@textmin -\@dbltoproom - \global\@fpmin \z@ % \dblfloatpagefraction\textheight + \global\@topnum \maxdimen + \global\@toproom \maxdimen + \global\@botnum \maxdimen + \global\@botroom \maxdimen + \global\@colnum \maxdimen + \global\@dbltopnum \maxdimen + \global\@dbltoproom \maxdimen + \global\@textmin \z@ + \global\@fpmin \z@ \let\@testfp\@gobble \appdef\@setfloattypecounts{\@fpstype16\advance\@fpstype\m@ne}% }% @@ -2570,12 +2730,18 @@ % \end{macro} % % \begin{macro}{\@doclearpage} +% \begin{macro}{\@makefcolumn} +% \begin{macro}{\@makecol} % The \cmd\@doclearpage\ procedure is now obsoleted, as is \cmd\@makefcolumn, which it invoked. +% We also completely avoid using \cmd\@makecol\ (in favor of \cmd\@makecolumn). % \begin{macrocode} \let\@doclearpage\@undefined \let\@makefcolumn\@undefined +\let\@makecol\@undefined % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\clr@top@firstmark} % \begin{macro}{\set@top@firstmark} @@ -2679,6 +2845,10 @@ }% % \end{macrocode} % \changes{4.1b}{2008/08/04}{Turn off the \cs{set@footnotewidth} mechanism; a float `knows' its proper typesetting context} +% \changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% +% \cmd\@yfloat\ is the go-to procdure for creating the proper environment for the content of a float. +% Argument \verb+#1+ is the width of the float environment (we disable \cmd\set@footnotewidth), and +% we establish a self-contained (minipage) environment for footnotes. % \begin{macrocode} \def\@yfloat#1#2[#3]{% \@xfloat{#2}[#3]% @@ -3200,8 +3370,8 @@ % It is called by \cmd\execute@message@insert\ (i.e., at a grid change) % and saves away the current page and preserves marks. % In addition, it saves away any insertions that fall on the current page. -% As with the regular output routine, it executes in two phases, -% first with \cmd\holdinginserts\ set, then with it cleared. +% As with the natural output routine, it executes in two phases, +% first with \cmd\holdinginserts\ set, then cleared. % \begin{macrocode} \mathchardef\save@column@insert@pen=10017 \@namedef{output@-\the\save@column@insert@pen}{\toggle@insert{\savecolumn@holding}{\savecolumn@moving}}% @@ -3226,28 +3396,45 @@ }% }% % \end{macrocode} -% The procedure \cmd\save@column@moving\ is the second phase of saving a column with its inserts. +% \changes{4.1b}{2008/08/04}{New procedure for showing a box contents, \cs{trace@box}} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% The procedure \cmd\save@column@moving\ is the second phase of saving a column with its inserts. % Now that \cmd\holdinginserts\ is cleared, we can look in the various \cmd\insert\ registers for -% our inserts (at present there is only one, \cmd\footins). -% if anything is there, we save it away and ask for another cycle (because it may have split). +% our inserts (at present there is only one, \cmd\footins, along with \cmd\footins@saved). +% if anything is there, we save it away and ask for another cycle (because it may have split). % % Note that the message that is about to be executed had better deal properly with the contents of % the \cmd\footins@saved\ box. -% \changes{4.1b}{2008/08/04}{New procedure for showing a box contents, \cs{trace@box}} +% % \begin{macrocode} \def\savecolumn@moving{% + \ltxgrid@info@sw{\class@info{\string\savecolumn@moving}}{}% \@cclv@nontrivial@sw{% \save@column }{% \void@cclv }% \@ifvoid\footins{}{% - \outputdebug@sw{\trace@box\footins}{}% - \global\setbox\footins@saved\vbox{\unvbox\footins@saved\marry@baselines\unvbox\footins}% + \ltxgrid@foot@info@sw{\class@info{\string\savecolumn@moving}\trace@scroll{\showbox\footins@saved\showbox\footins}}{}% +% \end{macrocode} +% Save all away in \cmd\footins@saved. Note that if \cmd\footins\ is void, then \cmd\footins@saved\ remains untouched. +% \begin{macrocode} + \@ifvoid\footins@saved{% + \global\setbox\footins@saved\box\footins + }{% + \global\setbox\footins@saved\vbox\bgroup + \unvbox\footins@saved + \marry@baselines + \unvbox\footins + \egroup + }% + \ltxgrid@foot@info@sw{\trace@box\footins@saved}{}% \protect@penalty\save@column@insert@pen }% }% \newbox\footins@saved +\newbox\footins@recovered +\newbox\column@recovered % \end{macrocode} % \end{macro} % @@ -3349,9 +3536,14 @@ % Note: % If more insertions are added to \LaTeX\ (presumably via \cmd\newinsert), then they % must be dealt with in a way entirely analogous to \cmd\footins. +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \def\execute@message@insert#1{% - \@execute@message\save@column@insert@pen{\setbox \footins \box \footins@saved#1}% + \@execute@message\save@column@insert@pen{% + \setbox \footins \box \footins@saved + \ltxgrid@foot@info@sw{\class@info{\string\execute@message@insert}\trace@box\footins}{}% + #1% + }% }% % \end{macrocode} % \end{macro} @@ -3653,26 +3845,58 @@ % % \begin{macro}{\pagesofar} % \begin{macro}{\footsofar} +% The box register \cmd\pagesofar\ holds the portion of the (full-width) page that is already composed into columns. +% This, plus the finished columns, each with its floats, plus \cmd\box255 constitute the full galley. +% +% The box register \cmd\footsofar\ holds all of the footnotes associated with \cmd\pagesofar. % \begin{macrocode} \newbox\pagesofar \newbox\footsofar -\def\combine@foot@inserts{% - \@ifvoid\footins{% - }{% - \@ifvoid\footsofar{% - \global\setbox\footsofar\box\footins +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\combine@foot@inserts} +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% The procedure \cmd\combine@foot@inserts\ is for the purpose of merging +% the recently contributed footnotes (usually \cmd\box\cmd\footins) +% with those saved from earlier on the page (usually \cmd\box\cmd\footsofar). +% +% It is employed in a number of circumstances. +% +% \cmd\@makecolumn (when its argument is \cmd\false@sw): +% we are not shipping out, so we need to salt away any footnotes there may be. +% +% \cmd\shut@column@one: we are leaving the one-column page grid, so recover the footnotes from that material +% and combine them with those of \cmd\pagesofar. +% +% \expandafter\cmd\csname balance@2\endcsname: two columns of type have been balanced, so now balance the footnotes. +% The \cmd\combine@foot@inserts\ procedure is first used to gather footnotes from the columns balanced with those of \cmd\pagesofar. +% +% Bug 571 note: if balancing a two-column page grid, and there had been footnotes in the \cmd\pagesofar, +% those footnotes will have been balanced into a page-width box, \cmd\box\cmd\footsofar. +% We need to now re-cast them into a single, column-width galley, and only then +% combine them with those in \cmd\box\cmd\footins. +% +% \begin{macrocode} +\def\combine@foot@inserts#1#2{% + \ltxgrid@info@sw{\class@info{\string\combine@foot@inserts\string#1\string#2}}{}% + \@ifvoid#1{% + \ltxgrid@foot@info@sw{\trace@box#2}{}\global\setbox#1\box#2% }{% - \global\setbox\footsofar\vbox\bgroup - \unvbox\footsofar - \marry@baselines - \unvbox\footins + \global\setbox#1\vbox\bgroup + \ltxgrid@foot@info@sw{\trace@box#1}{}\unvbox#1% + \@ifvoid#2{}{% + \marry@baselines + \ltxgrid@foot@info@sw{\trace@box#2}{}\unvbox#2% + }% \egroup }% - }% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2}}{}% }% % \end{macrocode} % \end{macro} -% \end{macro} % % % \subsubsection{One-column page grid} @@ -3702,14 +3926,32 @@ % The procedure \cmd\open@column@one\ takes advantage of the special nature of the one-column % page grid to deal with \cmd\box\cmd\pagesofar, therefore it must also reset \cmd\@colroom. % \changes{4.1b}{2008/08/04}{Change \cs{set@colroom} to \cs{set@colht}} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \def\open@column@one#1{% + \ltxgrid@info@sw{\class@info{\string\open@column@one\string#1}}{}% +% \end{macrocode} +% Throw the \cmd\pagesofar\ back onto the Main Vertical List. +% At this point, we must also \cmd\insert\ the footnotes back into the MVL. +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% \begin{macrocode} \unvbox\pagesofar + \@ifvoid{\footsofar}{}{% + \insert\footins\bgroup\unvbox\footsofar\egroup + \penalty\z@ + }% +% \end{macrocode} +% Record which page grid we are using. Then calculate the set width (\cmd\hsize) and the goal height (\cmd\vsize). +% +% Klootch: we set the \cmd\count\cmd\footins\ to a magic number. This is only correct in the case of a two-column document. +% \begin{macrocode} \gdef\thepagegrid{one}% \global\pagegrid@col#1% \global\pagegrid@cur\@ne - \set@colht + \global\count\footins\@m + \global\divide\count\footins\tw@ \set@column@hsize\pagegrid@col + \set@colht }% % \end{macrocode} % @@ -3720,15 +3962,34 @@ % \changes{4.1b}{2008/08/04}{Change \cs{@makecol} to \cs{@makecolumn} with argument} % \changes{4.1b}{2008/08/04}{Change \cs{set@colroom} to \cs{set@colht}} % \changes{4.1f}{2009/07/15}{(AO, 519) Preserve footnotes that are in \cs{footsofar} across a page grid change} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% +% We recover the footnotes into \cmd\footsofar\ (globally) and the column into \cmd\pagesofar\ (also globally), voiding \cmd\@outputbox\ by side effect. % \begin{macrocode} \def\shut@column@one{% + \ltxgrid@info@sw{\class@info{\string\shut@column@one}}{}% \@makecolumn\false@sw - \global\setbox\pagesofar\vbox{\unvbox\@outputbox\recover@footins}% - \combine@foot@inserts +% \end{macrocode} +% Split text portion of \cmd\@outputbox\ into \cmd\pagesofar, +% and add its footnote portion to \cmd\footsofar. +% Then void out \cmd\@outputbox. +% \begin{macrocode} + \global\setbox\pagesofar\vbox\bgroup + \recover@column\@outputbox\footsofar\column@recovered\footins@recovered + \egroup + \begingroup\setbox\z@\box\@outputbox\endgroup +% \end{macrocode} +% FIXME: is \cmd\combine@foot@inserts\ needed? +% Also: if this procedure is immediately followed by \cmd\open@column@ \texttt{grid}, then \cmd\set@colht\ will be unneeded. +% \begin{macrocode} + \combine@foot@inserts\footsofar\footins \set@colht }% % \end{macrocode} % +%FIXME: the first line of a footnote should have an up-strut, and the last line a down-strut, so that they can marry baselines. +% The latter is the case; how about the former? +% % The procedure \cmd\float@column@one\ takes care of a float column that has been built by % \cmd\@tryfcolumn, in the single-column page grid. % @@ -3826,6 +4087,9 @@ % \begin{macro}{\end@column@mlt} % \begin{macro}{\output@column@mlt} % \begin{macro}{\@addmarginpar@mlt} +% \begin{macro}{\set@footnotewidth@mlt} +% \begin{macro}{\set@footnotewidth@two} +% \begin{macro}{\compose@footnotes@two} % Here are all the procedures necessary for the standard page grid named ``mlt'': % the multi-column page grid. With an argument of "2", it is, % of course, \LaTeX's familiar \cmd\twocolumn\ layout. @@ -3852,11 +4116,35 @@ % classes, it will break. You must expunge from it all such commands. % % \changes{4.1b}{2008/08/04}{Change \cs{set@colroom} to \cs{set@colht}} +% +% Bug 571 note: it is not enough to have the \cmd\pagesofar, we must also deal with the \cmd\footsofar. +% At this juncture, we should treat the case where the document has an essentially two-column page grid, +% with occasional excursions into the one-column grid. +% If a footnote is set within the latter grid, its set width should be that of the two-column grid. +% +% When a page is shipped out, if we are currently in a one-column grid, we will compose the footnotes onto the page +% in the form of balanced columns. This is only one way to handle footnotes: \classname{multicol} +% appears to set footnotes on the full text width. % \begin{macrocode} \def\open@column@mlt#1{% + \ltxgrid@info@sw{\class@info{\string\open@column@mlt\string#1}}{}% +% \end{macrocode} +% At this point, we must \cmd\insert\ the footnotes back into the Main Vertical List. +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% \begin{macrocode} + \@ifvoid{\footsofar}{}{% + \insert\footins\bgroup\unvbox\footsofar\egroup + }% +% \end{macrocode} +% Record which page grid we are using. Then calculate the set width (\cmd\hsize) and the goal height (\cmd\vsize). +% +% Klootch: we set the \cmd\count\cmd\footins\ to a magic number. This value is valid whether footnotes are being +% set on the column width or the full text width. +% \begin{macrocode} \gdef\thepagegrid{mlt}% \global\pagegrid@col#1% \global\pagegrid@cur\@ne + \global\count\footins\@m \set@column@hsize\pagegrid@col \set@colht }% @@ -3877,8 +4165,11 @@ % \changes{4.1b}{2008/08/04}{Change \cs{@makecol} to \cs{@makecolumn} with argument} % \changes{4.1b}{2008/08/04}{Change \cs{@combinepage} to \cs{@combinepage} with argument} % \changes{4.1b}{2008/08/04}{Change \cs{set@colroom} to \cs{set@colht}} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% % \begin{macrocode} \def\shut@column@mlt{% + \ltxgrid@info@sw{\class@info{\string\shut@column@mlt}}{}% \@cclv@nontrivial@sw{% \@makecolumn\false@sw \@ifnum{\pagegrid@cur<\pagegrid@col}{% @@ -3890,7 +4181,7 @@ }% \@ifnum{\pagegrid@cur>\@ne}{% \csname balance@\the\pagegrid@col\endcsname - \grid@column{}% + \grid@column\@outputbox{}% \@combinepage\false@sw \@combinedblfloats \global\setbox\pagesofar\box\@outputbox @@ -3969,6 +4260,7 @@ % % If a page needs to be shipped out, it uses the same mechanism as \cmd\do@startpage. % \changes{4.1b}{2008/08/04}{New procedure \cs{@output@combined@page}} +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% % \begin{macrocode} \def\output@column@mlt{% \@ifnum{\pagegrid@cur<\pagegrid@col}{% @@ -3976,7 +4268,7 @@ \global\advance\pagegrid@cur\@ne }{% \set@adj@colht\dimen@ - \grid@column{}% + \grid@column\@outputbox{}% \@output@combined@page }% }% @@ -3999,6 +4291,60 @@ \@ifnum{\pagegrid@cur=\@ne}% }% % \end{macrocode} +% +% \cmd\set@footnotewidth@one\ sets the width of type within footnotes to span the full text width; +% \cmd\set@footnotewidth@two\ to span a single column of the two-column grid, and +% more generally \cmd\set@footnotewidth@mlt\ for a multi-column page grid. +% \begin{macrocode} +\def\set@footnotewidth@one{% + \hsize\columnwidth + \linewidth\hsize +}% +\def\set@footnotewidth@two{\set@footnotewidth@mlt\tw@}% +\def\set@footnotewidth@mlt#1{% + \hsize\textwidth + \advance\hsize\columnsep + \divide\hsize#1% + \advance\hsize-\columnsep + \linewidth\hsize +}% +% \end{macrocode} +% +% \cmd\compose@footnotes\ is the procedure for arranging the footnotes for +% placement at the bottom of the page or column. +% In the former case, the material will be shipped out; in the latter, we must allow +% the column to possibly be balanced later on. +% +% \cmd\compose@footnotes@one\ is a no-op, because the footnotes require no rearrangement. +% In a scheme where footnotes are set on the full text width, this would be the procedure called. +% +% \cmd\compose@footnotes@two\ implements the case where a two-column document has been interrupted +% with full-page-width text (e.g., the widetext environment or the end of the document), +% and a natural page break appears. +% +% In either case, we assume that argument \verb+#1+ is an \cmd\insert\ register and must be assigned globally, +% so that when it is accessed with \cmd\box\ or \cmd\unvbox, it will be voided globally as well. +% +% To extend this scheme to a three-column page grid \cmd\compose@footnotes@thr@@\ would be created: +% it would balance the saved up footnotes into three columns. +% +% \begin{macrocode} +\def\compose@footnotes@one#1{% + \ltxgrid@foot@info@sw{\class@info{\string\compose@footnotes@one\string#1}\trace@box#1}{}% +}% +\let\compose@footnotes\compose@footnotes@one +\def\compose@footnotes@two#1{% + \ltxgrid@foot@info@sw{\class@info{\string\compose@footnotes@two\string#1}\trace@box#1}{}% + \setbox\z@\box\@tempboxa + \let\recover@column\recover@column@null + \let\marry@baselines\@empty + \balance@two#1\@tempboxa + \global\setbox#1\hbox to\textwidth{\box#1\hfil\box\@tempboxa}% + \ltxgrid@foot@info@sw{\trace@box#1}{}% +}% +% \end{macrocode} +% \end{macro} +% \end{macro} % \end{macro} % \end{macro} % \end{macro} @@ -4011,9 +4357,8 @@ % % \begin{macro}{\pagegrid@cur} % \begin{macro}{\pagegrid@col} -% \begin{macro}{\col@} % \begin{macro}{\pagegrid@init} -% We take over \LaTeX's \cmd\col@number\ and \cmd\@leftcolumn, which are obsolete. +% We take over \LaTeX's \cmd\col@number, and \cmd\@leftcolumn, which are obsolete (\cmd\@holdpg\ could also be taken over). % We create two counters to hold the columns in the page grid and the current column within. % We also create the first of a set of box registers to hold the committted columns. % \begin{macrocode} @@ -4032,13 +4377,13 @@ \pagegrid@col\tw@ % \end{macrocode} % -% The procedure \cmd\pagegrid@init\ exercises \cmd\newbox\ sufficiently to create the -% boxes for holding the columns in the page grid. +% The procedure \cmd\pagegrid@init\ is a loop, exercising \cmd\newbox\ sufficiently to create the +% boxes for holding the columns in the page grid; these have names like \expandafter\cmd\csname col@1\endcsname, etc. % \begin{macrocode} \def\pagegrid@init{% \advance\pagegrid@cur\@ne \@ifnum{\pagegrid@cur<\pagegrid@col}{% - \csname newbox\expandafter\endcsname\csname col@\the\pagegrid@cur\endcsname + \csname newbox\expandafter\endcsname\csname col@\the\pagegrid@cur\endcsname \pagegrid@init }{% }% @@ -4050,32 +4395,39 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}{\grid@column} +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% % The procedure \cmd\grid@column\ knows how to lay up the columns in a multi-column page grid. -% It uses utility procedures \cmd\append@column\ and \cmd\box@column. +% It uses utility procedures \cmd\append@column@\ and \cmd\box@column. +% +% The first argument is the box register to create, usually \cmd\@outputbox, and provides both input and output. +% The second argument a dimension, allowing us to strut down the depth of the box we create. % % \begin{macrocode} -\def\grid@column#1{% - \global\setbox\@outputbox\vbox{% - \hb@xt@\textwidth{% - \vrule\@height\z@\@width\z@\@if@empty{#1}{}{\@depth#1}% +\def\grid@column#1#2{% + \ltxgrid@info@sw{\class@info{\string\grid@column\string#1}}{}% + \global\setbox#1\vbox\bgroup + \hb@xt@\textwidth\bgroup + \vrule\@height\z@\@width\z@\@if@empty{#2}{}{\@depth#2}% \pagegrid@cur\@ne - \append@column - \box@column\@outputbox - }% - \vskip\z@skip % FIXME: page depth! - }% + \@ifnum{\pagegrid@cur<\pagegrid@col}{\loopwhile{\append@column@\pagegrid@cur\pagegrid@col}}{}% + \box@column#1% + \egroup +% \end{macrocode} +% FIXME: page depth! +% \begin{macrocode} + \vskip\z@skip + \egroup }% % \end{macrocode} % \end{macro} % -% \begin{macro}{\append@column} +% \begin{macro}{\append@column@} % \begin{macro}{\box@column} % \begin{macro}{\marry@baselines} -% The procedure \cmd\append@column\ appends columns for \cmd\grid@column, -% \cmd\box@column\ builds the columns for \cmd\append@column, +% The procedure \cmd\append@column@\ appends columns for \cmd\grid@column, +% \cmd\box@column\ builds the columns for \cmd\append@column@, % and \cmd\marry@baselines\ pastes vertical things back together. % \changes{4.0a}{2001/06/18}{Introduce \cs{marry@height} } % @@ -4112,38 +4464,61 @@ % In any case, we are not attempting to solve the more general problem of how to marry baselines % where the leading can change arbitrarily within the galley or where glue could have been trimmed % at a page top. +% +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% +% Procedure \cmd\append@column@\ composes a column onto the horizontal list along with its \cmd\columnseprule. +% Its arguments are: \verb+#1+---\cmd\pagegrid@cur, and \verb+#2+---\cmd\pagegrid@col +% \begin{macrocode} +\def\append@column@#1#2{% + \expandafter\box@column\csname col@\the#1\endcsname + \hfil\vrule\@width\columnseprule\hfil + \advance#1\@ne +% \end{macrocode} +% This procedure is the argument of \cmd\loopwhile, so it must leave a Boolean (e.g., \cmd\true@sw) in \TeX's scanner. +% \begin{macrocode} + \@ifnum{#1<#2}% +}% +% \end{macrocode} +% \changes{4.1n}{2010/01/02}{(AO, 571) calling sequence of \cs{combine@foot@inserts} and \cs{grid@column} to expose box registers; that of \cs{append@column@} its column counters}% +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% Procdure \cmd\box@column, used by \cmd\append@column@, puts down a box containing the specified column. +% Its height is adjusted down to \cmd\@colht, if needed; likewise, the width is set to \cmd\columnwidth. +% The rag at the bottom is controlled by \cmd\raggedcolumn@skip. % \begin{macrocode} -\def\append@column{% - \@ifnum{\pagegrid@cur<\pagegrid@col}{% - \expandafter\box@column\csname col@\the\pagegrid@cur\endcsname - \hfil - \vrule \@width\columnseprule - \hfil - \advance\pagegrid@cur\@ne - \append@column - }{% - }% -}% \def\box@column#1{% + \ltxgrid@info@sw{\class@info{\string\box@column\string#1}}{}% \raise\topskip - \hb@xt@\columnwidth{% + \hb@xt@\columnwidth\bgroup \dimen@\ht#1\@ifdim{\dimen@>\@colht}{\dimen@\@colht}{}% -% \advance\dimen@-\topskip \count@\vbadness\vbadness\@M \dimen@ii\vfuzz\vfuzz\maxdimen - \outputdebug@sw{\saythe\@colht\saythe\dimen@}{}% - \vtop to\dimen@ -% \@ifdim{\ht#1>\textheight}{to\textheight}{}% - {\hrule\@height\z@ + \ltxgrid@info@sw{\saythe\@colht\saythe\dimen@}{}% + \vtop to\dimen@\bgroup + \hrule\@height\z@ \unvbox#1% \raggedcolumn@skip - }% + \egroup \vfuzz\dimen@ii \vbadness\count@ \hss - }% + \egroup }% +% \end{macrocode} +% The purpose of procedure \cmd\marry@baselines\ is to ensure that the baseline spacing is correct; +% it does this by making adjustments to the previous line, compensating for its depth, and by adding in +% skip glue in an amount that assumes the added material has \cmd\topskip\ glue above. +% \begin{macrocode} \def\marry@baselines{% + \begingroup + \setbox\z@\lastbox + \@ifvoid{\z@}{% + \endgroup + }{% + \aftergroup\kern + \aftergroup-% + \expandafter\box\expandafter\z@\expandafter\endgroup\the\dp\z@\relax + }% \vskip\marry@skip\relax }% \gdef\marry@skip{\z@skip}% @@ -4178,10 +4553,12 @@ % % \changes{4.1b}{2008/08/04}{Change \cs{@combinepage} to \cs{@combinepage} with argument} % \changes{4.1b}{2008/08/04}{(AO, 452) Support length checking: show size of shipped out text.} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % % QUERY: In the following, if \cmd\box\cmd\footins\ is not void, its contents are lost. Can this ever happen? % \begin{macrocode} \def\@combinepage#1{% + \ltxgrid@foot@info@sw{\class@info{\string\@combinepage\string#1}}{}% \@ifvoid\pagesofar{}{% \setbox\@outputbox\vbox{% \unvbox\pagesofar @@ -4191,8 +4568,15 @@ }% #1{% \@ifvoid\footsofar{}{% +% \end{macrocode} +% At this point, \cmd\footins\ is empty; all of the footnotes have been combined into \cmd\footsofar. +% \begin{macrocode} \show@box@size{Combining page footnotes}\footsofar \setbox\footins\box\footsofar +% \end{macrocode} +% Depending on the page grid, we compose the footnotes for placement on the page. +% \begin{macrocode} + \compose@footnotes \@combineinserts\@outputbox\footins }% }{% @@ -4312,7 +4696,11 @@ % % Question: what if there are committed floats? Footnotes? % Answer: full-page-width floats are only committed at top, and they are already reckoned with in \cmd\@colht. -% Column-width committed floats are incorporated by \cmd\@makecolumn; footnotes need help. +% Column-width committed floats are incorporated by \cmd\@makecolumn. +% +% As to footnotes, our scheme is to keep the \cmd\footins\ insert register up to date, and to use the insert mechanism +% to ensure room for footnotes. +% When a change is made to the page grid, the footnotes will need to be propagated back into the MVL. % % Note: FIXME: adjusting for \cmd\pagesofar\ is done at not quite the right time. I need to reexamine \cmd\set@colht, % because \cmd\@dbltoplist\ and \cmd\pagesofar\ really should be on the same footing. @@ -4329,6 +4717,7 @@ % On the other hand, why not simply forget all this caching and (re-)calculate \cmd\vsize\ as late as possible? % Particularly, \cmd\@colht\ is an artifact of the old way of doing things, where once it was set, it would never change. % +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \def\set@colht{% \set@adj@textheight\@colht @@ -4336,42 +4725,44 @@ \set@colroom }% \def\set@adj@textheight#1{% + \ltxgrid@info@sw{\class@info{\string\set@adj@textheight\string#1}\saythe\textheight}{}% #1\textheight \def\@elt{\adj@page#1}% \@booleantrue\firsttime@sw\@dbltoplist \let\@elt\relax \global#1#1\relax - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\saythe#1}{}% }% \def\set@colroom{% + \ltxgrid@info@sw{\class@info{\string\set@colroom}}{}% \set@adj@colht\@colroom \@if@empty\enlarge@colroom{}{% \global\advance\@colroom\enlarge@colroom\relax - \outputdebug@sw{\saythe\@colroom}{}% + \ltxgrid@info@sw{\saythe\@colroom}{}% }% \@ifdim{\@colroom>\topskip}{}{% \ltxgrid@info{Not enough room: \string\@colroom=\the\@colroom; increasing to \the\topskip}% \@colroom\topskip }% \global\@colroom\@colroom +% \ltxgrid@info@sw{\class@info{\string\set@colroom\string\vsize=\string\colroom}\saythe\vsize}{}% \set@vsize }% % \def\set@vsize{% \global\vsize\@colroom - \outputdebug@sw{\saythe\vsize}{}% + \ltxgrid@info@sw{\class@info{\string\set@vsize\string\vsize=\string\colroom}\saythe\vsize}{}% }% % \end{macrocode} -% \changes{4.1b}{2008/08/04}{Procedure \cs{set@adj@footins} to adjust for footnotes and other inserts} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} % \begin{macrocode} \def\set@adj@colht#1{% #1\@colht - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\set@adj@colht\string#1-\string\pagesofar}\saythe#1}{}% \@ifvoid\pagesofar{}{% \advance#1-\ht\pagesofar\advance#1-\dp\pagesofar - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\pagesofar}\saythe#1}{}% }% - \set@adj@footins#1% \def\@elt{\adj@column#1}% \@booleantrue\firsttime@sw\@toplist \@booleantrue\firsttime@sw\@botlist @@ -4380,33 +4771,18 @@ \def\adj@column#1#2{% \advance#1-\ht#2% \advance#1-\firsttime@sw{\textfloatsep\@booleanfalse\firsttime@sw}{\floatsep}% - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@info@sw{\class@info{\string\adj@column\string#1-\string#2}\saythe#1}{}% }% \def\adj@page#1#2{% \advance#1-\ht#2% \advance#1-\firsttime@sw{\dbltextfloatsep\@booleanfalse\firsttime@sw}{\dblfloatsep}% - \outputdebug@sw{\saythe#1}{}% -}% -% \end{macrocode} -% \changes{4.1b}{2008/08/04}{Procedure \cs{set@adj@footins} to adjust for footnotes and other inserts} -% \changes{4.1f}{2009/07/14}{(AO, 519) Do not use \cs{dimen@} register as a scratch register in \cs{set@adj@footins}} -% Bug note (AO): I had used \cmd\dimen@\ as a scratch register within this procedure, because I had thought -% that doing, e.g., \cmd\advance\cmd\dimen@-\cmd\skip\cmd\footins\ would not work in \TeX. -% Not only was I wrong about that, but I then proceded to execute \cmd\set@adj@footins\cmd\dimen@, -% which understandably did not work. Ah! The treachery of the human mind. -% \begin{macrocode} -\def\set@adj@footins#1{% - \@booleanfalse\temp@sw - \set@adj@box#1\footins - \set@adj@box#1\footins@saved - \set@adj@box#1\footsofar - \temp@sw{\advance#1-\skip\footins}{}% + \ltxgrid@info@sw{\class@info{\string\adj@page\string#1-\string#2}\saythe#1}{}% }% \def\set@adj@box#1#2{% \@ifvoid#2{}{% \advance#1-\ht#2\advance#1-\dp#2% \@booleantrue\temp@sw - \outputdebug@sw{\saythe#1}{}% + \ltxgrid@foot@info@sw{\class@info{\string\set@adj@box\string#2}\saythe#1}{}% }% }% % \end{macrocode} @@ -4450,6 +4826,9 @@ % It was necessary to deal with the case where \cmd\box\cmd\footsofar\ was not empty % upon execution of this balancing code. We store it away in \cmd\box\cmd\footins\ and % add it back in afterwards. +% +% Here is a conundrum: if we switch between single-, two-, and three-column page grids: +% On what measure should the footnotes be set? % \begin{macrocode} \begingroup \catcode`\1=\cat@letter @@ -4458,23 +4837,20 @@ % \cmd\toks@\ contains the repacement part for an effective \cmd\def\cs{balance@2}. % \begin{macrocode} \toks@{% +% \end{macrocode} +% \cmd\balance@two, by side effect, strips footnotes into \cmd\box\cmd\footins. +% \begin{macrocode} \setbox\footins\box\footsofar \balance@two\col@1\@outputbox % \end{macrocode} -% \begin{verbatim} -% \global\setbox\col@1\box\col@1 -% \end{verbatim} +% We ensure that the box assignments are global. % \begin{macrocode} - \combine@foot@inserts - \@ifvoid\footsofar{}{% - \global - \setbox\footsofar\vbox\bgroup - \setbox\z@\box\@tempboxa - \let\recover@footins\relax - \balance@two\footsofar\@tempboxa - \hb@xt@\textwidth{\box\footsofar\hfil\box\@tempboxa}% - \egroup - }% + \global\setbox\col@1\box\col@1 + \global\setbox\@outputbox\box\@outputbox +% \end{macrocode} +% The following line puts all footnotes into the footnote galley, \cmd\footsofar. +% \begin{macrocode} + \combine@foot@inserts\footsofar\footins }% \aftergroup\def\aftergroup\balance@2\expandafter \endgroup\expandafter{\the\toks@}% @@ -4483,12 +4859,12 @@ % % \begin{macro}{\balance@two} % The procedure \cmd\balance@two\ takes two columns and balances them; in the process it removes -% any footnotes that may be present to a place of safety, for later placement at the foot of the -% shipped-out page. +% any footnotes that may be present to a place of safety \cmd\footsofar, +% for later placement at the foot of the shipped-out page. % The box register \cmd\box\cmd\@ne\ is the aggregate of all columns. % The box register \cmd\box\cmd \z@\ is the last column. % The box register \cmd\box\cmd\tw@\ is the first column. -% The \cmd\dimen\ register \cmd\dimen@\ is the trial value to balance to, +% The \cmd\dimen\ register \cmd\dimen@\ is the trial value to \cmd\vsplit\ to, % initially half the height of \cmd\box\cmd\@ne. % The \cmd\dimen\ register \cmd\dimen@i\ is the increment for the next trial; % its initial value is equal to the initial value of \cmd\dimen@. @@ -4547,103 +4923,192 @@ % The dimension involved is checked against the current \cmd\@colroom\ to guard against the case where % excessive material happens to fall in either column. % \changes{4.1b}{2008/08/04}{Change \cs{set@colroom} to \cs{set@colht}} +% \changes{4.1n}{2009/12/02}{More diagnostics of column balancing} +% \changes{4.1n}{2010/01/02}{(AO, 571) coding convention: use \cs{bgroup}, \cs{egroup} (instead of braces) when a box is being built}% +% \changes{4.1n}{2010/01/02}{(AO, 571) Footnotes, when columns are balanced or when they are composed with their column}% +% \changes{4.1n}{2010/01/02}{(AO, 571) Change \cs{balance@two}'s balancing algorithm to more successfully balance extremely short columns.} % \begin{macrocode} \def\balance@two#1#2{% + \ltxgrid@info@sw{\class@info{\string\balance@two\string#1\string#2}}{}% \outputdebug@sw{\trace@scroll{\showbox#1\showbox#2}}{}% - \setbox\@ne\vbox{% - \@ifvoid#1{}{% - \unvcopy#1\recover@footins - \@ifvoid#2{}{\marry@baselines}% - }% - \@ifvoid#2{}{% - \unvcopy#2\recover@footins - }% - }% +% \end{macrocode} +% The first step is to recover the footnotes from the bottoms of the two columns (globally, into \cmd\footsofar) +% and to combine the text into \cmd\box\cmd\@ne, but without voiding either of the argument boxes. +% \begin{macrocode} + \setbox\thr@@\copy\footsofar + \setbox\@ne\vbox\bgroup + \@ifvoid{#1}{}{% + \recover@column#1\footsofar\column@recovered\footins@recovered + \@ifvoid{#2}{}{\marry@baselines}% + }% + \@ifvoid{#2}{}{% + \recover@column#2\footsofar\column@recovered\footins@recovered + }% + \egroup + \outputdebug@sw{\trace@scroll{\showbox\@ne}}{}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox\footsofar}}{}% +% \end{macrocode} +% Hereunder, \cmd\dimen@\ is the split value. We adjust it until the step size is small enough, while the split is acceptable. +% Also, \cmd\dimen@i\ is the step size. Once this value is greater than a half point, we must iterate. +% \begin{macrocode} \dimen@\ht\@ne\divide\dimen@\tw@ \dimen@i\dimen@ \vbadness\@M \vfuzz\maxdimen + \splittopskip\topskip \loopwhile{% - \dimen@i=.5\dimen@i - \outputdebug@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% \setbox\z@\copy\@ne\setbox\tw@\vsplit\z@ to\dimen@ - \setbox\z@ \vbox{% - \unvcopy\z@ - \setbox\z@\vbox{\unvbox\z@ \remove@lastbox\aftergroup\vskip\aftergroup-\expandafter}\the\dp\z@\relax - }% - \setbox\tw@\vbox{% - \unvcopy\tw@ - \setbox\z@\vbox{\unvbox\tw@\remove@lastbox\aftergroup\vskip\aftergroup-\expandafter}\the\dp\z@\relax - }% + \remove@depth\z@\remove@depth\tw@ +% \end{macrocode} +% The following line would provide a diagnostic of the iterations of column balancing, were we to use it. +% \begin{verbatim} +% \outputdebug@sw{\trace@scroll{\showbox\tw@\showbox\z@}}{}% +% \end{verbatim} +% Hereunder, \cmd\dimen@ii\ is used to reckon the difference in height between the left box and the right. +% \begin{macrocode} \dimen@ii\ht\tw@\advance\dimen@ii-\ht\z@ - \@ifdim{\dimen@i>.5\p@}{% - \advance\dimen@\@ifdim{\dimen@ii<\z@}{}{-}\dimen@i - \true@sw + \dimen@i=.5\dimen@i + \ltxgrid@info@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% +% \end{macrocode} +% If the columns are within a half-point of each other, +% \begin{macrocode} + \@ifdim{\dimen@ii<.5\p@}{% + \@ifdim{\dimen@ii>-.5\p@}% }{% - \@ifdim{\dimen@ii<\z@}{% - \advance\dimen@\tw@\dimen@i - \true@sw - }{% - \false@sw - }% + \false@sw }% - }% - \outputdebug@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% - \@ifdim{\ht\z@=\z@}{% - \@ifdim{\ht\tw@=\z@}{% +% \end{macrocode} +% The above results in a Boolean, which now chooses between the following two brace-delimited clauses. +% If the step size is less than a half-point, then terminate the loop. +% \begin{macrocode} + {% \true@sw }{% + \@ifdim{\dimen@i<.5\p@}% + }% +% \end{macrocode} +% The above results in a Boolean, which now chooses between the following two brace-delimited clauses. +% The true-part terminates the loop, otherwise iterate. +% \begin{macrocode} + {% \false@sw }% + {% +% \end{macrocode} +% For the next iteration, the candidate split dimension \cmd\dimen@\ will be one step larger +% if the height of the left box is less than that of the right box. +% Otherwise it will be one step smaller. +% \begin{macrocode} + \advance\dimen@\@ifdim{\dimen@ii<\z@}{}{-}\dimen@i + \true@sw + }% + }% +% \end{macrocode} +% The loop has terminated. +% \begin{macrocode} + \ltxgrid@info@sw{\saythe\dimen@\saythe\dimen@i\saythe\dimen@ii}{}% +% \end{macrocode} +% The algorithm has failed to find a satisfactory result if +% the left column is of non-zero height and the right column is of zero height. +% \begin{macrocode} + \@ifdim{\ht\z@=\z@}{% + \@ifdim{\ht\tw@=\z@}% }{% \true@sw }% +% \end{macrocode} +% The \cmd\false@sw\ branch is executed if the algorithm has failed. +% We restore the original boxes. +% \begin{macrocode} {% }{% \ltxgrid@info{Unsatifactorily balanced columns: giving up}% \setbox\tw@\box#1% \setbox\z@ \box#2% + \global\setbox\footsofar\box\thr@@ }% \setbox\tw@\vbox{\unvbox\tw@\vskip\z@skip}% \setbox\z@ \vbox{\unvbox\z@ \vskip\z@skip}% \set@colht \dimen@\ht\z@\@ifdim{\dimen@<\ht\tw@}{\dimen@\ht\tw@}{}% \@ifdim{\dimen@>\@colroom}{\dimen@\@colroom}{}% - \outputdebug@sw{\saythe{\ht\z@}\saythe{\ht\tw@}\saythe\@colroom\saythe\dimen@}{}% + \ltxgrid@info@sw{\saythe{\ht\z@}\saythe{\ht\tw@}\saythe\@colroom\saythe\dimen@}{}% \setbox#1\vbox to\dimen@{\unvbox\tw@\unskip\raggedcolumn@skip}% \setbox#2\vbox to\dimen@{\unvbox\z@ \unskip\raggedcolumn@skip}% \outputdebug@sw{\trace@scroll{\showbox#1\showbox#2}}{}% }% % \end{macrocode} +% Procedure \cmd\remove@depth\ rearranges the given (vertical) box register so that it has zero depth. +% \begin{macrocode} +\def\remove@depth#1{% + \setbox#1\vbox\bgroup + \unvcopy#1% + \setbox\z@\vbox\bgroup + \unvbox#1% + \setbox\z@\lastbox + \aftergroup\kern\aftergroup-\expandafter + \egroup + \the\dp\z@\relax + \egroup +}% +% \end{macrocode} % \end{macro} % -% \begin{macro}{\recover@footins} -% The procedure \cmd\recover@footins\ is the utility procedure for recovering the footnotes -% from the bottom of a column. It is used when the page grid is changed, so that footnotes can be -% set at the bottom of the shipped out page. -% \changes{4.1b}{2008/08/04}{New procedure for showing a box contents, \cs{trace@box}} -% \begin{macrocode} -\def\recover@footins{% - \skip\z@ \lastskip\unskip - \skip\@ne\lastskip\unskip - \setbox\z@\lastbox - \@ifvbox\z@{% - \setbox\z@\vbox{% - \unvbox\z@ - \setbox\z@\lastbox - \@ifvoid\z@{}{% - \global\setbox\footsofar\vbox{% - \unvbox\footsofar - \@ifvbox\z@{% - \unvbox\z@ - }{% - \box\z@ - }% - }% - }% +% \changes{4.1n}{2010/01/02}{(AO, 571) Abandon \cs{recover@footins} in favor of \cs{recover@column}}% +% Procedure \cmd\recover@column\ is a utility to separate a column box into text and footnotes; +% the former being contributed to the current (vertical) list, the latter appended to the given register, usually \cmd\footsofar. +% +% Argument \verb+#1+ is the input: it should be a \cmd\vbox, and it remains unaltered. +% Argument \verb+#2+ is the box into which to (globally) add the footnotes, usually \cmd\footsofar. +% Arguments \verb+#3+ and \verb+#4+ are scratch box registers to use in this calculation. +% As a side effect, \verb+#3+ will be unboxed into whatever vertical mode we are in at the moment (should be a \cmd\vbox). +% \begin{macrocode} +\def\recover@column#1#2#3#4{% + \ltxgrid@info@sw{\class@info{\string\recover@column\string#1\string#2\string#3\string#4}}{}% + \setbox#4\vbox{\unvcopy#1}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#4}}{}% + \dimen@\ht#4% + \ltxgrid@foot@info@sw{\saythe\dimen@}{}% + \setbox#4\vbox\bgroup + \unvbox#4\unskip +% \end{macrocode} +% We now strip the footnotes from the bottom of this box, adding them to \cmd\footsofar. +% The method relies on a signal, consisting of a complementary pair of kerns, placed at the bottom of the box by \cmd\@combineinserts. +% \begin{macrocode} + \dimen@i\lastkern\unkern\advance\dimen@i\lastkern + \@ifdim{\dimen@i=\z@}{% + \dimen@i\lastkern\unkern + \ltxgrid@foot@info@sw{\saythe\dimen@i}{}% + \aftergroup\dimen@i + \expandafter\egroup\the\dimen@i\relax + }{% + \egroup }% - }{}% - \outputdebug@sw{\trace@box\footsofar}{}% +% \end{macrocode} +% Split the column into \verb+#3+ and the footnote into \verb+#4+. +% Append the footnote to \verb+#2+. +% \begin{macrocode} + \@ifdim{\dimen@i<\z@}{% + \advance\dimen@\dimen@i + \ltxgrid@foot@info@sw{\saythe\dimen@i\saythe\dimen@}{}% + \splittopskip\z@skip + \global\setbox#3\vsplit#4 to\dimen@ + \global\setbox#4\vbox{\unvbox#4}% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2\showbox#3\showbox#4}}{}% + \global\setbox#2\vbox\bgroup\unvbox#2\vskip\z@skip\unvbox#4\egroup + }{% +% \end{macrocode} +% What if \cmd\dimen@i\ is zero? +% In that case, \cmd\setbox\#3\cmd\box\#4, and do not touch \cmd\box\#2. +% \begin{macrocode} + \setbox#3\box#4% + \ltxgrid@foot@info@sw{\trace@scroll{\showbox#1\showbox#2\showbox#3\showbox#4}}{}% + }% + \unvbox#3% + \loopwhile{\dimen@\lastskip\@ifdim{\dimen@>\z@}{\unskip\true@sw}{\false@sw}}% +}% +\def\recover@column@null#1#2#3#4{% + \unvcopy#1% }% % \end{macrocode} % \end{macro} @@ -5300,19 +5765,9 @@ }% \def\force@deferlist@empty{% \force@deferlist@sw{% -% \end{macrocode} -% \begin{verbatim} -% \ltxgrid@info{#1, attempting rectification}% -% \end{verbatim} -% \begin{macrocode} \penalty-\pagebreak@pen \protect@penalty\do@forcecolumn@pen }{% -% \end{macrocode} -% \begin{verbatim} -% \ltxgrid@info{#1}% -% \end{verbatim} -% \begin{macrocode} }% }% \@booleanfalse\force@deferlist@sw @@ -5448,6 +5903,20 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@outputpage@head} +% For compatibility with David Carlisle's \classname{lscape} package, we need to allow the +% \cmd\LS@rot\ procedure to mung \cmd\@outputbox. +% +% Implementation note: the \classname{lscape} package effectively tailpatches two \LaTeX\ internals to accomplish its purpose, +% an approach that is not robust. It is more robust to headpatch \cmd\@outputpage, which is what we do here. +% \changes{4.1o}{2010/02/02}{(AO, 576) Allow \classname{lscape} to act on \cs{@outputbox} at the right time}% +% \begin{macrocode} +\appdef\@outputpage@head{% + \@ifx{\LS@rot\@undefined}{}{\LS@rot}% +}% +% \end{macrocode} +% \end{macro} +% % \subsubsection{Warning message} % % \begin{macro}{\ltxgrid@info} @@ -5463,6 +5932,7 @@ \ltxgrid@warn@sw{\class@warn}{\@gobble}% }% \@booleantrue\ltxgrid@warn@sw +\@booleanfalse\ltxgrid@foot@info@sw % \end{macrocode} % \end{macro} % \end{macro} only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/source/latex/revtex/aip.dtx +++ texlive-extra-2009/texmf-dist/source/latex/revtex/aip.dtx @@ -124,9 +124,9 @@ %<*package> %%% @LaTeX-file{ %%% filename = "aip.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:32:00 GMT-8", %%% checksum = "1163", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Institute of Physics. @@ -231,7 +231,8 @@ % typeset documentation. % \begin{macrocode} %<*driver|package> - [2009/10/09 4.1h AIP substyle for REVTeX]% \fileversion +% + [2010/07/25 4.1r AIP substyle for REVTeX]% \fileversion % % \end{macrocode} % @@ -527,6 +528,45 @@ \@booleanfalse\authornum@sw % \end{macrocode} % +% \begin{macro}{\@bibdataout@init} +% \begin{macro}{\@bibdataout@aip} +% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}% +% Procedure \cmd\@bibdataout@aip\ has the job of writing the control record into the +% job's \cmd\jobname\filename{.bib} file, where it will adjust the options to \filename{.bst} processing. +% It is installed into the initialization procedure \cmd\@bibdataout@init, and its meaning +% is set by the society (AIP) and journal. +% +% \begin{macrocode} +\appdef\@bibdataout@rev{\@bibdataout@aip}% +\def\@bibdataout@aip{% + \immediate\write\@bibdataout{% +% \end{macrocode} +% An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}. +% \begin{macrocode} + @CONTROL{% + aip41Control% +% \end{macrocode} +% Say whether we want long bibliography style (the default), or the abbreviated style. +% \begin{macrocode} + \longbibliography@sw{\true@sw}{\aip@jtitx@sw{\false@sw}{\true@sw}}% + {% + ,pages="1",title="0"% + }{% + ,pages="0",title=""% + }% + }% + }% +% \end{macrocode} +% Place a \cmd\citation\ into the auxiliary file corresponding to this entry. +% \begin{macrocode} + \if@filesw + \immediate\write\@auxout{\string\citation{aip41Control}}% + \fi +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% % For AIP, the preprint style \classoption{preprint} is the default. % \begin{macrocode} \@booleantrue\preprintsty@sw @@ -1467,47 +1507,23 @@ %\endbatchfile % \end{verbatim} % -% Between the two files \file{aipnum.dbj} and \file{aipnum.dbj}, +% Between the two files \file{aipnum.dbj} and \file{aipauth.dbj}, % the differences are limited: % \file{aipnum.dbj} has two lines lacking in \file{aipauth.dbj}: % \begin{verbatim} -% ,seq-no%: Citation order (unsorted, like unsrt.bst) -% ,nm-init,ed-au%: Initials + surname (J. F. Smith) +% seq-no,%: Citation order (unsorted, like unsrt.bst) +% nm-init,ed-au,%: Initials + surname (J. F. Smith) % \end{verbatim} % thus, the ``numbered citation'' bibliography is sorted by citation order, and % the names are give first inital, then last name. % -% Likewise, \file{aipauth.dbj} has two lines lacking in \file{aipnum.dbj}: +% Likewise, \file{aipauth.dbj} has one line lacking in \file{aipnum.dbj}: % \begin{verbatim} -% ,ay%: Author-year with some non-standard interface -% ,nat%: Natbib for use with natbib v5.3 or later -% ,blkyear%: Missing date left blank -% ,nm-rev%: Surname + initials (Smith, J. F.) +% nm-rev,%: Surname + comma + initials (Smith, J. F.) % \end{verbatim} % Thus, the ``author-year'' bibliography is sorted by author name, and % names are given last name first, followed by initials. % -% Note that \file{aipnumlong.dbj} is the same as \file{aipnum.dbj}, except: -% \begin{itemize} -% \item -% Remove \texttt{jtit-x}, \texttt{jpg-1}. This means article titles and full page range. -% \item -% Add \texttt{article-title-o}: article title is not required. -% \item -% Remove \texttt{nm-init}. This means full names. -% \item -% The file to be \cmd\generate d is \filename{aipnum4-1long.bst} instead of \filename{aipnum4-1.bst}. -% \end{itemize} -% -% The differences between \file{aipauthlong.dbj} and \file{aipauth.dbj} -% are exactly the same as between \file{aipnumlong.dbj} and \file{aipnum.dbj} -% -% To get a banner in the \file{.blg} file, patch by hand into \file{apsrev.bst}: -% \begin{verbatim} -% FUNCTION {banner.log} {"REVTeX-compatible apsrev.bst 9812" warning$} -% \end{verbatim} -% and invoke \texttt{banner.log} from within \texttt{begin.bib} -% % We ensure that the journal substyle has the first word % in the matter by installing the (default) AIP code % later on (see Section~\ref{sec:aip-defaults}). @@ -1530,7 +1546,12 @@ \@ifx@empty\refname{% \par\vspace{6\p@ plus 6\p@}% }{% +% \end{macrocode} +% The following line has been commented out: +% \begin{verbatim} % \let\@hangfroms@section\@hang@froms +% \end{verbatim} +% \begin{macrocode} \expandafter\section\expandafter*\expandafter{\refname}% \@nobreaktrue }% @@ -1969,7 +1990,7 @@ \aip@jtitx@sw{% \def\@bibstyle{aipauth\substyle@post}% }{% - \def\@bibstyle{aipauth\substyle@post long}% + \def\@bibstyle{aipauth\substyle@post}% }% \authornum@sw{% \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}% @@ -1990,7 +2011,7 @@ \aip@jtitx@sw{% \def\@bibstyle{aipnum\substyle@post}% }{% - \def\@bibstyle{aipnum\substyle@post long}% + \def\@bibstyle{aipnum\substyle@post}% }% \bibpunct{}{}{,}{s}{}{\textsuperscript{,}}% \let\onlinecite\rev@citealpnum only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/source/latex/revtex/ltxfront.dtx +++ texlive-extra-2009/texmf-dist/source/latex/revtex/ltxfront.dtx @@ -108,15 +108,15 @@ % % \fi % -% \GetFileInfo{ltxfront.dtx}\CheckSum{2012} +% \GetFileInfo{ltxfront.dtx}\CheckSum{2094} % % \iffalse ltxdoc klootch %<*package> %%% @LaTeX-file{ %%% filename = "ltxfront.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "2012", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -145,7 +145,7 @@ % which contains basic information about this package. % The contents of this file are generated when % you typeset the programmer's documentation. -% Search on "{filecontents*}{00readme}" to locate it. +% Search on "{filecontents*}{00readme.tex}" to locate it. % \fi\input{00readme}% % % \subsection{Bill of Materials} @@ -188,17 +188,27 @@ % An appropriate message is displayed if % a different \TeX{} format is used. % \begin{macrocode} -%<*driver|package> +%<*doc|package> \NeedsTeXFormat{LaTeX2e}[1995/12/01]% -% +% % \end{macrocode} % As desired, the following modules all % take common version information: % \begin{macrocode} -%\ProvidesFile{ltxfront.sty}% -%<*driver> -\expandafter\ProvidesFile\expandafter{\jobname.dtx}% -% +%\typeout{% +%<*package|doc> +\ProvidesFile{% +% +%<*kernel|package|doc> +ltxfront% +% +%<*doc> +.dtx% +% +%.sty% +%<*package|doc> +}% +% % \end{macrocode} % % The following line contains, for once and for all, @@ -207,30 +217,32 @@ % consistently in all generated files and in the % typeset documentation. % \begin{macrocode} -%<*driver|package> - [2009/10/09 4.1h frontmatter package]% \fileversion -% +%<*doc|package|kernel> +% + [2010/07/25/20:33:00 4.1r frontmatter package (AO,DPC)]% \fileversion +% +%}% % \end{macrocode} % % -% \section{The driver module \texttt{driver}} +% \section{The doc module \texttt{doc}} % % This module, consisting of the present section, % typesets the programmer's documentation, % generating the \file{00readme} and sample document as needed. % % Because the only uncommented-out lines of code at the beginning of -% this file constitute the \file{driver} module itself, +% this file constitute the \file{doc} module itself, % we can simply typeset the \file{.dtx} file directly, % and there is thus rarely any need to -% generate the ``driver'' {\sc docstrip} module. +% generate the ``doc'' {\sc docstrip} module. % Module delimiters are nonetheless required so that % this code does not find its way into the other modules. % % The \enve{document} command concludes the typesetting run. % % \begin{macrocode} -%<*driver> +%<*doc> % \end{macrocode} % % \subsection{The Preamble} @@ -429,6 +441,19 @@ \changes{4.1f}{2009/07/07}{(AO, 515) Use \cs{set@footnotefont}, which is defined in ltxutil} \changes{4.1g}{2009/10/05}{(AO, 535) Robustify \cs{footnote} while \cs{class@warn} is expanding its argument} \changes{4.1g}{2009/10/05}{(AO, 539) Robustify \cs{class@warn} against TOC processing}% +\changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} +\changes{4.1i}{2009/10/23}{(AO, 540) Rationalize code that appends to \cs{AF@grp}} +\changes{4.1i}{2009/10/23}{(AO, 540) Optimize boolean logic } +\changes{4.1i}{2009/10/23}{(AO, 544) Class options runinaddress and unsortedaddress stopped working} +\changes{4.1m}{2009/11/20}{(AO, 563) \cs{collaboration} to work with both \texttt{groupedaddress} and \texttt{superscriptaddress}} +\changes{4.1m}{2009/11/20}{(AO, 563) More complete runtime diagnostics via \cs{frontmatterverbose@sw}} +\changes{4.1m}{2009/11/20}{(AO, 563) Let \cs{@collaboration@gobble} parse all three arguments of \cs{CO@opr}} +\changes{4.1n}{2009/11/30}{(AO, 567) Handle \cs{noaffiliation} case} +\changes{4.1n}{2009/11/30}{(AO, 567) Handle punctuation for \classoption{superscriptaddress} style authors' extra information, such as \cs{email}} +\changes{4.1n}{2009/12/03}{(AO) remove http:// from \cs{href} call} +\changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% +\changes{4.1n}{2010/01/02}{(AO, 571) allow split after last line of footnote}% +\changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% \end{filecontents*} % \end{macrocode} @@ -475,7 +500,7 @@ % \end{macrocode} % % \begin{macrocode} -% +% % \end{macrocode} % % \section{Using this package} @@ -615,7 +640,7 @@ % afford the most independence for choosing the display option. Finally, % it should be mentioned that the affiliations for the % \classoption{superscriptaddress} are presented and numbered -% in the order that they are encountered. These means that the order +% in the order that they are encountered. This means that the order % will usually follow the order of the authors. An alternative ordering % can be forced by including a list of \cmd\affiliation\ commands before % the first \cmd{\author} in the desired order. Then use the exact same @@ -810,24 +835,12 @@ Title page macros for \protect\LaTeXe, by A. Ogawa (arthur_ogawa at sbcglobal.net)% }% -% -% \end{macrocode} -% -% \subsection{Banner}% -% Credit where due. -% \begin{macrocode} -%<*kernel> -\typeout{% - ltxfront [2009/10/06/20:20 4.1g]: Arthur Ogawa (after David P. Carlisle)% -}% -% % \end{macrocode} % % \subsection{Prerequisites}% % % This package requires the use of the \classname{ltxutil} package. % \begin{macrocode} -%<*package> \let\class@name\package@name \RequirePackage{ltxutil}% % @@ -863,6 +876,10 @@ % line with the author. % % The \classoption{runinaddress} option is the only one that sets \cmd\runinaddress@sw\ to true. +% +% FIXME: this option pertains to cases where \cmd\groupauthors@sw\ is true, but is independant of \cmd\@affils@sw. +% So, it should be possible to assert both \classoption{runinaddress} and \classoption{unsortedaddress} as well as +% each separately. % \begin{macrocode} \@booleanfalse\runinaddress@sw % \end{macrocode} @@ -871,7 +888,7 @@ % \begin{macro}{\@affils@sw} % If \cmd\@affils@sw\ is false, an address is never recognised as ``new'' % and is therefore always entered into the affiliation list, -% stopping groups of authors at the same address being amalgamated +% stopping groups of authors at the same address being consolidated % into the same list: % the address will be printed the same number of times it is entered. % @@ -882,9 +899,8 @@ % \end{macro} % % \begin{macro}{\groupauthors@sw} -% The flag \cmd\groupauthors@sw\ signifies that authors are to be grouped. -% This affects the meaning of \cmd\@author@present\ and \cmd\@tempaffil. -% FIXME: apparently \cmd\@tempaffil\ and its aliases are never used. +% The flag \cmd\groupauthors@sw\ signifies that authors are to be grouped, +% affecting the meaning of \cmd\@author@present. % % Clients will want to set \cmd\groupauthors@sw\ true if they want grouped addresses % or either of the following variants: @@ -897,9 +913,9 @@ % % \begin{macro}{groupedaddress} % If we take the \classoption{groupedaddress} option as the default, then we can look upon -% the \classoption{superscriptaddress} option as simply turning \cmd\groupauthors@sw\ to false. +% the \classoption{superscriptaddress} option as simply turning \cmd\groupauthors@sw\ to \cmd\false@sw. % -% \classoption{groupedaddress}, the default, groups authors above a common address. +% \classoption{groupedaddress}, the default in APS journals, groups authors above a common address. % \begin{macrocode} \DeclareOption{groupedaddress}{\clo@groupedaddress}% \def\clo@groupedaddress{% @@ -1162,7 +1178,11 @@ \appdef\frontmatter@init{% \@author@init }% +% \end{macrocode} +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} +% \begin{macrocode} \def\@author@def#1#2{% + \frontmatterverbose@sw{\typeout{\string\author\space\string\collaboration}}{}% \move@AU\move@AF\move@AUAF \let\@AF@join\@author@join #1% @@ -1232,26 +1252,40 @@ % \changes{4.1b}{2008/08/02}{Use \cs{@affil@def} for all access to \cs{@affil}} % \changes{4.1b}{2008/08/02}{Provide for diagnostics via \cs{frontmatterverbose@sw}} % \changes{4.1g}{2009/10/05}{(AO, 535) Robustify \cs{footnote} while \cs{class@warn} is expanding its argument} +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} +% \changes{4.1m}{2009/11/20}{(AO, 563) \cs{collaboration} to work with both \texttt{groupedaddress} and \texttt{superscriptaddress}} +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle \cs{noaffiliation} case} % % We first finish off any author- or affiliation groups in progress. -% Next, we detect the case where there is an author group in progress, but no affiliation group. +% Next, we detect the case where there is an author group or a collaboration group in progress, but no affiliation group. % If so, we emit a diagnositic message and act as if a \cmd\noaffiliation\ command had been given. % In any case, we finish off any author/affiliation pair that may remain. % Formatting of the title block may now proceed. % \begin{macrocode} \def\@author@finish{% + \frontmatterverbose@sw{\typeout{\string\@author@finish}}{}% \move@AU\move@AF - \@ifx{\AU@grp\@empty}{}{% + \@ifx{\AU@grp\@empty}{% + \@ifx{\CO@grp\@empty}% + }{% + \false@sw + }% + {}{% \@ifx{\AF@grp\@empty}{% \begingroup - \frontmatterverbose@sw{\say\AU@grp}{}% \let\href\@secondoftwo \let\AU@opr\@secondofthree \let\CO@opr\@secondofthree \let\footnote\@gobble - \class@warn{Assuming \string\noaffiliation\space for \AU@grp}% + \@ifx{\CO@grp\@empty}{% + \class@warn{Assuming \string\noaffiliation\space for authors}% + \frontmatterverbose@sw{\say\AU@grp}% + }{% + \class@warn{Assuming \string\noaffiliation\space for collaboration}% + \frontmatterverbose@sw{\say\CO@grp}{}% + }% \endgroup - \@affil@def{}\move@AF + \@affil@none\move@AF }{}% }% \move@AUAF @@ -1300,18 +1334,20 @@ % give that address in \cmd\affiliation. % If later in the list you have an author % with the address of an earlier author, repeat the \cmd\affiliation\ -% command: the system will detect the similarity and (if using the \classoption{superscriptaddress} option) only print the -% affiliation once, reusing the superscript marker. +% command: the system will detect the equivalence and (if using the \classoption{superscriptaddress} option) +% only print the affiliation once, reusing the superscript marker. % % When the \cmd\affiliation\ command is encountered, the current author and author group (if any) are at an end. % Also, the current affiliation is at an end. % +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} % FIXME: changes to catcode required elsewhere now? % \begin{macrocode} \def\cat@comma@active{\catcode`\,\active}% {\cat@comma@active\gdef,{\active@comma}}% \def\active@comma{,\penalty-300\relax}% \newcommand\affiliation{% + \frontmatterverbose@sw{\typeout{\string\affiliation}}{}% \move@AU\move@AF \begingroup \cat@comma@active @@ -1327,15 +1363,24 @@ % % \begin{macro}{\noaffiliation} % \changes{4.1b}{2008/08/02}{Use \cs{@affil@def} for all access to \cs{@affil}} -% User-level command \cmd\noaffiliation\ signifies that the current group of authors has \emph{no} affiliation. +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle \cs{noaffiliation} case} +% User-level command \cmd\noaffiliation\ signifies that the current group of authors, or the current collaboration, has \emph{no} affiliation. % % This is implemented by acting as if the \cmd\affiliation\ command has been given, and using a -% flag value of \{\}, which adds an element to the affiliation group of this author, -% albeit a nil one (\cmd\AFF@opr\ \{\cmd\z@\} \{\}). +% flag value of \{\cmd\relax\}, which adds an element to the affiliation group of this author, +% albeit a nil one (\cmd\AFF@opr\ \{\cmd\relax\} \{\}). +% +% Note that this procedure does substantially the same as \cmd\@author@finish. (the latter, If it does not bail out altogether, differs chiefly in providing diagnostics). % \begin{macrocode} \newcommand\frontmatter@noaffiliation{% + \frontmatterverbose@sw{\typeout{\string\noaffiliation}}{}% \move@AU\move@AF - \@affil@def{}\move@AF +% \end{macrocode} +% In \cmd\@author@finish, there is code testing if an effective +% \cmd\noaffiliation\ should be executed now. Here, we do so in any case. +% \begin{macrocode} + \@affil@none\move@AF \move@AUAF }% \def\blankaffiliation{{}}% @@ -1343,12 +1388,15 @@ % \end{macro} % % \begin{macro}{\@affil@cleared} +% \begin{macro}{\@affil@nil} % \begin{macro}{\@affil@init} +% \begin{macro}{\@affil@none} % \begin{macro}{\@affilclear@sw} % \begin{macro}{\@affil@def} % \begin{macro}{\@affil@join@} % \begin{macro}{\@affil@join} % \changes{4.1b}{2008/08/02}{Use \cs{@affil@def} for all access to \cs{@affil}} +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle \cs{noaffiliation} case} % % Here are all the access procedures for the affiliation data structure. % Note the similarity to those of the \cmd\@author\ data structure. @@ -1360,9 +1408,13 @@ % and a procedure to add new ancillary data to the affiliation. % \begin{macrocode} \def\@affil@cleared{{{}}{}}% +\def\@affil@nil{{\relax}{}}% \appdef\frontmatter@init{% \@affil@init }% +\def\@affil@none{% + \let\@affil\@affil@nil +}% \def\@affil@init{% \let\@affil\@affil@cleared }% @@ -1381,9 +1433,13 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\move@AF} % \changes{4.1b}{2008/08/02}{(AO, 486) \cs{collaboration} to work with \texttt{groupedaddress}} +% \changes{4.1i}{2009/10/23}{(AO, 540) Rationalize code that appends to \cs{AF@grp}} +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle \cs{noaffiliation} case} % Move the most recent affiliation to the affiliation group. % If we recently did a \cmd\@affil@init, this is a no-op. % @@ -1391,11 +1447,11 @@ % with the intercollated operator set to \cmd\@affil@match\ % and with \cmd\@tempa\ holding the first component of \cmd\@affil, the current affiliation, which is to be matched. % -% If the current affiliation has been seen before, +% If the current affiliation has been seen before, then by side effect % \cmd\temp@sw\ will be set to true, % \cmd\@tempc\ will be set to the matching affiliation number, % and \cmd\@tempd\ will be set to the affiliation's ancillary data. -% The Boolean \cmd\@affils@sw\ being false prevents this test from ever returning a positive result. +% The Boolean \cmd\@affils@sw\ being false prevents this test from ever returning a ``true'' result. % % This procedure uses \cmd\@tempa\ and sets \cmd\@tempc, \cmd\@tempd, and \cmd\temp@sw. % \begin{macrocode} @@ -1410,7 +1466,7 @@ }{}\temp@sw % \end{macrocode} % True clause: This affiliation has been seen before. -% If ancillary data for the affiliation have been given but are not identical to those seen before, give a warning. +% If ancillary data for the affiliation have been given, but are not identical to those seen before, give a warning. % \begin{macrocode} {% \expandafter\@affil@aux@def\expandafter\@tempb\@affil @@ -1418,15 +1474,10 @@ \@ifx{\@tempb\@tempd}{}{% \class@warn{% Ancillary information for \@tempa\space must not be different! - Please put it on the first instance% + Please put all of it on the first instance% }% }% }% -% \end{macrocode} -% Removed code -% \cmd\appdef@eval\ \cmd\AF@grp\ \cmd\@tempc, -% which appears to have added the affiliation number even in this case. -% \begin{macrocode} }% % \end{macrocode} % False clause: This affiliation is a new one: @@ -1434,15 +1485,18 @@ % and append the new ID, collaboration number, address, and auxiliary information % to the list \cmd\@AFF@list. % -% With the expanded syntax of \cmd\collaboration, we need to label each address with +% Note that, with the expanded syntax of \cmd\collaboration, we need to label each address with % its associated collaboration. +% +% Note also that the \cmd\noaffiliation\ case is handled by recognizing the flag value \cmd\@affil@nil. % \begin{macrocode} {% - \@if@empty{\expandafter\@firstoftwo\@affil}{% - \def\@tempc{\z@}% - \@argswap@val{\z@}% + \@ifx{\@affil\@affil@nil}{% + \def\@tempc{0}% + \@argswap@val{0}% }{% \advance\c@affil\@ne + \expandafter\def\expandafter\@tempc\expandafter{\the\c@affil}% \expandafter\@argswap@val\expandafter{\the\c@affil}% }% {% @@ -1452,11 +1506,15 @@ }% }% }% - \appdef@eval\AF@grp{\the\c@affil}% }% % \end{macrocode} -% Append the footnote number of the affiliation to the affiliation group of the current author group. +% In either case, append this affiliation number to the \cmd\AF@grp, the affiliation group of the current author group. +% (It will later be considered for the \cmd\@AFG@list.) +% Then assign the flag value to \cmd\@affil\ that signifies it has been cleared. +% \changes{4.1i}{2009/10/18}{(AO, 540) Rationalize code that appends to \cs{AF@grp}} % \begin{macrocode} + \appdef@eval\AF@grp\@tempc + \frontmatterverbose@sw{\say\AF@grp}{}% \@affil@init }% }% @@ -1482,15 +1540,16 @@ % % \begin{macro}{\@affil@match} % \changes{4.1b}{2008/08/02}{(AO, 486) \cs{collaboration} to work with \texttt{groupedaddress}} -% The definition for the \cmd\AFF@opr, the intercollated operator for \cmd\@AFF@list, -% when adding a new affiliation: seeks a match with any earlier affiliation. +% The procedure \cmd\@affil@match\ is the definition for \cmd\AFF@opr, +% the intercollated operator for \cmd\@AFF@list, +% when adding a new affiliation: it seeks a match with any earlier affiliation. % When the affiliation list is executed, this procedure tests each entry against % the `new' affiliation (which has been stored in \cmd\@tempa) and its associated % collaboration number (in \cmd\@tempb). % % If \cmd\groupauthors@sw\ is true, then we require the collaboration ID to match, -% otherwise there is not such a requirement -% (as is appropriate for the \classoption{superscriptaddress} class option). +% otherwise there is no such requirement, +% as is appropriate for the \classoption{superscriptaddress} class option. % % Uses \cmd\temp@sw, \cmd\@tempc, and \cmd\@tempd\ to communicate back: % if it returns \cmd\temp@sw\ true, a match was found. @@ -1544,46 +1603,70 @@ % then it is time to move the current affiliation group and author group to \cmd\@AAC@list. % If not, we are picking up authors into an author group, and we should bail out. % -% To extend this scheme to the new \cmd\collaboration\ abilities, +% To extend this scheme to the new \cmd\collaboration\ abilities, we must append an affiliation \cmd\AF@opr\ to \cmd\@AAC@list\ +% also in the case where there was no affiliation specified (e.g., \cmd\noaffiliation). This affiliation will be a nil affiliation: +% \cmd\AF@opr\verb+{{0}}+. +% +%FIXME: only one of \cmd\CO@grp\ or \cmd\AU@grp\ is non-empty at this point, +% but this code does not appear to recognize this fact! +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} % \begin{macrocode} \def\move@AUAF{% - \@ifx{\AF@grp\@empty}% - {% - \@ifx{\@empty\CO@grp}{}{% + \frontmatterverbose@sw{\say\AU@grp\say\AF@grp\say\CO@grp}{}% + \@ifx{\AF@grp\@empty}{% + \@ifx{\@empty\CO@grp}{% +% \end{macrocode} +% Both \cmd\AF@grp\ and \cmd\CO@grp\ are empty: nothing to do. But what if \cmd\AU@grp\ is not empty? +% \begin{macrocode} + }{% +% \end{macrocode} +% Append the nil \cmd\AF@opr\ to \cmd\@AAC@list. +% \begin{macrocode} + \appdef \@AAC@list{\AF@opr{{0}}}% +% \end{macrocode} +% Append the collaboration group to the \cmd\@AAC@list; no intercollated operator need be added, +% because we already have \cmd\CO@opr. +% \begin{macrocode} \appdef@e \@AAC@list{\CO@grp}% \appdef@e \@AFG@list{\CO@grp}% \let\CO@grp\@empty }% }{% % \end{macrocode} -% First, append current affiliation group (expansion of \cmd\AF@grp) +% Append current affiliation group (expansion of \cmd\AF@grp) % to the author/affiliation list (\cmd\@AAC@list), % using \cmd\AF@opr\ as the intercollated operator; % also append the current authors (\cmd\AU@grp). % \begin{macrocode} - \appdef \@AAC@list{\AF@opr}% - \appdef@eval\@AAC@list{\AF@grp}% - \appdef@e \@AAC@list{\AU@grp}% - \frontmatterverbose@sw{\say\@AAC@list}{}% + \appdef \@AAC@list{\AF@opr}% + \appdef@eval\@AAC@list{\AF@grp}% + \appdef@e \@AAC@list{\AU@grp}% +% \end{macrocode} +% Determine if either \cmd\AU@grp\ or \cmd\CO@grp\ is non-empty. +% \begin{macrocode} + \@ifx{\@empty\AU@grp}{% + \@ifx{\@empty\CO@grp}% + }{% + \false@sw + }% % \end{macrocode} -% Next, append the current affiliation group to \cmd\@AFG@list, +% At this point, there is a Boolean in \TeX's scanner; +% it will parse the following two brace-delimited sequences and select one of them. +% \begin{macrocode} + {% +% \end{macrocode} +% This branch is executed if and only if both \cmd\AU@grp\ and \cmd\CO@grp\ are empty. +% \begin{macrocode} + }{% +% \end{macrocode} +% There was either a \cmd\author\ or a \cmd\collaboration\ command. +% Append the current affiliation group to \cmd\@AFG@list, % (only if it is not already there) % using \cmd\AFG@opr\ as the intercollated operator. % % Note that \cmd\@AFG@list\ is a list of \emph{unique} affiliation \emph{groups}, % and building it entails an \(N^2\) computation. % \begin{macrocode} - \@ifx{\@empty\AU@grp}{% - \@ifx{\@empty\CO@grp}{% - \false@sw - }{% - \true@sw - }% - }{% - \true@sw - }% - {% - \@ifx{\@empty\AF@grp}{}{% \@booleanfalse\temp@sw \def\AFG@opr{\x@match\AF@grp}% \let\CO@opr\@author@gobble @@ -1592,15 +1675,18 @@ \appdef \@AFG@list{\AFG@opr}% \appdef@eval\@AFG@list{\AF@grp}% }% - }% +% \end{macrocode} +% If the collaboration \cmd\CO@grp\ is not empty, we append it to the \cmd\@AFG@list\ and to the \cmd\@AAC@list. +% \changes{4.1m}{2009/11/20}{(AO, 563) \cs{collaboration} to work with both \texttt{groupedaddress} and \texttt{superscriptaddress}} +% \begin{macrocode} \@ifx{\@empty\CO@grp}{}{% + \appdef@e \@AAC@list{\CO@grp}% \appdef@e \@AFG@list{\CO@grp}% \let\CO@grp\@empty }% - }{% }% % \end{macrocode} -% Finally, null out the macros holding the author group and affiliation group, respectively. +% Finally, null out the macros holding the author group \cmd\AU@grp, affiliation group \cmd\AF@grp, and collaboration group \cmd\CO@grp. % \begin{macrocode} \let\CO@grp\@empty \let\AU@grp\@empty @@ -1620,7 +1706,8 @@ % The control sequence name \cmd\AU@grp\ accumulates % consecutive \cmd\author\ entries (with \cmd\AU@opr\ as the intercollated operator) % and \cmd\collaboration\ entries (with \cmd\CO@opr\ as the intercollated operator). -% Ultimately, its contents are appended to the author/affiliation list \cmd\@AAC@list. +% Ultimately, its contents are appended to the author/affiliation list \cmd\@AAC@list\ +% and to the list of affiliation groups, \cmd\@AFG@list. % It must be initialized to \cmd\@empty. % % Note on \cmd\AU@opr\ and \cmd\CO@opr: it is essential to treat these two operators to the greatest extent possible on an equal footing. @@ -1637,9 +1724,9 @@ % % It must be empty at the beginning of the frontmatter. % -% The macro \cmd\@AFG@list\ accumulates affiliation groups, -% with \cmd\AFG@opr\ as the intercollated operator. -% +% The macro \cmd\@AFG@list\ accumulates +% affiliation groups, with \cmd\AFG@opr\ as the intercollated operator, +% and collaborations, with no intercollated operator. % This token list is employed when and only when \classoption{groupedaddress} is in effect. % % The macro \cmd\@AFF@list\ accumulates the list of affiliations @@ -1669,7 +1756,7 @@ % or is defined to expand to \cmd\@affil@match\cmd\@tempa, % and the list \cmd\@AFF@list\ is expanded. % -% Here is a precis of these lists, their syntax, and the usage of their associated operators: +% For each of these lists, here is the syntax of an element and the usage of the associated operator: % \begin{verbatim} %\@AFF@list \AFF@opr{}{}{
}{} \frontmatter@author@produce@script \affils@present@group %\@AFG@list \AFG@opr{{}..{}} \frontmatter@author@produce@group @@ -1679,7 +1766,7 @@ %\AFG@opr \affils@present@group \x@match\AF@grp %\AF@opr \@gobble \@affilID@def \@affilID@count\AF@temp\@tempcnta \@affilID@match\AF@temp %\AU@opr \@secondofthree \@author@count\@tempcnta \@author@present \@author@gobble \@author@count#2 \@author@present -%\CO@opr \@secondofthree \@collaboration@count\AU@temp\@tempcnta \@collaboration@present\AU@temp \@collaboration@present\AU@temp \@collaboration@err +%\CO@opr \@secondofthree \@collaboration@count\AU@temp\@tempcnta \@collaboration@present\AU@temp \@collaboration@present\AU@temp \@collaboration@gobble % %\CO@opr\@author@cleared % \end{verbatim} @@ -1744,27 +1831,25 @@ % Just tacks the URL on to the current author or affiliation. % Note: group opened in \cmd\homepage\ is closed in \cmd\@homepage. % \changes{4.1a}{2008-07-01}{(AO, 496) remove default prependation to \cs{homepage}.} +% \changes{4.1n}{2009/12/03}{(AO) remove http:// from \cs{href} call} % \begin{macrocode} \newcommand*\homepage[1][]{\begingroup\sanitize@url\@homepage{#1}}% \def\@homepage#1#2{% \endgroup - \@AF@join{#1\url{#2}}% + \@AF@join{#1\href{#2}{#2}}% }% % \end{macrocode} % \end{macro} % -% \begin{macro}{\url} % \begin{macro}{\href} % The document may load a package that defines either of these commands; % if not, we give a default meaning. % \begin{macrocode} \appdef\class@documenthook{% - \providecommand\url{}% \providecommand\href[1]{}% }% % \end{macrocode} % \end{macro} -% \end{macro} % % \begin{macro}{\thanks} % \changes{4.1b}{2008/08/02}{Make the syntax of this package switch optional}% @@ -1859,21 +1944,19 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@collaboration@err} -% This command will be executed if are in a \classoption{groupedaddress} situation and -% the document contained a \cmd\collaboration\ command. -% -% There already has been issued a warning message explaining that \cmd\collaboration\ is wrong in this case, -% so here we simply gobble. +% \begin{macro}{\@collaboration@gobble} +% This command will be the synonym of \cmd\CO@grp\ during the expansion of \cmd\@AAC@list, +% within \cmd\affils@present@group execution (in a \classoption{groupedaddress} situation). +% +% \changes{4.1m}{2009/11/20}{(AO, 563) Let \cs{@collaboration@gobble} parse all three arguments of \cs{CO@opr}} % \begin{macrocode} -\def\@collaboration@err#1#2{% -%\class@warn{An illegal \string\collaboration\ command has been entered!}% -}% +\def\@collaboration@gobble#1#2#3{}% % \end{macrocode} % \end{macro} % % \begin{macro}{\doauthor} % \changes{4.1b}{2008/08/04}{Provide facility \cs{affil@cutoff}: if there is only one affiliation on the title page, no superscript}% +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle punctuation for \classoption{superscriptaddress} style authors' extra information, such as \cs{email}} % Main control over how authors are typeset. % % |#1| is loaded by \cmd\author @@ -1889,28 +1972,24 @@ % % Here, as in \cmd\@affil@script, the parameter \cmd\affil@cutoff\ % controls whether the argument \#3 is produced as a superscript label -% connecting this author with its affiliation. If there is only one -% affiliation on the title page, it makes sense to remove the superscript. +% connecting this author with its affiliation. (If there is only one +% affiliation on the title page, it makes sense to remove the superscript.) % +% Note that argument \#3 must effectively execute either +% \cmd\aftergroup\cmd\true@sw\ or \cmd\aftergroup\cmd\false@sw\ (exactly once!). +% In the case of \classoption{superscriptaddress}, this is done when +% \cmd\@author@present@script\ invokes \cmd\doauthor\ with its third argument containing +% \cmd\@affil@present@script. +% Otherwise (e.g., \classoption{groupedaddress}), \cmd\doauthor\ is invoked by +% \cmd\@author@present@group\ with its third argument containing \cmd\@affil@present@group. % \begin{macrocode} \def\doauthor#1#2#3{% \ignorespaces#1\unskip\@listcomma \begingroup - \def\@tempifx{#3}% - \@ifx{\@tempifx\@empty}{% - \false@sw - }{% - \@ifnum{\c@affil<\affil@cutoff}{% - \false@sw - }{% - \true@sw - }% - }% - {% - #3\aftergroup\true@sw - }{% - \aftergroup\false@sw - }% + #3% +% \end{macrocode} +% At this point, we must have queued up a Boolean (either \cmd\true@sw\ or \cmd\false@sw). +% \begin{macrocode} \@if@empty{#2}{\endgroup{}{}}{\endgroup{\comma@space}{}\frontmatter@footnote{#2}}% \space \@listand }% @@ -1972,33 +2051,49 @@ \let\@tempb\@empty \def\@TBN@opr{\y@match\@tempa}% \@FMN@list +% \end{macrocode} +% By side effect, \cmd\@tempb\ holds the value of the footnote counter if +% This note has been seen before. Otherwise \cmd\temp@sw\ is false. +% \begin{macrocode} \temp@sw{% \expandafter\frontmatter@footnotemark \expandafter{\@tempb}% }{% +% \end{macrocode} +% Execute \cmd\frontmatter@foot@mark, feeding it the value of the current footnote counter. +% This call requires two levels of pre-expansion to accomplish, the first to expand \cmd\csname, the second to evaluate \cmd\the. +% \begin{macrocode} \stepcounter\@mpfn - \protected@xdef\@tempb{\the\csname c@\@mpfn\endcsname}% - \expandafter\frontmatter@footnotemark - \expandafter{\@tempb}% - \expandafter\g@addto@macro - \expandafter\@FMN@list + \expandafter\expandafter + \expandafter\frontmatter@foot@mark + \expandafter\expandafter \expandafter{% - \expandafter \@TBN@opr - \expandafter {\@tempb}{#1}% - }% + \expandafter \the\csname c@\@mpfn\endcsname + }{#1}% }% \endgroup }% +% \end{macrocode} +% Procedure \cmd\frontmatter@foot@mark\ lays down the footnote device (mark) and takes care of the footnote text. +% The latter merely involves queueing that text (along with its associated device) into \cmd\@FMN@list. +% \begin{macrocode} +\def\frontmatter@foot@mark#1#2{% + \frontmatter@footnotemark{#1}% + \g@addto@macro\@FMN@list{\@TBN@opr{#1}{#2}}% +}% \appdef\frontmatter@init{% \global\let\@FMN@list\@empty }% +% \end{macrocode} +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \begin{macrocode} \def\frontmatter@footnotemark#1{% \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi \begingroup \hyper@linkstart {link}{frontmatter.#1}% \csname c@\@mpfn\endcsname#1\relax - \def\@thefnmark{\thempfn}% + \def\@thefnmark{\frontmatter@thefootnote}% \@makefnmark \hyper@linkend \endgroup @@ -2153,9 +2248,6 @@ % To accomodate this state of affairs, % we have a new mechanism that offers an even more complete rewrite of \env{minipage}. % -% The user can elect to use this new mechanism via the \classoption{newabstract}; -% likewise the old mechanism via the \classoption{oldabstract}. -% % Note that an entry is made in the toc for the abstract; this has the side effect % of creating a PDF bookmark for this element if the \classname{hyperref} package is in effect. % \changes{4.1a}{2008-06-30}{(AO, 443) create an entry in the PDF bookmarks for the abstract via the toc} @@ -2173,6 +2265,11 @@ \columnwidth\textwidth \hsize\columnwidth \@parboxrestore +% \end{macrocode} +% The following line switches footnotes to the \texttt{mpfoootnote} series. +% This action should rather be taken by \cmd\frontmatter@abstractfont, which can be customized. +% There is also an interaction with \cmd\mini@note. +% \begin{macrocode} \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ \let\@footnotetext\frontmatter@footnotetext \minipagefootnote@init @@ -2201,20 +2298,21 @@ % and extend it to accomodate hyperrefs. % % Note that this procedure is very like \classname{ltxutil}'s \cmd\mp@footnotetext, except that it -% uses \texttt{p@mpfootnote} instead of \texttt{p@mpfootnote}, and -% \cmd\frontmatter@makefntext\ instead of \cmd\@makefntext. +% uses \cmd\frontmatter@makefntext\ instead of \cmd\@makefntext. % % \changes{4.1f}{2009/07/07}{(AO, 515) Use \cs{set@footnotefont}, which is defined in ltxutil} +% \changes{4.1n}{2010/01/02}{(AO, 571) allow split after last line of footnote}% +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% % \begin{macrocode} \long\def\frontmatter@footnotetext#1{% \minipagefootnote@pick \set@footnotefont \set@footnotewidth \@parboxrestore - \protected@edef\@currentlabel{\csname p@mpfootnote\endcsname\@thefnmark}% + \protected@edef\@currentlabel{\csname p@\@mpfn\endcsname\@thefnmark}% \color@begingroup \frontmatter@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -2453,11 +2551,17 @@ % \changes{4.0b}{1999/06/20}{Set \cs{footnote} to \LaTeX\ standard version for this scope.} % First, we restore the footnote mechanism to its default state, % then we customize the way the footnote mark is produced and how it is formatted. +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% % \begin{macrocode} \ltx@footnote@pop - \let\thefootnote\frontmatter@thefootnote +% \end{macrocode} +% The following three lines establish an independent footnote counter for use in the title block. +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \begin{macrocode} + \def\@mpfn{mpfootnote}% + \def\thempfn{\thempfootnote}% + \c@mpfootnote\z@ \let\@makefnmark\frontmatter@makefnmark - \global\c@footnote\z@ \frontmatter@setup \thispagestyle{titlepage}\label{FirstPage}% % \end{macrocode} @@ -2558,11 +2662,13 @@ % (class option \classoption{superscriptaddress}). % % This procedure must ensure that any paragraph that it starts gets ended finally. +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} +% \changes{4.1m}{2009/11/20}{(AO, 563) More complete runtime diagnostics via \cs{frontmatterverbose@sw}} % \begin{macrocode} \def\frontmatter@author@produce@script{% \begingroup \let\@author@present\@author@present@script - \frontmatterverbose@sw{\say\@AAC@list}{}% + \frontmatterverbose@sw{\typeout{\string\frontmatter@author@produce@script:}\say\@AAC@list\say\@AFF@list\say\@AFG@list}{}% % \end{macrocode} % \changes{4.0l}{1998/09/01}{Changes to add collaboration processing, which now means doing comma/and processing on each sublist} % When the author/affiliation list \cmd\@AAC@list\ is executed, @@ -2594,7 +2700,7 @@ \@AAC@list \expandafter\CO@opr\@author@cleared % \end{macrocode} -% Next, present the authors and their affiliations. +% Next, present the authors and their affiliations, with the collaborations interleaved. % % We assign values for the intercollated operators appearing within \cmd\@AAC@list. % Next, assign \cmd\@listcomma\ based on the number of authors in the first collaboration. @@ -2622,7 +2728,6 @@ \begingroup \frontmatter@above@affiliation@script \let\AFF@opr \@affil@script - \frontmatterverbose@sw{\say\@AFF@list}{}% \@AFF@list \frontmatter@footnote@produce \par @@ -2660,6 +2765,7 @@ \begingroup \frontmatter@collaboration@above \@affilID@def{}% + \@tempcnta\z@ \@author@present{}{(\ignorespaces#3\unskip)}{#4}% \par \endgroup @@ -2699,8 +2805,8 @@ % \end{macro} % % \begin{macro}{\affils@present@script} -% An alias of \cmd\AFG@opr, this procedure is applied to \cmd\@AFG@list\ and builds -% \cmd\@AFU@list, a list of unique affiliations found within affiliation groups. +% An alias of \cmd\AFG@opr, this procedure is applied to elements in \cmd\@AFG@list. +% It builds \cmd\@AFU@list, a list of unique affiliations found within affiliation groups. % % \changes{4.1a}{2008/06/16}{removed code that had been commented out} % \begin{verbatim} @@ -2777,12 +2883,18 @@ % if a single affiliation appears on the title page, % then no affiliation superscript at all is produced. % -% |#1|---Affiliation ID +% |#1|---Affiliation ID: a number; zero signifies a \cmd\noaffiliation. +% % |#2|---Collaboration ID +% % |#3|---Affiliation address +% % |#4|---Auxiliary info % \begin{macrocode} \def\@affil@script#1#2#3#4{% +% \end{macrocode} +% If the affiliation is the \cmd\noaffiliation, then we do nothing. +% \begin{macrocode} \@ifnum{#1=\z@}{}{% \par \begingroup @@ -2802,6 +2914,7 @@ % % \begin{macro}{\@author@present@script} % \changes{4.0h}{1998/06/25}{Changes to support groups of affiliations} +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle \cs{noaffiliation} case} % This version of \cmd\AU@opr\ applies to the \classoption{superscriptaddress} class option. % Need to add commas between groups % of address numbers, which are passed in the macro \cmd\@affilID@temp\ in the form @@ -2810,10 +2923,7 @@ \def\@author@present@script#1#2#3{% \begingroup \gdef\comma@space{\textsuperscript{,\,}}% - \doauthor{#2}{#3}{% - \let\@tempa\@empty - \expandafter\@affil@present@script\@affilID@temp\relax - }% + \doauthor{#2}{#3}{\@affil@present@script}% \endgroup \advance\@tempcnta\m@ne }% @@ -2833,19 +2943,47 @@ }% }% }% -\def\@affil@present@script#1{% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@affil@present@script} +% \begin{macro}{\@affil@present@script@} +% \changes{4.1n}{2009/11/30}{(AO, 567) Handle punctuation for \classoption{superscriptaddress} style authors' extra information, such as \cs{email}} +% The \cmd\@affil@present@script\ procedure presents the reference to the affiliations in the case of superscript addresses. +% +% The affiliations are presented to \cmd\@affil@present@script@ as a list of brace-delimited tokens, each containing the affiliation ID (a number). +% The list is terminated by the token \cmd\relax. +% The macro recurses (via tail recursion) until the terminating token is encountered. +% Note that an affiliation ID of zero signifies a \cmd\noaffiliation: +% references to the \cmd\noaffiliation\ are passed over. +% +% Upon termination, the affiliations, if any, are produced via \cmd\textsuperscript\ and the appropriate boolean is queued via \cmd\aftergroup. +% The boolean signifies that a non-trivial affiliation was produced, so that the proper punctuation can be produced. +% The group in question is that opened and closed by the \cmd\doauthor\ procedure. +% +% This procedure uses \cmd\@tempa\ as a scratch register. +% \begin{macrocode} +\def\@affil@present@script{% + \let\@tempa\@empty + \expandafter\@affil@present@script@\@affilID@temp\relax +}% +\def\@affil@present@script@#1{% \@ifx{\relax#1}{% - \@ifx{\@tempa\@empty}{}{% + \@ifx{\@tempa\@empty}{% + \aftergroup\false@sw + }{% \textsuperscript{\expandafter\@affilcomma\@tempa\relax\relax}% + \aftergroup\true@sw }% }{% - \@ifx{\z@#1}{}{\appdef\@tempa{{#1}}}% - \@affil@present@script + \@ifnum{#1=\z@}{}{\appdef\@tempa{{#1}}}% + \@affil@present@script@ }% }% \@provide\@author@parskip{\z@skip}% % \end{macrocode} % \end{macro} +% \end{macro} % % % \subsubsection{Authors and affiliations in groupedaddress style} @@ -2853,7 +2991,7 @@ % \begin{macro}{\frontmatter@author@produce@group} % \changes{4.1b}{2008/08/02}{Provide for diagnostics via \cs{frontmatterverbose@sw}} % Alias for \cmd\frontmatter@author@produce when \classoption{groupedaddress} is in effect, -% the procedure that formats the author/affiliation list . +% the procedure that formats the author/affiliation list. % % In this case, the authors are being grouped above their shared addresses. % How it works: the \cmd\@AFG@list, a list of all unique affiliation groups, is expanded. @@ -2861,12 +2999,14 @@ % Collaborations are silently passed over. % % This procedure must ensure that any paragraph that it starts gets ended finally. +% \changes{4.1i}{2009/10/18}{(AO, 540) More runtime diagnostics via \cs{frontmatterverbose@sw}} +% \changes{4.1m}{2009/11/20}{(AO, 563) More complete runtime diagnostics via \cs{frontmatterverbose@sw}} % \begin{macrocode} \def\frontmatter@author@produce@group{% \begingroup \let\@author@present\@author@present@group \frontmatter@authorformat - \frontmatterverbose@sw{\say\@AFG@list}{}% + \frontmatterverbose@sw{\typeout{\string\frontmatter@author@produce@group:}\say\@AAC@list\say\@AFF@list\say\@AFG@list}{}% \let\AU@temp\@empty \set@listcomma@list\AU@temp \def\CO@opr{\@collaboration@present\AU@temp}% @@ -2918,7 +3058,6 @@ % pathological cases. % \begin{macrocode} \begingroup - \frontmatterverbose@sw{\say\@AAC@list}{}% \def\AF@temp{#1}% \@tempcnta\z@ \let\AU@opr \@undefined @@ -2968,9 +3107,11 @@ \def@after@address \runinaddress@sw{% }{% - \tightenlines@sw{% - }{% - \parskip\z@ %space between affilations in grouped mode + \tightenlines@sw{}{% +% \end{macrocode} +% The following line determines the space between affilations in grouped mode +% \begin{macrocode} + \parskip\z@ }% \appdef\after@address\par }% @@ -3022,7 +3163,7 @@ }{% \let\AU@opr \@author@gobble }% - \let\CO@opr \@collaboration@err + \let\CO@opr \@collaboration@gobble }% \def\@affilID@match#1#2{% \def\@tempifx{#2}% @@ -3031,7 +3172,7 @@ }{% \let\AU@opr \@author@gobble }% - \let\CO@opr \@collaboration@err + \let\CO@opr \@collaboration@gobble }% % \end{macrocode} % \end{macro} @@ -3089,17 +3230,25 @@ % \end{macro} % % \begin{macro}{\@author@present@group} +% \begin{macro}{\@affil@present@group} % \changes{4.0d}{1998/01/31}{\cs{comma@space}} -% This version of \cmd\AU@opr\ applies to the \classoption{groupedaddress} class option. +% This version of \cmd\AU@opr\ applies to the \classoption{groupedaddress} class option and its ilk. % Traverse the list calling the \cmd\doauthor\ hook on each author. +% +% The third argument of \cmd\doauthor\ fulfills the requirement that it +% queue up a boolean via \cmd\aftergroup. % \begin{macrocode} \def\@author@present@group#1#2#3{% \gdef\comma@space{\gdef\comma@space{\textsuperscript{,\,}}}% - \doauthor{#2}{#3}{}% + \doauthor{#2}{#3}{\@affil@present@group}% \advance\@tempcnta\m@ne }% +\def\@affil@present@group{% + \aftergroup\false@sw +}% % \end{macrocode} % \end{macro} +% \end{macro} % % % \begin{macro}{\@pacs@produce} @@ -3154,10 +3303,13 @@ \@FMN@list \global\let\@FMN@list\@empty }% +% \end{macrocode} +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \begin{macrocode} \def\present@FM@footnote#1#2{% \begingroup \csname c@\@mpfn\endcsname#1\relax - \def\@thefnmark{\thempfn}% + \def\@thefnmark{\frontmatter@thefootnote}% \frontmatter@footnotetext{#2}% \endgroup }% @@ -3194,12 +3346,13 @@ % \end{macro} % % \begin{macro}{\frontmatter@thefootnote} +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% % In the title block, the footnote symbol (used for alternate affiliation and sundry) % is a \cmd\@fnsymbol\ or a lowercase letter, as selected by a boolean. % The society or journal may override this definition. % \begin{macrocode} \def\frontmatter@thefootnote{% - \altaffilletter@sw{\@alph}{\@fnsymbol}\c@footnote + \altaffilletter@sw{\@alph}{\@fnsymbol}{\csname c@\@mpfn\endcsname}% }% \@ifx{\altaffilletter@sw\@undefined}{\@booleantrue\altaffilletter@sw}{}% % \end{macrocode} @@ -3223,11 +3376,13 @@ % Note that we are \classname{hyperref} friendly: we invoke \cmd\Hy@raisedlink\ % so that this footnote becomes a hypertext anchor. If \classname{hyperref} is % not loaded, then \classname{ltxutil} has our act covered via some stubs. +% +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% % \begin{macrocode} \long\def\frontmatter@makefntext#1{% \parindent 1em \noindent - \Hy@raisedlink{\hyper@anchorstart{frontmatter.\the\c@footnote}\hyper@anchorend}% + \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}% \@makefnmark #1% }% @@ -3392,7 +3547,7 @@ % \end{macro} % %FIXME: there is a limitation to the default meaning of -% \cmd\@startpage, the label ``FirstPage'' is only +% \cmd\@startpage: the label ``FirstPage'' is only % defined if the document has a \cmd\maketitle\ command. % % \begin{macrocode} @@ -3543,25 +3698,27 @@ % % An explicit \cmd\footnote should be treated as if it were \cmd\thanks. % -% FIXME: \cmd\noaffiliation\ should not be necessary! -% -% FIXME: footnotes not working! -% % \begin{verbatim} % \@maketitle: \frontmatter@footnote@produce % \end{verbatim} +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% % \begin{macrocode} \def\thanks@latex#1{% \footnotemark + \expandafter\expandafter \expandafter\gappdef + \expandafter\expandafter \expandafter\@thanks + \expandafter\expandafter \expandafter{% + \expandafter\expandafter \expandafter\footnotetext - \expandafter[\the\c@footnote]{#1}}% + \expandafter\expandafter + \expandafter[% + \expandafter\the\csname c@\@mpfn\endcsname]{#1}}% }% \@booleanfalse\altaffilletter@sw -% \end{macrocode} -% \begin{macrocode} \@if@sw\if@titlepage\fi{\@booleantrue}{\@booleanfalse}\titlepage@sw \def\frontmatter@title@above{\newpage\null\vskip2em\relax}% \def\frontmatter@title@format{\centering\LARGE\let\thanks\thanks@latex}% @@ -3573,7 +3730,16 @@ \def\frontmatter@affiliationfont{\centering\itshape}% \def\frontmatter@RRAP@format{\centering\large}% \def\frontmatter@preabstractspace{1.5em}% -\def\frontmatter@footnotetext{\footnotetext[\csname c@\@mpfn\endcsname]}% +% \end{macrocode} +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \begin{macrocode} +\long\def\frontmatter@footnotetext{% + \expandafter\expandafter + \expandafter\footnotetext + \expandafter\expandafter + \expandafter[% + \expandafter\the\csname c@\@mpfn\endcsname]% +}% \def\and@space{\\}% \def\andname{and}% % \end{macrocode} only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/source/latex/revtex/ltxutil.dtx +++ texlive-extra-2009/texmf-dist/source/latex/revtex/ltxutil.dtx @@ -79,9 +79,11 @@ \keepsilent \generate{% %{ignore} -% \usedir{tex/latex/revtex}% \file{ltxutil.sty}{% - \from{ltxutil.dtx}{package,kernel}%{ltxutil,ltxutil-krn}% + \from{ltxutil.dtx}{package,kernel}% + }% + \file{ltxutil.krn}{% + \from{ltxutil.dtx}{kernel}% }% }% \ifToplevel{ @@ -106,15 +108,15 @@ % % \fi % -% \GetFileInfo{ltxutil.dtx}\CheckSum{4094} +% \GetFileInfo{ltxutil.dtx}\CheckSum{4291} % % \iffalse ltxdoc klootch %<*package> %%% @LaTeX-file{ %%% filename = "ltxutil.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "4094", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -197,10 +199,20 @@ % As desired, the following modules all % take common version information: % \begin{macrocode} -%\ProvidesFile{ltxutil.sty}% +%\typeout{% +%<*package|doc> +\ProvidesFile{% +% +%<*kernel|package|doc> +ltxutil% +% %<*doc> -\expandafter\ProvidesFile\expandafter{\jobname.dtx}% +.dtx% % +%.sty% +%<*package|doc> +}% +% % \end{macrocode} % % The following line contains, for once and for all, @@ -208,10 +220,13 @@ % By various means, this information is reproduced % consistently in all generated files and in the % typeset documentation. +% Give credit where due. % \begin{macrocode} -%<*doc|package> - [2009/10/09 4.1h utilities package]% \fileversion -% +%<*doc|package|kernel> +% + [2010/07/25/20:33:00 4.1r utilities package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion +% +%}% % \end{macrocode} % % @@ -426,6 +441,14 @@ \changes{4.1g}{2009/10/06}{(AO, 532) Both arguments of \cs{href} get sanitized}% \changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}% \changes{4.1g}{2009/10/07}{(AO, 539) Use of double-backslash in argument of \cs{section} gives error. The \classname{textcase} package is involved.}% +\changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}% +\changes{4.1n}{2009/12/06}{(AO) Incorporate change to ltmiscen.dtx v1.1i 2000/05/19}% +\changes{4.1n}{2009/12/09}{(AO, 569) execute \classname{atveryend}'s \cs{Call@AfterLastShipout} at the proper time}% +\changes{4.1n}{2009/12/13}{(AO, 574) protect against \classname{lineno.sty}, which forces a visit to the output routine, which appears to destroy the value of \cs{@tempdima}}% +\changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% +\changes{4.1n}{2010/01/02}{(AO, 571) allow split after last line of footnote}% +\changes{4.1n}{2010/01/06}{(AO, 572) title block footnotes numbered independently from body footnotes}% +\changes{4.1p}{2010/02/24}{(AO, 582) A patch of \classname{hyperref.sty} to provide backward compatibility to \TeX Live 2007's version 6.75r}% \end{filecontents*} @@ -523,12 +546,8 @@ % \end{macrocode} % % \subsection{Banner and beginning of the \file{kernel} {\sc docstrip} module}% -% Credit where due. % \begin{macrocode} %<*kernel> -\typeout{% - ltxutil [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% -}% % \end{macrocode} % % \subsection{Errors and warnings} @@ -967,6 +986,7 @@ % \begin{macro}{\enddocument} % \begin{macro}{\check@aux} % \begin{macro}{\do@check@aux} +% \changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}% % The standard \LaTeX\ \enve{document} processing is a potential problem, % particularly when the output routine has been changed by \classname{ltxgrid}. % We separate out the procedure that checks the auxiliary file at the end of @@ -977,14 +997,28 @@ % with the output routine. % \begin{macrocode} \def\enddocument{% +% \end{macrocode} +% \changes{4.1n}{2009/12/06}{(AO) Incorporate change to ltmiscen.dtx v1.1i 2000/05/19}% +% The following line from \filename{ltmiscen.dtx} `resets \cmd\AtEndDocument for latex/3060'. +% \begin{macrocode} + \let\AtEndDocument\@firstofone +% \end{macrocode} +% \begin{macrocode} \@enddocumenthook \@checkend{document}% +% \end{macrocode} +% The \cmd\clear@document\ statement ends the current page (we must guarantee no further shipouts), +% then executes all cleanup procedures that must occur only after the last shipout. +% Clients will queue up their procedures via \cmd\AfterLastShipout, if it exists, otherwise by doing \cmd\appdef\cmd\clear@document. +% \begin{macrocode} \clear@document +% \end{macrocode} +% We are very close to ending the \TeX\ run, now. +% \begin{macrocode} \check@aux \deadcycles\z@ \@@end }% -\def\clear@document{\clearpage}% \def\check@aux{\do@check@aux}% \def\do@check@aux{% \@if@sw\if@filesw\fi{% @@ -1022,6 +1056,36 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\clear@document} +% \changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}% +% The procedure \cmd\clear@document\ is responsible for flushing out the last page of the document, +% if not already done. +% The procedure then executes those procedures that must wait for execution until +% after the last page is shipped out. +% Clients of \classname{ltxutil}, such as \classname{ltxgrid} and \classname{revtex4} +% will queue these procedures up via \cmd\AfterLastShipout, if it exists, otherwise by doing \cmd\appdef\cmd\clear@document. +% +% The command \cmd\Call@AfterLastShipout\ is provided by Heiko Oberdiek's \classname{atveryend} package. +% This package is compatible with \classname{ltxutil}. +% +% Note on compatibility with \classname{atveryend}: +% we arrange for \cmd\Call@AfterLastShipout\ to be called from the safety of the output routine, +% thereby ensuring that all of the procedures queued up by that package's +% \cmd\AfterLastShipout\ are executed at the right time. +% We also ensure that \cmd\Call@AfterLastShipout\ has a default definition, in case the package was never loaded. +% \changes{4.1n}{2009/12/09}{(AO, 569) execute \classname{atveryend}'s \cs{Call@AfterLastShipout} at the proper time}% +% \begin{macrocode} +\def\clear@document{% + \clearpage + \do@output@cclv{% + \Call@AfterLastShipout + }% +}% +\appdef\class@documenthook{% + \providecommand\Call@AfterLastShipout{}% +}% +% \end{macrocode} +% \end{macro} % % \subsection{Class Extensions}% % \changes{4.1a}{2008/08/12}{Class extension mechanism \cs{class@extension}, \cs{class@extensionfile}, and \cs{class@ext@hook}.} @@ -1512,8 +1576,12 @@ % is not the right parameter to use for the set width of a footnote. % In such a case, for the applicable scope, you should define % \cmd\set@footnotewidth\ to perform this job correctly. +% +% If we are setting type on multiple page grids, we must still ensure that all footnotes that +% find their way into the \cmd\footins\ insert register are set on the same width. +% This implies the need for a document to have an ``overall'' page grid, which determines the set width of all footnotes +% with the exception of minipage footnotes. % -% A procedure, \cmd\set@footnotewidth@ii, illustrates how to do this when in a two-column page grid. % In general, remember that footnotes, like all insertions (including floats), % are a step outside of the galley context, and all aspects of insertions need to be % properly handled, including the set width. @@ -1538,20 +1606,53 @@ \make@footnotetext }% % \end{macrocode} +% Procedure \cmd\make@footnotetext\ sets the footnote \verb+#1+ into type, with the proper +% font, color, leading, width, and label in effect. +% It also establishes a strut and null glue at the end of the last paragraph of the footnote; +% The strut helps compensate for the lack of \cmd\interlineskip\ glue between \cmd\insert s; +% the glue establishes a feasible \cmd\vsplit\ point between footnotes. +% +% Note that in the title block (\classname{ltxfront}), the alternative definition, under the name \cmd\frontmatter@footnotetext, is used. +% The only material difference there is the reference to \cmd\frontmatter@makefntext\ instead of \cmd\@makefntext. +% +% Dependency note: the \cmd\@makefntext\ procedure is used to further process the footnote text +% and to execute the \cmd\@makefnmark\ procedure to produce the footnote mark. +% The definition of the former is customarily found in the document class (hereunder that of \filename{article.cls}), +% the latter in \filename{latex.ltx}. They are as follows: +% \begin{verbatim} +%\newcommand\@makefntext[1]{% +% \parindent 1em\noindent +% \hb@xt@1.8em{\hss\@makefnmark}% +% #1% +%}% +%\def\@makefnmark{% +% \hbox{\@textsuperscript{\normalfont\@thefnmark}}% +%}% +% \end{verbatim} +% +% \changes{4.1n}{2010/01/06}{(AO, 572) title block footnotes numbered independently from body footnotes}% % \begin{macrocode} \long\def\make@footnotetext#1{% \set@footnotefont % \end{macrocode} -% As noted above, we do \emph{not} do \cmd\floatingpenalty\ \cmd\@MM. +% As noted above, we do \emph{not} do \cmd\floatingpenalty\ \cmd\@MM, as in standard \LaTeX. % \begin{macrocode} \set@footnotewidth \@parboxrestore \protected@edef\@currentlabel{% - \csname p@footnote\endcsname\@thefnmark +% \end{macrocode} +% Note that we employ \cmd\@mpfn\ as a level of redirection for the footnotecounter. +% \begin{macrocode} + \csname p@\@mpfn\endcsname\@thefnmark }% \color@begingroup \@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1% +% \end{macrocode} +% \changes{4.1n}{2010/01/02}{(AO, 571) allow split after last line of footnote}% +% The following strut and glue are for spacing and splitting, as mentioned above. +% \begin{macrocode} + \@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -1569,20 +1670,10 @@ }% % \end{macrocode} % \cmd\set@footnotewidth\ is the procedure for setting the width of a footnote. +% The default page grid, a single, full-width column, sets footnotes on the width of the text. +% \changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% % \begin{macrocode} -\def\set@footnotewidth{% - \hsize\columnwidth - \linewidth\hsize -}% -% \end{macrocode} -% \begin{macrocode} -\def\set@footnotewidth@ii{% - \hsize\textwidth - \advance\hsize\columnsep - \divide\hsize\tw@ - \advance\hsize-\columnsep - \linewidth\hsize -}% +\def\set@footnotewidth{\set@footnotewidth@one}% % \end{macrocode} % \end{macro} % \end{macro} @@ -3927,14 +4018,23 @@ \@nameuse{l@f@#2}% \ignorespaces#3\unskip\nobreak\hskip\skip@ \hb@xt@\rightskip{\hfil\unhbox\@tempboxa}\hskip-\rightskip\hskip\z@skip - \par - \expandafter\aftergroup\csname tocdim@#2\endcsname\expandafter - \endgroup\the\@tempdima\relax +% \end{macrocode} +% \changes{4.1n}{2009/12/13}{(AO, 574) protect against \classname{lineno.sty}, which forces a visit to the output routine, which appears to destroy the value of \cs{@tempdima}}% +% +% By side effect, set the value of, e.g., \cmd\tocdim@section. +% +% Note that the \cmd\par\ must not be executed before the value of \cmd\@tempdima\ is expanded (outside the current group). +% Otherwise, the \classname{lineno.sty} package may interfere (it unfortunately does a global assignment of \cmd\@tempdima). +% \begin{macrocode} + \expandafter\par + \expandafter\aftergroup\csname tocdim@#2% + \expandafter\endcsname + \expandafter\endgroup + \the\@tempdima\relax }% % \end{macrocode} % \changes{4.1a}{2008/01/19}{(AO, 479) Per: Dylan Thurston}% -% In the call to \cmd\set@tocdim@pagenum, I am now exposing the -% use of the particular box register. +% In the call to \cmd\set@tocdim@pagenum, I am now exposing the use of the particular box register. % \begin{macrocode} \def\set@tocdim@pagenum#1#2{% \setbox#1\hbox{\ignorespaces#2}% @@ -4026,26 +4126,36 @@ % \begin{macro}{\href} % \begin{macro}{\url} % \begin{macro}{\URL@prefix} +% \begin{macro}{\doi} +% \begin{macro}{\doibase} % \changes{4.1b}{2008/08/12}{(AO, 487) Support for video figures and the \cs{setfloatlink} command}% -% We provide support for the \cmd\href\ and \cmd\url\ commands. +% We provide support for the \cmd\href, \cmd\url, and \cmd\doi\ commands. % Packages, like \classname{hyperref}, may override these definitions % and provide better semantics. % \changes{4.1g}{2009/10/06}{(AO, 532) Both arguments of \cs{href} get sanitized}% +% \changes{4.1j}{2009/10/24}{(AO, 545) Provide definition for \cs{doi} that does hypertext}% % \begin{macrocode} -\providecommand\href[0]{\begingroup\@sanitize\@href}% -\def\@href#1{\@@startlink{#1}\@@href}% -\def\@@href#1{\endgroup#1\@@endlink}% -\providecommand \url [0]{\begingroup\@sanitize \@url }% +\providecommand\href[0]{\begingroup\@sanitize@url\@href}% +\def\@href#1{\@@startlink{#1}\endgroup\@@href}% +\def\@@href#1{#1\@@endlink}% +\providecommand \url [0]{\begingroup\@sanitize@url \@url }% \def \@url #1{\endgroup\@href {#1}{\URL@prefix#1}}% \providecommand \URL@prefix [0]{URL }% +\providecommand\doi[0]{\begingroup\@sanitize@url\@doi}% +\def\@doi#1{\endgroup\@@startlink{\doibase#1}doi:\discretionary {}{}{}#1\@@endlink }% +\providecommand \doibase [0]{http://dx.doi.org/}% +\providecommand \@sanitize@url[0]{\chardef\cat@space\the\catcode`\ \@sanitize\catcode`\ \cat@space}% % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\@@startlink} % \begin{macro}{\@@endlink} % \begin{macro}{\pdfstartlink@attr} +% \begin{macro}{\hypertext@enable@ltx} % How we define \cmd\@@startlink\ and \cmd\@@endlink\ will depend on % whether we are running under \textsc{pdflatex}. % If so, and if PDF output is requested, then we use its primitives @@ -4054,21 +4164,135 @@ % and using the \classname{hyperref} defaults; % \cmd\pdfstartlink@attr\ can be redefined by a client package. % Otherwise we fall back the Hyper\TeX\ standard and leave things to the DVI translator. +% \changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}} +% +% A class or package that wishes to employ hypertext capabilities should +% execute the \cmd\hypertext@enable@ltx\ procedure. % \begin{macrocode} +\def\@@startlink#1{}% +\def\@@endlink{}% \@ifxundefined \pdfoutput {\true@sw}{\@ifnum{\z@=\pdfoutput}{\true@sw}{\false@sw}}% {% - \def\@@startlink#1{\leavevmode\special{html:}}% - \def\@@endlink{\special{html:}}% + \def\@@startlink@hypertext#1{\leavevmode\special{html:}}% + \def\@@endlink@hypertext{\special{html:}}% }{% - \def\@@startlink#1{% + \def\@@startlink@hypertext#1{% \leavevmode \pdfstartlink\pdfstartlink@attr user{/Subtype/Link/A<>}% \relax }% - \def\@@endlink{\pdfendlink}% + \def\@@endlink@hypertext{\pdfendlink}% \def\pdfstartlink@attr{attr{/Border[0 0 1 ]/H/I/C[0 1 1]}}% }% +\def\hypertext@enable@ltx{% + \let\@@startlink\@@startlink@hypertext + \let\@@endlink\@@endlink@hypertext +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\href} +% \changes{4.1p}{2010/02/24}{(AO, 582) A patch of \classname{hyperref.sty} to provide backward compatibility to \TeX Live 2007's version 6.75r}% +% The \cmd\href\ command of \classname{hyperref} was extend somewhere +% between versions 6.75r and 6.80e. We apply a repair to the earlier +% version (if present) so that it works like the later version. +% +% The issue is the presence of whitespace, either following the \cmd\href\ token +% or following the first argument's closing brace character. +% +% \begin{macrocode} +\def\href@Hy{\hyper@normalise \href@ }% +\def\href@Hy@ltx{\@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}}% +\def\Hy@href#{\hyper@normalise\href@}% +\begingroup + \endlinechar=-1 % + \catcode`\^^A=14 % + \catcode`\^^M\active + \catcode`\%\active + \catcode`\#\active + \catcode`\_\active + \catcode`\$\active + \catcode`\&\active + \gdef\hyper@normalise@ltx{^^A + \begingroup + \catcode`\^^M\active + \def^^M{ }^^A + \catcode`\%\active + \let%\@percentchar + \let\%\@percentchar + \catcode`\#\active + \def#{\hyper@hash}^^A + \def\#{\hyper@hash}^^A + \@makeother\&^^A + \edef&{\string&}^^A + \edef\&{\string&}^^A + \edef\textunderscore{\string_}^^A + \let\_\textunderscore + \catcode`\_\active + \let_\textunderscore + \let~\hyper@tilde + \let\~\hyper@tilde + \let\textasciitilde\hyper@tilde + \let\\\@backslashchar + \edef${\string$}^^A + \Hy@safe@activestrue + \hyper@n@rmalise + }^^A + \catcode`\#=6 ^^A + \gdef\Hy@ActiveCarriageReturn@ltx{^^M}^^A + \gdef\hyper@n@rmalise@ltx#1#2{^^A + \def\Hy@tempa{#2}^^A + \ifx\Hy@tempa\Hy@ActiveCarriageReturn + \Hy@ReturnAfterElseFi{^^A + \hyper@@normalise{#1}^^A + }^^A + \else + \Hy@ReturnAfterFi{^^A + \hyper@@normalise{#1}{#2}^^A + }^^A + \fi + }^^A + \gdef\hyper@@normalise@ltx#1#2{^^A + \edef\Hy@tempa{^^A + \endgroup + \noexpand#1{\Hy@RemovePercentCr#2%^^M\@nil}^^A + }^^A + \Hy@tempa + }^^A + \gdef\Hy@RemovePercentCr@ltx#1%^^M#2\@nil{^^A + #1^^A + \ifx\limits#2\limits + \else + \Hy@ReturnAfterFi{^^A + \Hy@RemovePercentCr #2\@nil + }^^A + \fi + }^^A +\endgroup +\def\switch@hyperref@href{% + \expandafter\@ifx\expandafter{\csname href \endcsname\href@Hy}{ + \class@info{Repairing hyperref 6.75r \string\href}% + \let\hyper@normalise\hyper@normalise@ltx + \let\hyper@@normalise\hyper@@normalise@ltx + \let\hyper@n@rmalise\hyper@n@rmalise@ltx + \let\Hy@ActiveCarriageReturn\Hy@ActiveCarriageReturn@ltx + \let\Hy@RemovePercentCr\Hy@RemovePercentCr@ltx + \let\href\href@Hy@ltx + }{}% +}% +\appdef\document@inithook{\switch@hyperref@href}% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\typeout} +% We make the \cmd\typeout\ procedure of \LaTeX\ be \cmd\long, +% because sometimes we are talking about \cmd\par. +% \begin{macrocode} \def\typeout@org#1{% \begingroup \set@display@protect @@ -4087,8 +4311,6 @@ }{}% % \end{macrocode} % \end{macro} -% \end{macro} -% \end{macro} % % \subsection{End of the \file{kernel} {\sc docstrip} module} % Here ends the module. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/source/latex/revtex/revtex4-1.dtx +++ texlive-extra-2009/texmf-dist/source/latex/revtex/revtex4-1.dtx @@ -127,9 +127,9 @@ %<*package> %%% @LaTeX-file{ %%% filename = "revtex4-1.dtx", -%%% version = "4.1g", -%%% date = "2009/10/08", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1r", +%%% date = "2010/07/25", +%%% time = "20:33:00 UT-8", %%% checksum = "7177", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -221,8 +221,13 @@ \ProvidesFile{revtex4-1.dtx} % %<*!package&!options> - [2009/10/08:11:23 4.1g (http://publish.aps.org/revtex4/ for documentation)]%FileInfo +% + [2010/07/25/20:33:00 4.1r (http://publish.aps.org/revtex4/ for documentation)]% \fileversion % +% \end{macrocode} +% The current class name is remembered in \cmd\class@name. +% This is something of a klootch, relying as it does on knowledge of the implementation of \cmd\ProvidesPackage. +% \begin{macrocode} %\let\class@name\@gtempa % \end{macrocode} % @@ -400,7 +405,7 @@ \changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}} \changes{4.1d}{2009/03/27}{Definition of \cs{ @fnsymbol} follows fixltx2e.sty} \changes{4.1e}{2008/06/29}{(AO, 455) be nice to a list within the abstract} -\changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \filename{lineno.sty}} +\changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}} \changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon} \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}% \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}% @@ -411,6 +416,35 @@ \changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}% \changes{4.1g}{2009/10/07}{(AO, 538) \cs{MakeTextUppercase} inappropriately expands the double backslash} \changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}% +\changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads} +\changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}} +\changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}} +\changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}} +\changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package} +\changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: invoking class option preprint implies class option preprintnumbers} +\changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms} +\changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}% +\changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}% +\changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% +\changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +\changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}% +\changes{4.1n}{2010/01/04}{(AO, 575) the default for journal prstper is longbibliography}% +\changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}% +\changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}% +\changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% +\changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}% +\changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}% +\changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a} +\changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.} +\changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.} +\changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.} +\changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}% +\changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.} +\changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}} +\changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl} +\changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}% +\changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}% +\changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}% \end{filecontents*} % \end{macrocode} @@ -852,17 +886,20 @@ % \subsubsection{Showing preprint numbers}% % % \begin{macro}{\preprint@sw} +% \changes{4.0d}{2000/04/10}{New option} % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.} +% \changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: default value of \cs{preprint@sw} follows \cs{preprintsty@sw}} % The boolean \cmd\preprint@sw\ signifies that % the preprints (cf. \cmd\preprint) are to be formatted (usually on the title page). % The option \classoption{preprintnumbers} declares to do so, % \classoption{nopreprintnumbers} declares not to; % the default is to follow \cmd\preprintsty@sw. -% \changes{4.0d}{2000/04/10}{New option} % \begin{macrocode} \DeclareOption{nopreprintnumbers}{\@booleanfalse\preprint@sw}% \DeclareOption{preprintnumbers}{\@booleantrue\preprint@sw}% -\let\preprint@sw\preprintsty@sw +\appdef\setup@hook{% + \@ifxundefined\preprint@sw{\let\preprint@sw\preprintsty@sw}{}% +}% % \end{macrocode} % \end{macro} % @@ -1070,16 +1107,6 @@ % % \revtex's default for \cmd\longbibliography@sw\ is \cmd\false@sw. % -% Here is a suggested convention for societies and journals that provide two alternative -% Bib\TeX\ styles: if one is named, say, \file{apsrev.bst}, then name the alternative -% \file{apsrevlong.bst}. Then invoke the code: -% \begin{verbatim} -%\appdef\setup@hook{% -% \longbibliography@sw{% -% \appdef\@bibstyle{long}% -% }{}% -%}% -% \end{verbatim} % \begin{macrocode} \DeclareOption{longbibliography}{\@booleantrue\longbibliography@sw}% \DeclareOption{nolongbibliography}{\@booleanfalse\longbibliography@sw}% @@ -1087,6 +1114,18 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\eprint@enable@sw} +% \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.} +% +% The document class options \classoption{eprint} and \classoption{noeprint} +% give the user the ability to turn off production of the \texttt{eprint} field in the bibliography. +% \begin{macrocode} +\DeclareOption{eprint}{\@booleantrue\eprint@enable@sw}% +\DeclareOption{noeprint}{\@booleanfalse\eprint@enable@sw}% +\@booleantrue\eprint@enable@sw +% \end{macrocode} +% \end{macro} +% % \subsubsection{Simplex/Duplex Pages}% % % \begin{macro}{\twoside@sw} @@ -1124,6 +1163,7 @@ % % \begin{macro}{\twocolumn@sw} % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.} +% \changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}} % The flag \cmd\twocolumn@sw\ signifies that the document is to be % formatted in the two-column page grid. % @@ -1132,20 +1172,7 @@ % Up to that point, the class can check if \cmd\twocolumn@sw\ % is \cmd\undefined\ to see if any related options have been invoked. % -% We install into \cmd\class@enddocumenthook\ -% all tasks that we know must be completed at \cmd\AtEndDocument\ time. -% The first thing it does is end the current paragraph. -% The last is to return us to one-column page grid. -% (This procedure is executed after all typesetting is complete -% i.e., after items like \cmd\printtables.) -% \begin{macrocode} -\def\clear@document{% - \close@column -}% -% \end{macrocode} -% % \classoption{onecolumn} specifies one-column page grid. -% \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.} % The \classoption{twocolumn} class option employs the standard mechanism for % changing the column grid: the \classname{ltxgrid} package. % \begin{macrocode} @@ -1167,9 +1194,15 @@ % \begin{macrocode} \def\select@column@grid{% \twocolumn@sw{% + \twocolumn@grid@setup \open@twocolumn }{% + \onecolumn@grid@setup +% \end{macrocode} +% \begin{verbatim} % \open@onecolumn +% \end{verbatim} +% \begin{macrocode} }% }% \appdef\class@documenthook{% @@ -1179,6 +1212,30 @@ % % \end{macro} % +% \begin{macro}{\clear@document} +% \changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}% +% +% We install into \cmd\class@enddocumenthook\ +% a trap for the procedure \cmd\clearpage\ that attempts to end the current page. +% This procedure needs to be headpatched with \cmd\close@column\ to end the current page grid. +% +% This procedure is executed after all typesetting is complete +% i.e., after items like \cmd\printtables, as well as all commands queued up by \cmd\AtEndDocument. +% +% \begin{macrocode} +\appdef\setup@hook{% + \let\clearpage@ltx\clearpage + \prepdef\clear@document{\let\clearpage\clearpage@ltx\let\clear@document\@empty\close@column}% + \appdef\class@documenthook{% + \appdef\class@enddocumenthook{% + \let\clearpage\clear@document + }% + }% +}% +% \end{macrocode} +% +% \end{macro} +% % \begin{macro}{\authoryear@sw} % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}% % The boolean \cmd\authoryear@sw\ signifies that we are to use author-year citations rather than numerical citations. @@ -1678,8 +1735,16 @@ % package \classname{ltxgrid}. Only people who really want to see this output will select these class options. % Consult documentation for the \classname{ltxgrid} package to see what output the related switches enable. % \begin{macrocode} -\DeclareOption{ltxgridinfo}{\@booleantrue\ltxgrid@info@sw}% -\DeclareOption{outputdebug}{\@booleantrue\outputdebug@sw}% +\DeclareOption{ltxgridinfo}{% + \@booleantrue\ltxgrid@info@sw +%\@booleantrue\ltxgrid@foot@info@sw +}% +\DeclareOption{outputdebug}{% + \@booleantrue\outputdebug@sw + \@booleantrue\ltxgrid@info@sw + \@booleantrue\ltxgrid@foot@info@sw + \traceoutput +}% % \end{macrocode} % \end{macro} % \end{macro} @@ -1716,14 +1781,19 @@ % \end{macro} % % \begin{macro}{\linenumbers@sw} -% \changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \filename{lineno.sty}} -% An option to number the lines of type in the output in the manner of \filename{lineno.sty}. +% \changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}} +% \changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}% +% An option to number the lines of type in the output in the manner of \classname{lineno}. % % At present, we use that very package to implement this functionality. % This means that users may modify the workings of that package per its documentation (which see). +% +% However, compatibility with \classname{amsmath} requires that \classname{lineno} be loaded afterwards. +% Therefore, we defer loading of this package until after the preamble is completed. % \begin{macrocode} \DeclareOption{linenumbers}{% - \appdef\rtx@require@packages{% + \appdef + \class@documenthook{% \RequirePackage{lineno}[2005/11/02 v4.41]% \linenumbersep4pt\relax \linenumbers\relax @@ -1830,6 +1900,18 @@ % \end{macro} % \end{macro} % +% \changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}} +% The class option \classoption{hypertext} enables the built-in hypertext capabilities, +% which coincide with those of \classname{custom-bib}-generated BIBTeX styles +% using the guard code \texttt{hypertext}. +% +% Note that APS has these capabilities turned off by default; +% Loading the hyperref package turns them on. +% \begin{macrocode} +\DeclareOption{hypertext}{\hypertext@enable@ltx}% +\appdef\document@inithook{\@ifpackageloaded{hyperref}{\hypertext@enable@ltx}{}}% +% \end{macrocode} +% % The default handling for a document class option depends upon whether the \cmd\@society\ is % defined. % @@ -2034,6 +2116,7 @@ % \begin{macro}{\lastpage@putlabel} % Support the default meaning of \cmd\@endpage. % \changes{4.0a}{1998/01/31}{Move after process options, so \cs{clearpage} not in scope of twocolumn} +% \changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package} % Name of this macro (and the \cmd\label\ key) taken from % \url{CTAN:/macros/latex/contrib/other/lastpage}% % with code optimised slightly. @@ -2042,7 +2125,7 @@ \if@filesw \begingroup \advance\c@page\m@ne - \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}}}% + \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}{}{}{}}}% \endgroup \fi }% @@ -2052,13 +2135,14 @@ % This is done just before the \file{.aux} file % is closed, and does not require a \cmd\shipout, because it writes % directly to the \file{.aux} file. -% Note that we invoke \cmd\clearpage: this means that no more typesetting -% should be done past this point. +% Note that we assume no further \cmd\shipout s will be done past this point. +% \changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}% % \begin{macrocode} \appdef\clear@document{% - \clearpage - \lastpage@putlabel - \tally@box@size@sw{\total@text}{}% + \do@output@cclv{% + \lastpage@putlabel + \tally@box@size@sw{\total@text}{}% + }% }% \providecommand\write@column@totals{}% % \end{macrocode} @@ -2845,6 +2929,7 @@ % % % \subsection{Videos} +%\changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}% % % \begin{environment}{video} % We define the \env{video} environment analogously to the @@ -2861,18 +2946,24 @@ % \end{environment} % % \begin{macro}{\thevideo} -% The video counter and float placement defaults. +% The video counter, float placement defaults, strings. % \begin{macrocode} \newcounter{video} \renewcommand \thevideo {\@arabic\c@video} % \end{macrocode} % +% File extension and localizable strings. +% \begin{macrocode} +\def\ext@video{lov}% +\def\fname@video{Video}% +\def\lovname{List of Videos}% +% \end{macrocode} +% +% Float type and default placement. % \begin{macrocode} \def\fps@video{tbp}% \def\ftype@video{4}% -\def\ext@video{lov}% \def\fnum@video{\fname@video~\thevideo}% -\def\fname@video{Video}% \appdef\document@inithook{% \@ifxundefined\c@float@type{}{% \global\setcounter{float@type}{8}% @@ -2948,7 +3039,11 @@ % \begin{environment}{ruledtabular} % \begin{macrocode} \def\endtabular@hook{}% +% \end{macrocode} +% \begin{verbatim} %\RequirePackage{dcolumn}% +% \end{verbatim} +% \begin{macrocode} \appdef\document@inithook{% \@ifpackageloaded{dcolumn}{% \expandafter\@ifnotrelax\csname NC@find@d\endcsname{}{% @@ -3159,6 +3254,33 @@ % The procedures |\rtx@def@citea|, |\rtx@def@citea@close|, and |\rtx@def@citea@box| % can take over the management of \classname{natbib}'s |\@citea| macro to effect more sophisticated % behavior of the punctuation between textual citations. The switch is performed by \cmd\rtx@swap@citea. +% +% \changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}} +% In these procedures, we use \cmd\count@\ to count the number of arguments of the \cmd\cite\ command, +% and we use \cmd\c@NAT@ctr\ to keep track of which argument we are processing. +% The latter counter is created by \classname{natbib} and used there solely in bibliography processing, +% where it keeps track of the reference number. +% We take over its use in these macros, but only locally; therefore these procedures should work properly, even within the bibliography. +%FIXME: check whether this is true! +% +% Because we are using a scratch counter \cmd\count@, we are vulnerable to other \TeX\ programmers +% who patch in to \classname{natbib}'s processing and who might use that counter at the same time we are doing so. +% This is a potential source of trouble for us. +%FIXME: store the value of \cmd\count@\ in a private \cmd\csname! +% +% Note that \cmd\rtx@def@citea\ begins the same as \cmd\NAT@def@citea, which it replaces, +% then makes further decisions based on the values of the counters. +% +% Note also that, in \classname{natbib}, the replacement part of \cmd\NAT@def@citea@close\ could be rewritten as +% \cmd\NAT@def@citea\cmd\prepdef\cmd\@citea\verb+{+\cmd\NAT@@close\verb+}+, which +% would them obviate the need for us to override its meaning. +% +% Note, too, the effect of \cmd\rtx@def@citea@box, which replaces \cmd\NAT@def@citea@box, +% is almost the same as the latter, except the entire \cmd\@citea\ is given as the argument +% of \cmd\NAT@mbox. +% +% Finally, bear in mind that the English (and some American editors) do not place a comma +% before the ``and''; our procedures do (but they could be rewritten with that convention). % \begin{macrocode} \def\rtx@swap@citea{% \let\NAT@def@citea\rtx@def@citea @@ -3166,8 +3288,8 @@ \let\NAT@def@citea@box\rtx@def@citea@box }% \def\rtx@def@citea{% + \def\@citea{\NAT@separator\NAT@space}% \advance\c@NAT@ctr\@ne - \let\@citea\NAT@separator \@ifnum{\count@>\tw@}{% \@ifnum{\c@NAT@ctr=\count@}{\appdef\@citea{\NAT@conj\NAT@space}}{}% }{% @@ -3190,11 +3312,56 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\BibitemShut} +% \begin{macro}{\bibAnnote} +% \changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}} +% \changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a} +% \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.} +% We remember a temporary patch to \classname{natbib}'s definition of \cmd\BibitemShut. +% \begin{macrocode} +\def\NAT@BibitemShut#1{% + \def\@bibstop{#1}% + \let\bibitem@Stop\bibitemStop + \let\bibitem@NoStop\bibitemNoStop + \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{% + \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}% + }% +}% +% \end{macrocode} +% The following is a bug fix to \classname{natbib} version 8.31b. +% \begin{macrocode} +\def\BibitemShut@ltx#1{% + \unskip + \def\@bibstop{#1}% + \let\bibitem@Stop\bibitemStop + \let\bibitem@NoStop\bibitemNoStop + \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{% + \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}% + }% +}% +% \end{macrocode} +% +% \begin{verbatim} +%\providecommand{\bibAnnote}[3]{% +% \BibitemShut{#1}% +% \def\@tempa{#3}\@ifx{\@tempa\@empty}{}{% +% \begin{quotation}\noindent +% \textsc{Key:}\ #2\\\textsc{Annotation:}\ \@tempa +% \end{quotation}% +% }% +% \ignorespaces +%}% +%\def\@bibitemShut{}% +% \end{verbatim} +% \end{macro} +% \end{macro} +% +% % \begin{macrocode} \newenvironment{thebibliography}{}{}% \let\@listi\@empty \appdef\rtx@require@packages{% - \RequirePackage[sort&compress]{natbib}[2008/12/08 8.3a (PWD, AO)]% + \RequirePackage[sort&compress]{natbib}[2009/11/07 8.31a (PWD, AO)]% \let@environment{NAT@thebibliography}{thebibliography}% \let@environment{thebibliography}{rtx@thebibliography}% \let\bibliographystyle@latex\bibliographystyle @@ -3252,6 +3419,13 @@ \let\onlinecite\rev@citealp \let\textcite\rev@citet % \end{macrocode} +% The following is needed until \classname{natbib} is at 8.31b. +% \begin{macrocode} +\@ifx{\BibitemShut\NAT@BibitemShut}{% + \class@info{Repairing natbib's \string\BibitemShut}% + \let\BibitemShut\BibitemShut@ltx +}{}% +% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} @@ -3260,6 +3434,8 @@ % \end{macro} % % \begin{macro}{\bibliographystyle} +% \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}% +% \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}% % We arrange for the selection of bibliography style % to occur either due to the document's explicit % \cmd\bibliographystyle\ statement or @@ -3268,15 +3444,59 @@ % Note that \revtex\ is incompatible with % any package that patches \cmd\bibliographystyle. % Since \classname{natbib} does this, we need a fix. +% +% The Boolean \cmd\bibliographystyle@sw\ signifies that the document contains explicit +% \cmd\bibliographystyle\ markup. If, on the contrary, the bibliography style is set by +% the the society or the journal, then no explicit \cmd\bibliographystyle\ command appears in the document instance. +% In this case \cmd\bibliographystyle@sw\ will be \cmd\false@sw. % \begin{macrocode} \let\bibliographystyle@latex\bibliographystyle -\def\bibliographystyle{\def\@bibstyle}% +\def\bibliographystyle{\@booleantrue\bibliographystyle@sw\def\@bibstyle}% +\@booleanfalse\bibliographystyle@sw +% \end{macrocode} +% \end{macro} +% +% \changes{4.1j}{2009/11/03}{(AO, 551) Punctuation at end of reference when optional arguments to the cite key are given.} +% The following had been bug fixes to \classname{natbib} version 8.31a. +% \begin{verbatim} +%\def\bibitemStop{\@bibitemShut}% +%\def\NAT@bibitem@cont{% +% \let\bibitem@Stop\bibitemContinue +% \let\bibitem@NoStop\bibitemContinue +%}% +% \end{verbatim} +% The following are alterations to \classname{natbib} version 8.31a to +% accommodate the possible space character preceding \cmd\BibitemShut, +% and to handle the case of merged references, where the first ends with a stop character. +% \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.} +% \changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.} +% \begin{macrocode} +\def\NAT@bibitem@cont{% + \let\bibitem@Stop\bibitemContinue@Stop + \let\bibitem@NoStop\bibitemContinue +}% % \end{macrocode} -% We customize one of the productions of \classname{natbib}. % \begin{macrocode} -\let\bibitemContinue\bibitemContinue@rtx +\def\bibitemNoStop{% + \@ifx@empty\@bibitemShut{.\spacefactor\@mmm\space}{\@bibitemShut}% +}% +% \end{macrocode} +% \begin{macrocode} +\def\bibitemContinue{% + \@ifx@empty\@bibitemShut{;\spacefactor\@mmm\space}{\@bibitemShut}% +}% +% \end{macrocode} +% \begin{macrocode} +\def\bibitemContinue@Stop{% + \@ifx@empty\@bibitemShut{\spacefactor\@mmm\space}{\@bibitemShut}% +}% % \end{macrocode} -% \end{macro} +% +% \changes{4.1k}{2009/11/11}{(AO, 561) remove dead code relating to \cs{bibitemContinue}} +% We used to customize one of the productions of \classname{natbib}, but no longer. +% \begin{verbatim} +%\let\bibitemContinue\bibitemContinue@rtx +% \end{verbatim} % % Here ends the code to be executed at \cmd\rtx@require@packages\ time. % \begin{macrocode} @@ -3284,9 +3504,10 @@ % \end{macrocode} % \changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon} % Redefine a macro of \classname{natbib} so that merged references are separated with a semicolon. -% \begin{macrocode} -\def\bibitemContinue@rtx{;\spacefactor\@mmm\space}% -% \end{macrocode} +% \changes{4.1k}{2009/11/11}{(AO, 561) remove dead code relating to \cs{bibitemContinue}} +% \begin{verbatim} +% \def\bibitemContinue@rtx{;\spacefactor\@mmm\space}% +% \end{verbatim} % % \begin{macro}{\onlinecite} % \begin{macro}{\textcite} @@ -3315,16 +3536,19 @@ % \begin{macrocode} \let\bibliography@latex\bibliography \def\bibliography#1{% - \@ifx@empty{\pre@bibdata}{% - \bibliography@latex{#1}% - }{% - \@if@empty{#1}{% - \expandafter\bibliography@latex\expandafter{\pre@bibdata}% + \auto@bib@empty + \begingroup + \let\auto@bib@innerbib\@empty + \@ifx@empty{\pre@bibdata}{% + \bibliography@latex{#1}% }{% - \expandafter\bibliography@latex\expandafter{\pre@bibdata,#1}% + \@if@empty{#1}{% + \expandafter\bibliography@latex\expandafter{\pre@bibdata}% + }{% + \expandafter\bibliography@latex\expandafter{\pre@bibdata,#1}% + }% }% - }% - \let\auto@bib\@empty + \endgroup }% \let\pre@bibdata\@empty % \end{macrocode} @@ -3332,6 +3556,10 @@ % % \begin{environment}{rtx@thebibliography}% % \begin{macro}{\present@bibnote}% +% \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}% +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}% +% \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}% % We put a tail patch into \cmd\thebibliogrphy\ and % a headpatch into \cmd\endthebibliography. % @@ -3339,7 +3567,6 @@ % deferred to the bibliography; a journal substyle % might want to override the definition of \cmd\present@bibnote. % -% \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}% % We make provisions for the case where there are no \cmd\bibitem s % for the bibliography: we produce no bibliography head at all. % @@ -3349,11 +3576,21 @@ \let\@TBN@opr\present@bibnote \@FMN@list }{% +% \end{macrocode} +% The following line was commented out: +% \begin{verbatim} %\@endnotesinbib +% \end{verbatim} +% The \cmd\auto@bib@innerbib\ directive has been moved from the begin processing to the end processing. +% This means that the content of the \env{thebibliography} environment can itself prevent the +% automatic reading in of the .bbl file. This would be needed when the user has pasted in the +% content of the .bbl file into the document itself, something required by APS and AIP editorial direction. +% \begin{macrocode} + \auto@bib@innerbib \edef\@currentlabel{\arabic{NAT@ctr}}% \label{LastBibItem}% \endNAT@thebibliography - \global\let\auto@bib\@empty + \aftergroup\auto@bib@empty }% \def\present@bibnote#1#2{% \item[% @@ -3361,18 +3598,24 @@ \normalfont \Hy@raisedlink{\hyper@anchorstart{frontmatter.#1}\hyper@anchorend}% \begingroup - \c@footnote#1\relax + \csname c@\@mpfn\endcsname#1\relax \frontmatter@thefootnote \endgroup }% ]#2\par +% \end{macrocode} +% The following line was commented out: +% \begin{verbatim} %\global\let\NAT@bibitem@first@sw\@secondoftwo +% \end{verbatim} +% \begin{macrocode} }% % \end{macrocode} % \end{macro} % \end{environment} % % \begin{macro}{write@bibliographystyle} +% \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}% % We wish to delay committing the \cmd\bibliographystyle\ until as late as possible. % The journal substyle will define a default bibliography style, and % the document's explicit \cmd\bibliographystyle\ command, if any, will override that default. @@ -3385,10 +3628,13 @@ % If not, it effectively executes the needed \cmd\bibliographystyle\ command, then neutralizes itself % (we only need to do this once per job). % +% If the document lacks explicit \cmd\bibliographystyle\ markup, we execute +% \cmd\@bibdataout@rev, a hook for \revtex-aware processing. % \begin{macrocode} \def\write@bibliographystyle{% \@ifxundefined\@bibstyle{}{% \expandafter\bibliographystyle@latex\expandafter{\@bibstyle}% + \bibliographystyle@sw{}{\@bibdataout@rev}% }% \global\let\write@bibliographystyle\relax }% @@ -3402,7 +3648,7 @@ % \begin{macro}{\super@cite@end} % \begin{macro}{\super@cite@swap} % We wish to extend \classname{natbib} to move spaces and citations around -% a subscript style citation, imitating Donald Arseneau's \classname{cite} package +% a superscript-style citation, imitating Donald Arseneau's \classname{cite} package % with the \classoption{super}. % % The \cmd\rtx@@citetp\ procedure is substituted for \cmd\NAT@@citetp; @@ -3475,6 +3721,9 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % The following must execute only after \classname{natbib} is loaded and has set % up its parameters (which it does at \cmd\AtBeginDocument\ time). @@ -3507,11 +3756,13 @@ % % \begin{macro}{\mini@note} % \begin{macro}{\save@note} +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% QUERY: how do footnotes get thrown to the bibliography. \cmd\footinbib@sw\ appears to be irrelevant. % \begin{macrocode} \def\mini@note{\save@note\mini@notes}%Implicit #2 \def\save@note#1#2{% - \stepcounter{footnote}% - \protected@xdef\@thefnmark{\the\c@footnote}% + \stepcounter\@mpfn + \protected@xdef\@thefnmark{\thempfn}% \@footnotemark \expandafter\g@addto@macro \expandafter#1% @@ -3627,17 +3878,16 @@ %}% % \end{verbatim} % -% \begin{macro}{\@doendnote} % \cmd\@doendnote\ is obsolete. % \begin{verbatim} %\def\@doendnote#1#2{\bibitem{#1}#2}% % \end{verbatim} -% \end{macro} % +% \changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.} % Procedure \cmd\@endnotetext\ is the operative procedure\ when the endnotes are to be % collated in with the other references, typically true when numerical citations are being used. % The technique involves writing a .bib file (\cmd\@bibdataout) with each endnote typed as -% a \texttt{@MISC} entry. +% a \texttt{@FOOTNOTE} entry. % % Timing note: doing \cmd\openout\ should be deferred until the beginning of the document, % as is done here. This allows one to make a format (\filename{.fmt}) file out of this class. @@ -3645,14 +3895,27 @@ \long\def\@endnotetext#1{% \begingroup \endnote@relax - \immediate\write\@bibdataout{@MISC{\@endnotelabel,note="#1"}}%year="\@endnotelabel", + \immediate\write\@bibdataout{% + @FOOTNOTE{% + \@endnotelabel,% +% \end{macrocode} +% The \texttt{key} field is recommended in cases where there is no author (see \filename{btxdoc}). +% \begin{macrocode} + key="\@endnotelabel",% +% \end{macrocode} +% The \texttt{note} field is simply the content of the footnote. +% \begin{macrocode} + note="#1"% + }% + }% \endgroup }% \newwrite\@bibdataout -\appdef\class@documenthook{% - \immediate\openout\@bibdataout\pre@bibdata.\bibdata@ext\relax -}% % \end{macrocode} +% \end{macro} +% +% \begin{macro}{\endnote@relax} +% At \cmd\AtBeginDocument\ time, we open the job's \filename{.bib} file. % % Procedure \cmd\endnote@relax\ robustifies commands that ought not to be expanded when % the endnote is written out. @@ -3663,41 +3926,59 @@ \let\cite \relax \let\ref \relax \let\pageref \relax \let\( \relax \let\) \relax \let\\ \relax \let~\relax +% \end{macrocode} +% \begin{verbatim} %\let\protect\noexpand +% \end{verbatim} +% \begin{macrocode} \let \protect \@unexpandable@protect \newlinechar`\^^M% +% \end{macrocode} +% \begin{verbatim} %\newlinechar`\ % +% \end{verbatim} +% \begin{macrocode} \let\begin\relax \let\end\relax }% % \end{macrocode} % \end{macro} -% \end{macro} -% \end{macro} -% \end{macro} % -% \begin{macro}{\endnotetext} -% \begin{verbatim} -%\def\unused@endnotetext{% -% \@ifnextchar[{% -% \@xendnotenext -% }{% -% \protected@xdef\@thefnmark{\thefootnote}% -% \@endnotetext -% }% -%}% -% \end{verbatim} +% \begin{macro}{\@bibdataout@init} +% \begin{macro}{\@bibdataout@aps} +% \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.} +% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}% +% \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}% +% At \cmd\AtBeginDocument\ time, we open the job's \filename{.bib} file. +% The hook is available for use by a society to place its own @CONTROL record in the \cmd\@bibdataout\ stream. +% \begin{macrocode} +\appdef\class@documenthook{\@bibdataout@init}% +\def\@bibdataout@init{% + \immediate\openout\@bibdataout\pre@bibdata.\bibdata@ext\relax +}% +\def\@bibdataout@rev{% + \immediate\write\@bibdataout{% +% \end{macrocode} +% The entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}. +% The citation key (REVTEX41Control) is effectively a version number, +% which the \filename{.bst} can use to interpret the bib entry. +% \begin{macrocode} + @CONTROL{% + REVTEX41Control% +% \end{macrocode} +% Say if we want the \texttt{eprint} field disabled. Otherwise accept the default of the \filename{.bst}. +% \begin{macrocode} + \eprint@enable@sw{}{,eprint=""}% + }% + }% +% \end{macrocode} +% Place a \cmd\citation\ into the auxiliary file corresponding to this entry. +% \begin{macrocode} + \if@filesw + \immediate\write\@auxout{\string\citation{REVTEX41Control}}% + \fi +}% +% \end{macrocode} % \end{macro} -% -% \begin{macro}{\@xendnotenext} -% \begin{verbatim} -%\def\unused@xendnotenext[#1]{% -% \begingroup -% \c@footnote#1\relax -% \unrestored@protected@xdef\@thefnmark{\thefootnote}% -% \endgroup -% \@endnotetext -%}% -% \end{verbatim} % \end{macro} % % \begin{macro}{\printendnotes} @@ -3711,57 +3992,6 @@ \class@warn{The \string\printendnotes\space command no longer serves any function. Please remove it from your document.}% }% % \end{macrocode} -% \begin{verbatim} -%\def\printendnotes{% -% \@ifx{\@endnoteout\@undefined}{}{% -% \begingroup -% \c@secnumdepth-\maxdimen -% \section{% -% \notesname -% }% -% \immediate\closeout\@endnoteout -% \global\let\@endnoteout\@undefined -% \begin{enumerate}% -% \makeatletter -% \input{\endnote@stream}% -% \end{enumerate}% -% \endgroup -% }% -%}% -%\appdef\class@enddocumenthook{% -% \printendnotes -%}% -% \end{verbatim} -% \end{macro} -% -% \begin{macro}{\firstnote@num} -% \begin{macro}{\set@firstnote} -% -% In \revtex, we have permanently altered the way -% that the footnote counter gets reset at the beginning -% of the document. -% -% If footnotes appear in the bibliography, we initialise -% the footnote counter to number of cites (found last time) -% via \cmd\set@firstnote. -% \changes{4.1a}{2008/01/18}{(AO, 451) ``Cannot have more than 256 cites in a document''}% -% -% \begin{macrocode} -\mathchardef\firstnote@num\z@ -\appdef\class@documenthook{% - \global\c@footnote\firstnote@num - \appdef\maketitle{\global\c@footnote\firstnote@num}% -}% -\def\set@firstnote#1{% - \@ifnum{\firstnote@num=#1\relax}{}{% - \class@warn@end{Endnote numbers changed: rerun LaTeX}% - }% - \immediate\write\@mainaux{% - \global\mathchardef\string\firstnote@num#1\relax - }% -}% -% \end{macrocode} -% \end{macro} % \end{macro} % % \begin{macro}{\@endnotesinbib} @@ -3782,21 +4012,6 @@ % the counter used in \env{thebibliography} is \cmd\c@NAT@ctr. % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}% % -% Obsolete code is commented out. -% \begin{verbatim} -%\def\@endnotesinbib{% -% \set@firstnote\z@ -%}% -%\def\@endnotesinbibliography{% -% \expandafter\set@firstnote\expandafter{\the\c@NAT@ctr}% -% \@ifx{\@endnoteout\@undefined}{}{% -% \immediate\closeout\@endnoteout -% \global\let\@endnoteout\@undefined -% \makeatletter -% \input{\endnote@stream}% -% }% -%}% -% \end{verbatim} % Here is the sole place where \cmd\footinbib@sw\ has an effect, other code simple assigning its value. % If it is false, or \cmd\authoryear@sw\ is true, then footnotes are handled by the default mechanism. % \begin{macrocode} @@ -3851,7 +4066,14 @@ % \end{macro} % % \begin{macro}{\auto@bib} +% \begin{macro}{\auto@bib@empty} +% \begin{macro}{\test@bbl@sw} +% \begin{macro}{\bibitem@set} +% \begin{macro}{\auto@bib@innerbib} +% \begin{macro}{\thebibliography@nogroup} % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}% +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}% % Under some circumstances, we must typeset the bibliography automatically. % If the document requires footnotes to be set in the bibliography (effectively, class option \texttt{footinbib}), % or that frontmatter footnotes be set in the bibliography (effectively, class option \texttt{bibnotes}), @@ -3870,7 +4092,7 @@ \def\auto@bib{% \@ifx@empty\@FMN@list{% \footinbib@sw{% - \@ifnum{\thefootnote>\z@}{% + \@ifnum{\csname c@\@mpfn\endcsname>\z@}{% \true@sw }{% \test@bbl@sw @@ -3885,15 +4107,17 @@ \bibliography{}% }{}% }% +\def\auto@bib@empty{% + \let\auto@bib\@empty +}% % \end{macrocode} % Testing the \filename{.bbl} file involves defanging all expected commands % and processing that file inside a box register (that will be simply discarded). -% We provide a new meaning for the \cmd\bibitem\ command: it sets a Boolean. +% We provide a new meaning for the \cmd\bibitem\ command: it queues a Boolean. % \begin{macrocode} \def\test@bbl@sw{% - \begingroup + \setbox\z@\vbox\bgroup \let\providecommand\providecommand@j@nk - \let@environment{thebibliography}{thebibliography@nogroup}% \let\bibfield\@gobbletwo \let\bibinfo\@gobbletwo \let\translation\@gobble @@ -3908,10 +4132,13 @@ \let\emph\@gobble \@booleanfalse\bibitem@sw \let\bibitem\bibitem@set - \setbox\z@\vbox{\IfFileExists {\jobname.bbl}{\@@input\@filef@und}{}}% + \auto@bib@innerbib \bibitem@sw{\aftergroup\true@sw}{\aftergroup\false@sw}% - \endgroup + \egroup }% +% \end{macrocode} +% The \cmd\bibitem@set\ is an alias for \cmd\bibitem\ for the purpose of detecting a non-trivial bibliography. +% \begin{macrocode} \newcommand\bibitem@set[1][]{% \bibitem@sw{}{% \@booleantrue\bibitem@sw @@ -3919,6 +4146,25 @@ }% }% % \end{macrocode} +% The \cmd\auto@bib@innerbib\ procedure reads in the \filename{.bbl} file (if it exists) +% within a context where its \env{thebibliography} environment does nothing, not even establishing a group. +% \begin{macrocode} +\def\auto@bib@innerbib{% + \begingroup + \let@environment{thebibliography}{thebibliography@nogroup}% + \bibliography{}% + \endgroup +}% +% \end{macrocode} +% Environment \env{thebibliography@nogroup} is an alias of the \env{thebibliography} environment that cancels itself. +% It assumes that it is called within a \env{thebibliography} environment. +% \begin{macrocode} +\def\thebibliography@nogroup#1{% + \endgroup + \def\@currenvir{thebibliography}% +}% +\def\endthebibliography@nogroup{\begingroup}% +% \end{macrocode} % The following should be part of \filename{ltxutil}. % \begin{macrocode} \long\def \@gobblethree #1#2#3{}% @@ -3932,10 +4178,13 @@ }% }% }% -\def\thebibliography@nogroup#1{\endgroup\def\@currenvir{thebibliography}}% -\def\endthebibliography@nogroup{\begingroup}% % \end{macrocode} % \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} % % \section{Initial setup} % @@ -4079,7 +4328,7 @@ % DPC: We're in galley style so do a lob sided display environment. % % QUERY: How can we be sure that we are in galley style? -% ANSWER: as noted elsewhere, require both \cmd\twocolumn@sw\ and \cmd\preprintsty@sw\ to be false. +% ANSWER: as noted elsewhere, require that both \cmd\twocolumn@sw\ and \cmd\preprintsty@sw\ be false. % \begin{macrocode} \def\galley@outdent{\rightmargin-\columnwidth\advance\rightmargin-\columnsep}% \let\widetext@outdent\@empty @@ -4114,16 +4363,14 @@ % \changes{4.0c}{1999/11/13}{grid changes with ltxgrid} % % Note that, for the procedure \cmd\close@column@grid, -% we balance columns by switching to the one-column page grid, -% then we return to a two-column page grid in anticipation of the -% upcoming \cmd\clearpage. +% we balance columns by switching to the one-column page grid. % \begin{macrocode} \def\title@column@grid#1{% \minipagefootnote@init \onecolumngrid \begingroup \let\@footnotetext\frontmatter@footnotetext - \let\set@footnotewidth\set@footnotewidth@ii +% \let\set@footnotewidth\set@footnotewidth@two \ltx@no@footnote #1% \endgroup @@ -4133,7 +4380,7 @@ \def\close@column@grid{% \balancelastpage@sw{% \onecolumngrid -% \twocolumngrid +% \twocolumngrid }{}% }% % \end{macrocode} @@ -4149,34 +4396,39 @@ % % Note that we set adornments above and below the \env{widettext}. % These are set as leaders, so they will disappear at a page break. +% \changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}% % \begin{macrocode} \newenvironment{widetext@grid}{% \par\ignorespaces \setbox\widetext@top\vbox{% - \vskip15\p@ +% \vskip15\p@ \hb@xt@\hsize{% \leaders\hrule\hfil \vrule\@height6\p@ }% - \vskip6\p@ +% \vskip6\p@ }% \setbox\widetext@bot\hb@xt@\hsize{% \vrule\@depth6\p@ \leaders\hrule\hfil }% \onecolumngrid + \vskip10\p@ \dimen@\ht\widetext@top\advance\dimen@\dp\widetext@top \cleaders\box\widetext@top\vskip\dimen@ - \let\set@footnotewidth\set@footnotewidth@ii +% \let\set@footnotewidth\set@footnotewidth@two + \vskip6\p@ \prep@math@patch }{% \par + \vskip6\p@ \setbox\widetext@bot\vbox{% \hb@xt@\hsize{\hfil\box\widetext@bot}% - \vskip14\p@ +% \vskip14\p@ }% \dimen@\ht\widetext@bot\advance\dimen@\dp\widetext@bot \cleaders\box\widetext@bot\vskip\dimen@ + \vskip8.5\p@ \twocolumngrid\global\@ignoretrue \@endpetrue }% @@ -4190,6 +4442,13 @@ % \begin{macrocode} \def\set@page@grid{% \twocolumn@sw{% +% \end{macrocode} +% The following two assignments determine what procedures are to be executed when +% the footnote set width is calculated, and how footnotes are to be composed at the bottom of the page. +% A society or journal wishing to do otherwise will override this code. +% \begin{macrocode} + \let\set@footnotewidth\set@footnotewidth@two + \let\compose@footnotes\compose@footnotes@two \let@environment{widetext}{widetext@grid}% \let\title@column\title@column@grid \let\close@column\close@column@grid @@ -4564,7 +4823,7 @@ % % \section{Patches for lineno.sty} % -% The \filename{lineno.sty} package detects the case where the package has been loaded +% The \classname{lineno} package detects the case where the package has been loaded % and the document invokes \cmd\linelabel, but the \cmd\linenumbers\ command has not been % issued: it treats this case as an error. % @@ -4591,7 +4850,7 @@ % If appropriate, enable line numbering within the abstract. % % This mechanism applies generally: -% Create the box in a context in which the meaning of \cmd\par\ has been patched by \filename{lineno.sty}, +% Create the box in a context in which the meaning of \cmd\par\ has been patched by \classname{lineno}, % then \cmd\unvbox\ the box in a context where \cmd\set@linepenalties\ has been executed, and % follow up with \cmd\@linenumberpar, which forces a visit to the output routine just there. % Note that here, we have to de-fang \cmd\@LN@parpgbrk, which would otherwise causes the appearance @@ -4763,26 +5022,26 @@ % Warn if past maturation date. This code to be enabled only in beta software. % \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}% % \changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}% -% \begin{verbatim} -% \def\rtx@fin@year{2010}% -% \def\rtx@fin@month{01}% -% \def\rtx@fin@day{01}% -% \end{verbatim} % \begin{macrocode} -\def\rtx@fin@warn{% - \@ifnum{\rtx@fin@year>\the\year\relax}{\true@sw}{% - \@ifnum{\rtx@fin@month>\the\month\relax}{\true@sw}{% - \@ifnum{\rtx@fin@day>\the\day\relax}{\true@sw}{% - \false@sw +%<*ignore> + \def\rtx@fin@year{2010}% + \def\rtx@fin@month{01}% + \def\rtx@fin@day{01}% + \def\rtx@fin@warn{% + \@ifnum{\rtx@fin@year>\the\year\relax}{\true@sw}{% + \@ifnum{\rtx@fin@month>\the\month\relax}{\true@sw}{% + \@ifnum{\rtx@fin@day>\the\day\relax}{\true@sw}{% + \false@sw + }% }% }% + {% + \class@info{Beta software expires \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; updates available at http://publish.aps.org/revtex4/}% + }{% + \class@warn{Outdated software expired \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; please retrieve an update at http://publish.aps.org/revtex4/}% + }% }% - {% - \class@info{Beta software expires \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; updates available at http://publish.aps.org/revtex4/}% - }{% - \class@warn{Outdated software expired \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; please retrieve an update at http://publish.aps.org/revtex4/}% - }% -}% +% % \end{macrocode} % In shipping (non-beta) software, the following line should be commented out. % \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}% @@ -5166,8 +5425,10 @@ \headsep 16pt % \end{macrocode} % +% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% % \begin{macrocode} \topskip 10pt +\splittopskip\topskip % \end{macrocode} % % \begin{macrocode} @@ -5187,10 +5448,14 @@ \columnseprule 0pt % \end{macrocode} % +% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% % \begin{macrocode} \footnotesep 1pt -\skip\footins 39pt plus 4pt minus 2pt -\def\footnoterule{\kern-19pt\hrule width.5in\kern18.6pt\relax}% +\skip\footins 39pt plus 4pt minus 12pt +\def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\tw@ + \kern-\dimen@\hrule width.5in\kern\dimen@ +}% % \end{macrocode} % % \begin{macrocode} @@ -5519,8 +5784,10 @@ \headsep 25pt % \end{macrocode} % +% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% % \begin{macrocode} \topskip 10pt +\splittopskip\topskip % \end{macrocode} % % \begin{macrocode} @@ -5550,10 +5817,14 @@ \columnseprule 0pt % \end{macrocode} % +% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% % \begin{macrocode} \footnotesep 1pt -\skip\footins 25.25pt plus 4pt minus 2pt -\def\footnoterule{\kern-5.25pt\hrule width.5in\kern4.85pt\relax} +\skip\footins 25.25pt plus 4pt minus 12pt +\def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\f@ur + \kern-\dimen@\hrule width.5in\kern\dimen@ +}% % \end{macrocode} % % \begin{macrocode} @@ -5711,39 +5982,40 @@ % \end{macrocode} % % \subsection{Abbreviations}% +% \changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl} % The following macros constitute typing shortcuts for % certain journal names. % \begin{macrocode} -\def\ao{Appl.\ Opt.\ }% -\def\ap{Appl.\ Phys.\ }% -\def\apl{Appl.\ Phys.\ Lett.\ }% -\def\apj{Astrophys.\ J.\ }% -\def\bell{Bell Syst.\ Tech.\ J.\ }% -\def\jqe{IEEE J.\ Quantum Electron.\ }% -\def\assp{IEEE Trans.\ Acoust.\ Speech Signal Process.\ }% -\def\aprop{IEEE Trans.\ Antennas Propag.\ }% -\def\mtt{IEEE Trans.\ Microwave Theory Tech.\ }% -\def\iovs{Invest.\ Ophthalmol.\ Vis.\ Sci.\ }% -\def\jcp{J.\ Chem.\ Phys.\ }% -\def\jmo{J.\ Mod.\ Opt.\ }% -\def\josa{J.\ Opt.\ Soc.\ Am.\ }% -\def\josaa{J.\ Opt.\ Soc.\ Am.\ A }% -\def\josab{J.\ Opt.\ Soc.\ Am.\ B }% -\def\jpp{J.\ Phys.\ (Paris) }% -\def\nat{Nature (London) }% -\def\oc{Opt.\ Commun.\ }% -\def\ol{Opt.\ Lett.\ }% -\def\pl{Phys.\ Lett.\ }% -\def\pra{Phys.\ Rev.\ A }% -\def\prb{Phys.\ Rev.\ B }% -\def\prc{Phys.\ Rev.\ C }% -\def\prd{Phys.\ Rev.\ D }% -\def\pre{Phys.\ Rev.\ E }% -\def\prl{Phys.\ Rev.\ Lett.\ }% -\def\rmp{Rev.\ Mod.\ Phys.\ }% -\def\pspie{Proc.\ Soc.\ Photo-Opt.\ Instrum.\ Eng.\ }% -\def\sjqe{Sov.\ J.\ Quantum Electron.\ }% -\def\vr{Vision Res.\ }% +\def\ao{Appl.\ Opt.}% +\def\ap{Appl.\ Phys.}% +\def\apl{Appl.\ Phys.\ Lett.}% +\def\apj{Astrophys.\ J.}% +\def\bell{Bell Syst.\ Tech.\ J.}% +\def\jqe{IEEE J.\ Quantum Electron.}% +\def\assp{IEEE Trans.\ Acoust.\ Speech Signal Process.}% +\def\aprop{IEEE Trans.\ Antennas Propag.}% +\def\mtt{IEEE Trans.\ Microwave Theory Tech.}% +\def\iovs{Invest.\ Ophthalmol.\ Vis.\ Sci.}% +\def\jcp{J.\ Chem.\ Phys.}% +\def\jmo{J.\ Mod.\ Opt.}% +\def\josa{J.\ Opt.\ Soc.\ Am.}% +\def\josaa{J.\ Opt.\ Soc.\ Am.\ A}% +\def\josab{J.\ Opt.\ Soc.\ Am.\ B}% +\def\jpp{J.\ Phys.\ (Paris)}% +\def\nat{Nature (London)}% +\def\oc{Opt.\ Commun.}% +\def\ol{Opt.\ Lett.}% +\def\pl{Phys.\ Lett.}% +\def\pra{Phys.\ Rev.\ A}% +\def\prb{Phys.\ Rev.\ B}% +\def\prc{Phys.\ Rev.\ C}% +\def\prd{Phys.\ Rev.\ D}% +\def\pre{Phys.\ Rev.\ E}% +\def\prl{Phys.\ Rev.\ Lett.}% +\def\rmp{Rev.\ Mod.\ Phys.}% +\def\pspie{Proc.\ Soc.\ Photo-Opt.\ Instrum.\ Eng.}% +\def\sjqe{Sov.\ J.\ Quantum Electron.}% +\def\vr{Vision Res.}% % \end{macrocode} % % \subsection{APS Setup}% @@ -5901,7 +6173,12 @@ \def\frontmatter@abstractwidth{\textwidth}% \def\frontmatter@affiliationfont{\it}% \let\section\section@preprintsty +% \end{macrocode} +% The following line of code had been commented out at this point. +% \begin{verbatim} % \let\@hangfrom@section\@hangfrom@section@preprintsty +% \end{verbatim} +% \begin{macrocode} \let\subsection\subsection@preprintsty \let\subsubsection\subsubsection@preprintsty }{% @@ -5925,9 +6202,14 @@ \advance\baselineskip\p@ \parskip11.5\p@\relax \@flushglue\skip@ +% \end{macrocode} +% The following line of code had been commented out at this point. +% \begin{verbatim} %\preprintsty@sw{}{% % \addvspace{0\p@}% %}% +% \end{verbatim} +% \begin{macrocode} }% % \end{macrocode} % \end{macro} @@ -5937,9 +6219,14 @@ % APS Journals have 24 points b-b above an affiliation group. % \begin{macrocode} \def\frontmatter@above@affilgroup{% +% \end{macrocode} +% The following line of code had been commented out at this point. +% \begin{verbatim} %\preprintsty@sw{}{% % \addvspace{11\p@}% %}% +% \end{verbatim} +% \begin{macrocode} }% % \end{macrocode} % \end{macro} @@ -5958,7 +6245,12 @@ }% \def\frontmatter@above@affiliation{% \preprintsty@sw{}{% +% \end{macrocode} +% The following line of code had been commented out at this point. +% \begin{verbatim} % \addvspace{12\p@}% +% \end{verbatim} +% \begin{macrocode} }% }% % \end{macrocode} @@ -6035,7 +6327,12 @@ \def\frontmatter@RRAP@format{% \small \centering +% \end{macrocode} +% The following line of code had been commented out at this point. +% \begin{verbatim} % \preprintsty@sw{}{\parskip.5ex\relax}% +% \end{verbatim} +% \begin{macrocode} \everypar{\hbox\bgroup(\@gobble@leavemode@uppercase}% \def\par{\@ifvmode{}{\unskip)\egroup\@@par}}% }% @@ -6367,10 +6664,9 @@ % % \subsubsection{Default column bottom}% % All APS journal styles have flush bottoms. -% -% APS journals may set with ragged bottoms. +%\changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms} % \begin{macrocode} -\@booleantrue\raggedcolumn@sw +\@booleanfalse\raggedcolumn@sw % \end{macrocode} % % @@ -6398,10 +6694,11 @@ % % % \subsubsection{Footnote formatting}% +% \changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}% % We customize the formatting of footnotes for all APS journals. % \begin{macro}{\@makefntext} % \begin{macrocode} -\def\@makefntext#1{% +\long\def\@makefntext#1{% \def\baselinestretch{1}% \leftskip1em% \parindent1em% @@ -6415,6 +6712,26 @@ }% % \end{macrocode} % \end{macro} +% \begin{macro}{\frontmatter@makefntext} +% We ensure that frontmatter footnotes format similarly to body footnotes. +% But we provide our own hypertext anchor, otherwise not provided. +% \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +% \begin{macrocode} +\long\def\frontmatter@makefntext#1{% + \def\baselinestretch{1}% + \leftskip1em% + \parindent1em% + \noindent + \nobreak\hskip-\leftskip + \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}% + \hb@xt@\leftskip{% + \hss\@makefnmark\ % + }% + #1% + \par +}% +% \end{macrocode} +% \end{macro} % % % \subsubsection{Appendix}% @@ -6449,11 +6766,11 @@ % \end{macro} % % \subsubsection{Bibliography}% +% \changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}% % % Customize \revtex\ for the journal substyle; % this task requires three components: -% the \BibTeX\ \file{apsrev.bst} and \file{apsrmp.bst} style files, -% customizing code for \file{natbib}, and +% the \BibTeX\ \file{apsrev.bst} and \file{apsrmp.bst} style files, and % customizations of the \env{thebibliography} environment. % % \begin{macro}{\@bibstyle} @@ -6470,7 +6787,6 @@ % \def\CandE#1{\item\relax\texttt{#1}---}% % \begin{enumerate} % \QandA{LANGUAGE FIELD}{l}{lang}Use language field to switch hyphenation patterns for title -% \QandA{ANNOTATIONS}{a}{annote}Annotations in \texttt{annote} field or in \file{.tex} file of citekey name % \QandA{PRESENTATIONS}{b}{pres,pres-bf}Presentation, speaker bold face % \QandA{ORDERING OF REFERENCES}{c}{seq-no}Citation order (unsorted, like unsrt.bst) % \QandA{ORDER ON VON PART}{x}{vonx}Sort without von part (de la Maire after Mahone) @@ -6546,7 +6862,7 @@ %\input docstrip %\preamble %---------------------------------------- -%*** REVTeX-compatible Phys Rev 2009-10-08 *** +%*** REVTeX-compatible Phys Rev 2010-02-12 *** %\endpreamble %\postamble %End of customized bst file @@ -6560,10 +6876,11 @@ %\from{photjour.mbs}{\MBopta} %\from{merlin.mbs}{tail,\MBopta}} %\def\MBopta{% +% ay,%: Author-year with some non-standard interface +% nat,%: Natbib for use with natbib v5.3 or later % lang,%: Use language field to switch hyphenation patterns for title -% annote,%: Annotations in annote field or in .tex file of citekey name % pres,pres-bf,%: Presentation, speaker bold face -% seq-no,%: Citation order (unsorted, like unsrt.bst) +% seq-no,%: Citation order (unsorted, only meaningful for numericals) % vonx,%: Sort without von part (de la Maire after Mahone) % nm-init,ed-au,%: Initials + surname (J. F. Smith) % jnrlst,%: Junior comes last as Smith, John, Jr. @@ -6573,7 +6890,10 @@ % nmand-rm,%: `And' in normal font (JONES and JAMES) % lab,lab-def,%: User defined citation font (\citenamefont) % and-rm,%: Cited `and' in normal font -% yr-par,%: Date in parentheses as (May 1993) +% keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0) +% blkyear,%: Missing date left blank +% yr-par,%: Year in parentheses as (1993) +% dtrev,%: Date as year month % date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma) % tit-qq,%: Title and punctuation in double quotes (``Title,'' ..) % inproceedings-chapter,%: produce pages after chapter, just as in InBook @@ -6634,20 +6954,7 @@ %\endbatchfile % \end{verbatim} % -% Note that \file{apsrevlong.dbj} is the same as \file{apsrev.dbj}, except: -% \begin{itemize} -% \item -% Remove \texttt{jtit-x}, \texttt{jpg-1}. This means article titles and full page range. -% \item -% Add \texttt{article-title-o}: article title is not required. -% \item -% Remove \texttt{nm-init}. This means full names. -% \item -% The file to be \cmd\generate d is \filename{apsrev4-1long.bst} instead of \filename{apsrev4-1.bst}. -% \end{itemize} -% -% -% \subsubsection{Comparing apsrev.bst and apsrmp.bst} +% \subsubsection{Comparing apsrev.bst and apsrmp.bst}\label{sec:CompRevRmp} % These two bibliographic styles differ as follows: % \file{apsrev.dbj} has the following guard codes, which \file{apsrmp.dbj} does not: % \begin{itemize} @@ -6655,8 +6962,8 @@ % Citation order (unsorted, like unsrt.bst) % \CandE{nm-init,ed-au}% % Initials + surname (J. F. Smith) -% \CandE{yr-par}% -% Date in parentheses as (May 1993) +% \CandE{blkyear}% +% Missing date left blank % \CandE{date-nil-x}% % If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma) % \CandE{inproceedings-chapter}% @@ -6664,22 +6971,33 @@ % \CandE{techreport-institution-par}% % format tech report institution like book publisher % \CandE{vnum-x}% -% Journal vol, without number as 34 +% Journal vol, without number as `34' % \CandE{pub-date}% % Publisher with address and date in parentheses (Oxford, 1994) % \CandE{pre-pub}% -% Publisher before volume, chapter, pages -% \CandE{pre-pub,pre-edn}% -% Edition, publisher, volume, chapter, pages -% \CandE{url,url-prefix-x}% -% URL without prefix (default: `URL ') +% Edition, publisher, volume, chapter, pages. Note that both use guard code pre-edn. % \end{itemize} % -% To get a banner in the \file{.blg} file, patch by hand into \file{apsrev.bst}: -% \begin{verbatim} -% FUNCTION {banner.log} {"REVTeX-compatible apsrev.bst 9812" warning$} -% \end{verbatim} -% and invoke \texttt{banner.log} from within \texttt{begin.bib} +% \file{apsrmp.dbj} has the following guard codes, which \file{apsrev.dbj} does not: +% \begin{itemize} +% \CandE{nm-rev1}% +% Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones) +% \CandE{dt-beg}% +% Date after authors +% \CandE{vnum-sp}% +% Journal vol (num) as `34 (2)' +% \CandE{pp-last}% +% Pages at end, but before any notes +% \CandE{pub-par}% +% Publisher in parentheses +% \CandE{school-par}% +% School/address in parens: `(school, address)' +% \CandE{bkedcap}% +% `Name Editor,' as above, editor upper case +% \CandE{and-com}% +% Comma even with 2 authors as `Tom, and Harry' +% +% \end{itemize} % % We ensure that the journal substyle has the first word % in the matter by installing the (default) APS code @@ -7048,6 +7366,11 @@ % \begin{macrocode} \rtx@apsprb % \end{macrocode} +% Per Mark Doyle (2009-12-22), the default is longbibliography. +% \changes{4.1n}{2010/01/04}{(AO, 575) the default for journal prstper is longbibliography}% +% \begin{macrocode} + \@booleantrue\longbibliography@sw +% \end{macrocode} % % ``Section heads are bold, centered (Roman numeral, Latin letter)'' % @@ -7079,6 +7402,46 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@bibdataout@init} +% \begin{macro}{\@bibdataout@aps} +% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}% +% Procedure \cmd\@bibdataout@aps\ has the job of writing the control record into the +% job's \cmd\jobname\filename{.bib} file, where it will adjust the options to \filename{.bst} processing. +% It is installed into the initialization procedure \cmd\@bibdataout@init, and its meaning +% is set by the society (APS) and journal. +% For all but RMP, we select the Physical Review style. +% For the latter case, we change the meaning, per the code in \file{apsrmp.rtx}. +% +% \begin{macrocode} +\appdef\@bibdataout@rev{\@bibdataout@aps}% +\def\@bibdataout@aps{% + \immediate\write\@bibdataout{% +% \end{macrocode} +% An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}. +% \begin{macrocode} + @CONTROL{% + apsrev41Control% +% \end{macrocode} +% Say whether we want long bibliography style (the default), or the abbreviated style. +% \begin{macrocode} + \longbibliography@sw{% + ,author="00",editor="1",pages="1",title="0",year="0"% + }{% + ,author="08",editor="1",pages="0",title="",year="1"% + }% + }% + }% +% \end{macrocode} +% Place a \cmd\citation\ into the auxiliary file corresponding to this entry. +% \begin{macrocode} + \if@filesw + \immediate\write\@auxout{\string\citation{apsrev41Control}}% + \fi +}% +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \begin{macro}{\place@bibnumber} % \begin{macro}{\@bibstyle} % We install code that will select the presentation for \cmd\bibitem s @@ -7086,12 +7449,14 @@ % \begin{macrocode} \let\place@bibnumber\place@bibnumber@inl \def\@bibstyle{apsrev\substyle@post}% -\appdef\setup@hook{% - \longbibliography@sw{% - \appdef\@bibstyle{long}% - }{}% -}% % \end{macrocode} +% \begin{verbatim} +%\appdef\setup@hook{% +% \longbibliography@sw{% +% \appdef\@bibstyle{long}% +% }{}% +%}% +% \end{verbatim} % \end{macro} % \end{macro} % @@ -7361,10 +7726,14 @@ % \end{macrocode} % % Footnote mods: +% \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% % \begin{macrocode} \footnotesep 9.25pt - \skip\footins 36pt plus 4pt minus 2pt - \def\footnoterule{\kern-13pt\hrule width.5in\kern15.6pt\relax}% + \skip\footins 36pt plus 4pt minus 12pt + \def\footnoterule{% + \dimen@\skip\footins\divide\dimen@\thr@@ + \kern-\dimen@\hrule width.5in\kern\dimen@ + }% % \end{macrocode} % % @@ -7533,7 +7902,6 @@ % \QandA{STYLE OF CITATIONS}{a}{ay}Author-year with some non-standard interface % \QandA{AUTHOR}{*}{nat}Natbib for use with natbib v5.3 or later % \QandA{LANGUAGE FIELD}{l}{lang}Use language field to switch hyphenation patterns for title -% \QandA{ANNOTATIONS}{a}{annote}Annotations in annote field or in .tex file of citekey name % \QandA{PRESENTATIONS}{b}{pres,pres-bf}Presentation, speaker bold face % \QandA{ORDER ON VON PART }{x}{vonx}Sort without von part (de la Maire after Mahone) % \QandA{AUTHOR NAMES}{a}{nm-rev1}Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones) @@ -7611,7 +7979,7 @@ %\input docstrip %\preamble %---------------------------------------- -%*** REVTeX-compatible RMP 2009-10-08 *** +%*** REVTeX-compatible RMP 2010-02-12 *** %\endpreamble %\postamble %End of customized bst file @@ -7628,7 +7996,6 @@ % ay,%: Author-year with some non-standard interface % nat,%: Natbib for use with natbib v5.3 or later % lang,%: Use language field to switch hyphenation patterns for title -% annote,%: Annotations in annote field or in .tex file of citekey name % pres,pres-bf,%: Presentation, speaker bold face % vonx,%: Sort without von part (de la Maire after Mahone) % nm-rev1,%: Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones) @@ -7641,11 +8008,9 @@ % and-rm,%: Cited `and' in normal font % keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0) % dt-beg,%: Date after authors -% yr-com,%: Date preceded by comma as `, 1993' -% aymth,%: Include month in date +% yr-par,%: Year in parentheses as (1993) % dtrev,%: Date as year month % date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma) -% note-yr,%: Year text full as 1990--1993 or `in press' % tit-qq,%: Title and punctuation in double quotes (``Title,'' ..) % inproceedings-chapter,%: produce pages after chapter, just as in InBook % jtit-x,%: Title is ignored @@ -7709,52 +8074,7 @@ %\endbatchfile % \end{verbatim} % -% Note that \file{apsrmplong.dbj} is the same as \file{apsrmp.dbj}, except: -% \begin{itemize} -% \item -% Remove \texttt{jtit-x}, \texttt{jpg-1}. This means article titles and full page range. -% \item -% Add \texttt{article-title-o}: article title is optional. -% \item -% Remove \texttt{nm-rev1}, remove \texttt{nm-revv1}. This means full author names. -% \end{itemize} -% -% \subsubsection{Comparing apsrev.bst and apsrmp.bst} -% These two bibliographic styles differ as follows: -% \file{apsrmp.dbj} has the following guard codes, which \file{apsrev.dbj} does not: -% \begin{itemize} -% \CandE{ay}% -% Author-year with some non-standard interface -% \CandE{nat}% -% Natbib for use with natbib v5.3 or later -% \CandE{nm-rev1}% -% Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones) -% \CandE{keyxyr}% -% Year blank when KEY replaces missing author (for natbib 7.0) -% \CandE{dt-beg}% -% Date after authors -% \CandE{yr-com}% -% Date preceded by comma as `, 1993' -% \CandE{aymth}% -% Include month in date -% \CandE{dtrev}% -% Date as year month -% \CandE{note-yr}% -% Year text full as 1990--1993 or `in press' -% \CandE{vnum-sp}% -% Journal vol (num) as 34 (2) -% \CandE{pp-last}% -% Pages at end but before any notes -% \CandE{pub-par}% -% Publisher in parentheses -% \CandE{school-par}% -% school/address in parens: `(school, address)' -% \CandE{bkedcap}% -% `Name Editor,' as above, editor upper case -% \CandE{and-com}% -% Comma even with 2 authors as `Tom, and Harry' -% \end{itemize} -% +% For a comparison between apsrmp.bst and apsrev.bst, see Section~\ref{sec:CompRevRmp}. % % \changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}} % \begin{macrocode} @@ -7770,11 +8090,36 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\cite} -% Per Mark Doyle, \cmd\cite\ is mapped to \cmd\citep\ in RMP. -% +% \begin{macro}{\@bibdataout@rmp} +% \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}% +% When the journal is RMP, the meaning of the procedure \cmd\@bibdataout@aps\ needs to be different +% because of the way the author names are formatted. In other respects, it is the same. +% \begin{macrocode} +\def\@bibdataout@aps{% + \immediate\write\@bibdataout{% +% \end{macrocode} +% An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}. +% This entry's cite key is \texttt{apsrmp41Control}, which serves as a version number. % \begin{macrocode} -\let\cite\citep + @CONTROL{% + apsrmp41Control% +% \end{macrocode} +% Say whether we want long bibliography style (the default), or the abbreviated style. +% \begin{macrocode} + \longbibliography@sw{% + ,author="03",editor="0",pages="1",title="0",year="0"% + }{% + ,author="0B",editor="0",pages="0",title="",year="1"% + }% + }% + }% +% \end{macrocode} +% Place a \cmd\citation\ into the auxiliary file corresponding to this entry. +% \begin{macrocode} + \if@filesw + \immediate\write\@auxout{\string\citation{apsrmp41Control}}% + \fi +}% % \end{macrocode} % \end{macro} % @@ -7784,6 +8129,7 @@ % \begin{macro}{\newblock} % \begin{macro}{\bibhang} % \begin{macro}{\bibsep} +% \begin{macro}{\cite} % The following commands effectively establish the style in which \cmd\cite\ commands are % formatted. % You can think of them as the second needed component for the bibliography. @@ -7817,7 +8163,9 @@ % We define the punctuation to use in the \cmd\cite\ command's production. % % \begin{macrocode} - \bibpunct{(}{)}{;}{a}{,}{,}% + \bibpunct{(%) + }{%( + )}{;}{a}{,}{,}% % \end{macrocode} % % We define the sectioning command to use when starting the bibliography. @@ -7831,6 +8179,16 @@ \def\newblock{\ }% \bibhang10\p@ \bibsep\z@ +% \end{macrocode} +% +% Per Mark Doyle, \cmd\cite\ is mapped to \cmd\citep\ in RMP. +% \changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads} +% \begin{macrocode} + \let\cite\citep +% \end{macrocode} +% +% End of code to be delayed until after \classname{natbib} loads. +% \begin{macrocode} }% % \end{macrocode} % \end{macro} @@ -7839,6 +8197,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\footinbib@sw} % Footnotes in bibliography are consistent only with numbered citations, only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/bibtex/bst/revtex/apsrev4-1.bst +++ texlive-extra-2009/texmf-dist/bibtex/bst/revtex/apsrev4-1.bst @@ -4,13 +4,13 @@ %% %% The original source files were: %% -%% merlin.mbs (with options: `head,lang,annote,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% physjour.mbs (with options: `lang,annote,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% geojour.mbs (with options: `lang,annote,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% photjour.mbs (with options: `lang,annote,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% merlin.mbs (with options: `tail,lang,annote,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,blkyear,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') %% ---------------------------------------- -%% *** REVTeX-compatible Phys Rev 2009-10-08 *** +%% *** REVTeX-compatible Phys Rev 2010-07-25 *** %% %% Copyright 1994-2007 Patrick W Daly % =============================================================== @@ -24,27 +24,40 @@ % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2008/01/17 4.21 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in ENGLISH - % This is a numerical citation style, and as such is standard LaTeX. - % It requires no extra package to interface to the main text. + % This is an author-year citation style bibliography. As such, it is + % non-standard LaTeX, and requires a special package file to function properly. + % Such a package is natbib.sty by Patrick W. Daly % The form of the \bibitem entries is - % \bibitem{key}... - % Usage of \cite is as follows: - % \cite{key} ==>> [#] - % \cite[chap. 2]{key} ==>> [#, chap. 2] - % where # is a number determined by the ordering in the reference list. - % The order in the reference list is that by which the works were originally - % cited in the text, or that in the database. + % \bibitem[Jones et al.(1990)]{key}... + % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... + % The essential feature is that the label (the part in brackets) consists + % of the author names, as they should appear in the citation, with the year + % in parentheses following. There must be no space before the opening + % parenthesis! + % With natbib v5.3, a full list of authors may also follow the year. + % In natbib.sty, it is possible to define the type of enclosures that is + % really wanted (brackets or parentheses), but in either case, there must + % be parentheses in the label. + % The \cite command functions as follows: + % \citet{key} ==>> Jones et al. (1990) + % \citet*{key} ==>> Jones, Baker, and Smith (1990) + % \citep{key} ==>> (Jones et al., 1990) + % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) + % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) + % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) + % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32) + % \citeauthor{key} ==>> Jones et al. + % \citeauthor*{key} ==>> Jones, Baker, and Smith + % \citeyear{key} ==>> 1990 %--------------------------------------------------------------------- -FUNCTION {id.bst} {"Merlin.mbs v4.21 2009-07-09. "} +FUNCTION {id.bst} {"merlin.mbs apsrev4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"} ENTRY { address - annote archive archivePrefix author @@ -83,6 +96,8 @@ }{ }{ label + extra.label sort.label + short.list } INTEGERS @@ -98,6 +113,7 @@ } STRINGS { bibfield output.bibfield } + FUNCTION {not} { { #0 } { #1 } @@ -122,6 +138,399 @@ #-1 #1 substring$ "." = } +INTEGERS { arith.mulitplier arith.multiplicand } + +FUNCTION {multiply} +{ + 'arith.multiplicand := + 'arith.mulitplier := + #0 + { arith.mulitplier #0 > } + { arith.multiplicand + + arith.mulitplier #1 - 'arith.mulitplier := + } + while$ +} + +FUNCTION {chr.to.hex} +{ + chr.to.int$ + duplicate$ "0" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #9 > or not + { swap$ pop$ } + { pop$ + duplicate$ "A" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + duplicate$ "a" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + pop$ #-1 + } + if$ + } + if$ + } + if$ +} + +INTEGERS { arith.accumulator } + +FUNCTION {str.to.hex} +{ #0 'arith.accumulator := + { duplicate$ empty$ not } + { duplicate$ #1 #1 substring$ chr.to.hex + duplicate$ #0 < + { pop$ pop$ "" + } + { arith.accumulator #16 multiply + 'arith.accumulator := + #2 global.max$ substring$ + } + if$ + } + while$ + pop$ arith.accumulator +} + +FUNCTION {diagn.cmntlog} +{ + duplicate$ top$ "%" swap$ * write$ newline$ +} + +INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year } + +INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed } + +FUNCTION { control.init } +{ + #0 + 'control.key := + #0 + #8 + + #64 + + 'control.author := + #1 + 'control.author.jnrlst := + #0 + 'control.author.dotless := + #0 + 'control.author.nospace := + #1 + 'control.author.initials := + #0 + 'control.author.nocomma := + #0 + 'control.author.first := + #0 + 'control.author.reversed := + #1 + 'control.editor := + #-1 + 'control.title := + #0 + 'control.pages := + #0 + 'control.eprint := + #1 + 'control.year := +} + +FUNCTION {warning.dependency} +{ + " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$ +} + +FUNCTION {control.check} +{ + control.editor + { + "editor formatted same as author" + control.author.reversed { + duplicate$ #0 swap$ "reversed" warning.dependency + #0 'control.author.reversed := + } 'skip$ if$ + control.author.first { + duplicate$ #0 swap$ "first" warning.dependency + #0 'control.author.first := + } 'skip$ if$ + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + pop$ + } 'skip$ if$ + control.author.reversed 'skip$ + { + "not reversed" + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.jnrlst 'skip$ { + duplicate$ #1 swap$ "jnrlst" warning.dependency + #1 'control.author.jnrlst := + } if$ + control.author.initials { + duplicate$ ", initials" * + control.author.dotless { + duplicate$ #0 swap$ "dotless" warning.dependency + #0 'control.author.dotless := + } 'skip$ if$ + pop$ + } 'skip$ if$ + pop$ + } + if$ + control.author.initials 'skip$ { + "not initials" + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.dotless 'skip$ { + duplicate$ #1 swap$ "dotless" warning.dependency + #1 'control.author.dotless := + } if$ + pop$ + } if$ +} + +FUNCTION {control.parse} +{ + duplicate$ duplicate$ missing$ + { + pop$ pop$ pop$ + } + { empty$ + { + pop$ #-1 + }{ + str.to.hex + } + if$ + swap$ := + } + if$ +} + +FUNCTION {control.dump} +{ + duplicate$ missing$ { pop$ "N/A" } 'skip$ if$ + "{" swap$ * "}, " * + * +} + +INTEGERS { decode.threshold } + +FUNCTION {control.decode} +{ + - duplicate$ + #0 < + { + skip$ pop$ swap$ #0 + } + { + swap$ pop$ swap$ #1 + } + if$ + swap$ := +} + +FUNCTION {control.author.decode} +{ + control.author + duplicate$ duplicate$ #0 < swap$ #128 < not or + { + int.to.str$ "(" swap$ * ")" * + "Control cannot interpret author " swap$ * + warning$ + }{ + 'control.author.jnrlst swap$ duplicate$ #64 control.decode + 'control.author.dotless swap$ duplicate$ #32 control.decode + 'control.author.nospace swap$ duplicate$ #16 control.decode + 'control.author.initials swap$ duplicate$ #8 control.decode + 'control.author.nocomma swap$ duplicate$ #4 control.decode + 'control.author.first swap$ duplicate$ #2 control.decode + 'control.author.reversed swap$ duplicate$ #1 control.decode + duplicate$ #0 = + 'skip$ + { + "Control: residue of author" + "(" swap$ * ")" * * + warning$ + } + if$ + pop$ + } + if$ +} + +FUNCTION {control.setup} +{ + type$ cite$ "{" swap$ * "}, " * * + "control.key" key control.dump * + "control.author" author control.dump * + "control.editor" editor control.dump * + "control.title" title control.dump * + "control.pages" pages control.dump * + "control.year" year control.dump * + "control.eprint" eprint control.dump * + top$ + 'control.key key control.parse + 'control.author author control.parse + 'control.editor editor control.parse + 'control.title title control.parse + 'control.pages pages control.parse + 'control.year year control.parse + 'control.eprint eprint control.parse + control.author.decode +} + +FUNCTION {control.pass} +{ type$ "control" = 'control.setup 'skip$ if$ +} + +FUNCTION {control.presort} +{ +} + +FUNCTION {control.forward} +{ +} + +FUNCTION {control.reverse} +{ +} + +FUNCTION {control.sort} +{ +} + +FUNCTION {control.longest.label} +{ +} + +FUNCTION {control.key.bib} +{ + "Control: key " + control.key + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + pop$ * + diagn.cmntlog +} + +FUNCTION {control.author.bib} +{ + "Control: author " + control.author "(" swap$ int.to.str$ * ")" * * + control.author.reversed { " reversed" * }{} if$ + control.author.first { " first" * }{} if$ + control.author.nocomma { " nocomma" * }{} if$ + control.author.initials { " initials" * }{} if$ + control.author.nospace { " nospace" * }{} if$ + control.author.dotless { " dotless" * }{} if$ + control.author.jnrlst { " jnrlst" * }{} if$ + diagn.cmntlog +} + +FUNCTION {control.editor.bib} +{ + "Control: editor formatted " + control.editor + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "identically to author" + } { + "differently from author" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.title.bib} +{ + "Control: production of article title " + control.title + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled" + } { + #0 > { + "required" + } { + "allowed" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.pages.bib} +{ + "Control: page " + control.pages + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "none" + } { + #0 > { + "range" + } { + "single" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.year.bib} +{ + "Control: year " + control.year + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "truncated" + } { + "verbatim" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.eprint.bib} +{ + "Control: production of eprint " + control.eprint + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + #0 < { "disabled" } { "enabled" } if$ * * + diagn.cmntlog +} + +FUNCTION {control.bib} +{ + control.key.bib + control.author.bib + control.editor.bib + control.title.bib + control.pages.bib + control.year.bib + control.eprint.bib +} + FUNCTION {init.state.consts} { #0 'before.all := @@ -166,7 +575,7 @@ duplicate$ "2(" swap$ * ")" * top$ } -FUNCTION {bibfield.command}{ "\bibfield"} +FUNCTION {bibfield.command}{ "\bibfield "} FUNCTION {output.nonnull} { @@ -196,9 +605,7 @@ output.bibfield duplicate$ empty$ 'pop$ { bibfield.command - "{" * swap$ * "}{%" * write$ newline$ - " " swap$ * "}%" * write$ newline$ - " " + " {" * swap$ * "} {" * swap$ * "}" * } if$ write$ @@ -229,6 +636,12 @@ if$ } +FUNCTION {output.nopunct} +{ + punctuation.no 'punctuation.state := + output.nonnull +} + FUNCTION {output.check} { swap$ duplicate$ empty$ @@ -237,9 +650,9 @@ if$ } -FUNCTION {bbl.open} { "\BibitemOpen" } +FUNCTION {bbl.open} { "\BibitemOpen " } -FUNCTION {bbl.shut} { "\BibitemShut" } +FUNCTION {bbl.shut} { "\BibitemShut " } FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * } @@ -276,18 +689,7 @@ FUNCTION {fin.entry} { - non.stop swap$ - "%" * write$ newline$ - { "{NoStop}" } - { "{Stop}" } - if$ - annote missing$ - { - " \bibAnnoteFile" swap$ * "{" * cite$ * "}%" * - }{ - " \bibAnnote" swap$ * "{" * cite$ * "}{" * annote * add.period$ "}%" * - } - if$ + bibitem.shut write$ output.SLACcitation } @@ -327,7 +729,7 @@ FUNCTION {no.blank.or.punct} { - "\hspace{0pt}" * + "\hspace {0pt}" * before.all 'output.state := } @@ -337,11 +739,21 @@ skip$ } -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ +STRINGS {z} +FUNCTION {remove.dots} +{ + control.author.dotless { + 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ + } 'skip$ if$ } FUNCTION {new.block.checkb} @@ -353,22 +765,6 @@ if$ } -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} - FUNCTION {field.or.null} { duplicate$ empty$ { pop$ "" } @@ -381,7 +777,7 @@ duplicate$ empty$ { pop$ "" } { - "\emph{" swap$ * "}" * + "\emph {" swap$ * "}" * } if$ } @@ -389,7 +785,7 @@ FUNCTION {bolden} { duplicate$ empty$ { pop$ "" } - { "\textbf{" swap$ * "}" * } + { "\textbf {" swap$ * "}" * } if$ } @@ -398,7 +794,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibnamefont{" swap$ * "}" * + "\bibnamefont {" swap$ * "}" * } if$ } @@ -408,7 +804,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibfnamefont{" swap$ * "}" * + "\bibfnamefont {" swap$ * "}" * } if$ } @@ -418,7 +814,7 @@ duplicate$ empty$ { pop$ "" } { - "\citenamefont{" swap$ * "}" * + "\citenamefont {" swap$ * "}" * } if$ } @@ -442,6 +838,7 @@ % Here are the language-specific definitions for explicit words. % Each function has a name bbl.xxx where xxx is the English word. % The language selected here is ENGLISH + FUNCTION {bbl.and} { "and" @@ -581,7 +978,7 @@ FUNCTION {bbl.url.prefix} { - "\urlprefix" + "\urlprefix " } FUNCTION {eng.ord} @@ -893,7 +1290,7 @@ MACRO {tcs} {"Theor. Comput. Sci."} -FUNCTION {bibinfo.command} { "\bibinfo" } +FUNCTION {bibinfo.command} { "\bibinfo " } FUNCTION {bibinfo.check} { swap$ @@ -907,7 +1304,7 @@ swap$ pop$ }{ swap$ - bibinfo.command " {" * swap$ * "} {" * swap$ * "}" * + bibinfo.command "{" * swap$ * "} {" * swap$ * "}" * } if$ } @@ -945,11 +1342,14 @@ FUNCTION {eprint.command} { - "\Eprint" + "\Eprint " } FUNCTION {format.eprint} -{ eprint duplicate$ empty$ +{ + eprint duplicate$ empty$ + control.eprint #0 < + or { pop$ "" } { duplicate$ @@ -957,13 +1357,13 @@ archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ * "/" * swap$ * - "{" swap$ * "}" * + "{" swap$ * "} " * swap$ "" archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ * swap$ * primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ * - "{" swap$ * "}" * + "{" swap$ * "} " * * eprint.command swap$ * } @@ -985,7 +1385,7 @@ url duplicate$ empty$ { pop$ "" } { - "\url" + "\url " "{" * swap$ * "}" * } if$ @@ -1008,75 +1408,348 @@ STRINGS { bibinfo} +FUNCTION {format.names.fname} +{ + control.author.initials { + control.author.dotless { + control.author.nospace { + "f{}" + } { + "f{~}" + } if$ + } { + control.author.nospace { + "f{.}." + } { + "f." + } if$ + } if$ + } { + "ff" + } if$ +} + +FUNCTION {bracify} +{ + "{" swap$ * "}" * +} + +FUNCTION {name.comma} +{ + control.author.nocomma 'skip$ { "," swap$ * } if$ +} + +FUNCTION {format.names.format.onefont} +{ + "{vv~}{ll}" + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + control.author.initials { + "f" + control.author.dotless 'skip$ { + "." * + } if$ + "~" * + } { + "ff" + } if$ + bracify + swap$ + } { + format.names.fname + " " swap$ * + name.comma + bracify + } + if$ + "jj" + " " swap$ * + name.comma + bracify + control.author.jnrlst 'skip$ 'swap$ if$ + * * +} + +FUNCTION {format.names.onefont} +{ + s nameptr format.names.format.onefont format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.morfont} +{ s nameptr + "{vv~}{ll}" format.name$ bib.name.font + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + s nameptr + control.author.initials { + "f" % default: name + surname + comma junior + } { + "ff" + } if$ + control.author.dotless 'skip$ { + "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials + } if$ + bracify + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + swap$ + * + s nameptr + "{jj}" format.name$ duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } { + "," * + s nameptr + format.names.fname + "jj" + " " + name.comma + control.author.jnrlst { + swap$ * skip$ + } { + skip$ * swap$ + } if$ + bracify swap$ bracify swap$ + * + format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } if$ + * +} + +FUNCTION {names.punctuate} +{ + "," * + " " * +} + FUNCTION {format.names} { 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f.}" format.name$ duplicate$ empty$ 'skip$ + duplicate$ empty$ { pop$ "" } { + duplicate$ num.names$ + duplicate$ 'numnames := + 'namesleft := + 's := + #1 'nameptr := + "" + { namesleft #0 > } + { + format.names.morfont + bibinfo bibinfo.check + type$ "presentation" = + 'check.speaker + 'skip$ + if$ + 't := + nameptr #1 > not + { + t * + } { + namesleft #1 > + { + names.punctuate + t * + } { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * + bbl.etal + emphasize + * + } { + bbl.and + space.word * + t * + } + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} + +FUNCTION {format.names.ed.onefont} +{ + s nameptr + control.author.initials { + control.author.dotless { + control.author.nospace { + "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx + } { + "{f{~}~}{vv~}{ll}{ jj}" % nm-rv + } if$ + } { + control.author.nospace { + "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc + }{ + "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1 + } if$ + } if$ + } { + "{ff~}{vv~}{ll}{, jj}" + } if$ + format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.ed.morfont} +{ + control.author.reversed { % + control.author.initials { % + control.author.dotless { % + s nameptr + control.author.nospace { % nm-rvx nm-rvcx + "{f{}}" + } { % nm-rv + "{f{~}}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } { % !control.author.dotless + s nameptr + control.author.nospace { % nm-rvv + "{ff}" + } { % nm-rev nm-rev1 + "{f.}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } if$ + } { % Full names !control.author.initials nm-revf nm-revv1 + s nameptr + "{ff}" + format.name$ duplicate$ empty$ 'skip$ { tie.or.space.prefix bib.fname.font swap$ * } if$ s nameptr "{vv~}{ll}" format.name$ bib.name.font * s nameptr - "{jj}" format.name$ duplicate$ empty$ 'skip$ + "{jj}" format.name$ + duplicate$ empty$ 'skip$ { bib.fname.font ", " swap$ * } if$ - * - bibinfo bibinfo.check - type$ "presentation" = - { check.speaker } - 'skip$ - if$ - 't := - nameptr #1 > - { - namesleft #1 > - { - ", " * - t * - }{ - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - numnames #2 > - { - "," * - } - 'skip$ - if$ - t "others" = - { - " " * bbl.etal - emphasize - * - }{ - bbl.and - space.word * - t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ + } if$ + } { % !control.author.reversed nm-init + s nameptr + "{f.}" + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ } if$ + * } FUNCTION {format.names.ed} { - format.names + control.editor #0 > { + format.names + } { + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.names.ed.morfont + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { + names.punctuate + t * + }{ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * bbl.etal emphasize * + }{ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ + } if$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ } FUNCTION {format.authors} @@ -1107,25 +1780,12 @@ if$ } -FUNCTION {format.isbn} +FUNCTION {format.isbn.output} { - isbn "isbn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISBN " swap$ * - } - if$ } -FUNCTION {format.issn} -{ issn "issn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISSN " swap$ * - } - if$ +FUNCTION {format.issn.output} +{ } FUNCTION {doi.base} @@ -1133,41 +1793,60 @@ "http://dx.doi.org/" } -FUNCTION {doi.command} +FUNCTION {doi.base.command} { - "\doi" + "\doibase " } -FUNCTION {doi.command.href} +FUNCTION {noop.command} { - "\Doi" + "\href@noop " } -FUNCTION {format.doi} -{ doi "doi" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - doi.command "{" * swap$ * "}" * - } - if$ +FUNCTION {href.command} +{ + "\href " } -FUNCTION {add.doi} +FUNCTION {link.tag.open} { - duplicate$ empty$ 'skip$ + doi duplicate$ empty$ { - doi duplicate$ empty$ 'pop$ + pop$ + url duplicate$ empty$ { - "{" swap$ * "}" * - swap$ - "{" swap$ * "}" * - * - doi.command.href swap$ * + pop$ "" noop.command + }{ + href.command } if$ } + { + doi.base.command swap$ * + href.command + } if$ + "{" * swap$ * "} {" * +} + +FUNCTION {link.tag.shut} +{ + "}" +} + +FUNCTION {link.open} +{ + link.tag.open output.nopunct +} + +FUNCTION {link.shut} +{ + link.tag.shut * +} + +FUNCTION {add.doi} +{ + link.tag.open swap$ * link.tag.shut * } FUNCTION {select.language} @@ -1202,7 +1881,7 @@ FUNCTION {bbl.enquote} { - "\enquote" + "\enquote " } FUNCTION {string.enquote} @@ -1210,7 +1889,7 @@ punctuation.no 'punctuation.state := non.stop { block.punctuation - } { "." } if$ + } { "" } if$ swap$ pop$ * bbl.enquote "{" * swap$ * "}" * @@ -1237,22 +1916,105 @@ if$ } +FUNCTION {format.name.apply} +{ + s nameptr + "{vv~}{ll}" + format.name$ + cite.name.font +} + +FUNCTION {format.full.names} +{ + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { format.name.apply + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { + 't := + } + 'pop$ + if$ + t "others" = + { + " " * bbl.etal + emphasize * + }{ + numnames #2 > { "," * }{ skip$ } if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {make.full.names} +{ + key editor author + type$ "proceedings" = + type$ "book" = + type$ "inbook" = + or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$ + duplicate$ empty$ + { pop$ + duplicate$ empty$ + { pop$ + duplicate$ empty$ + { pop$ + cite$ #1 #3 substring$ + }{ + skip$ + } + if$ + } + { swap$ pop$ format.full.names } + if$ + } + { swap$ pop$ swap$ pop$ format.full.names } + if$ +} + FUNCTION {year.bibitem} { year duplicate$ empty$ { pop$ "" - "????" * }{ skip$ } if$ + extra.label * } FUNCTION {output.bibitem} { newline$ "" - "{" * cite$ * "}%" * - "\bibitem" + label + * ")" * + make.full.names duplicate$ short.list = + { pop$ }{ * } if$ + bracify + "[" swap$ * "]" * + cite$ bracify "%" * + * + "\bibitem " swap$ * write$ newline$ " " @@ -1306,23 +2068,12 @@ FUNCTION {format.date} { - month "month" bibinfo.check - duplicate$ empty$ - year "year" bibinfo.check duplicate$ empty$ - { swap$ 'skip$ - { "there's a month but no year in " cite$ * warning$ } - if$ - * - }{ - swap$ 'skip$ - { - swap$ - word.space * swap$ - } - if$ - * + year "year" bibinfo.check duplicate$ empty$ + { } + 'skip$ if$ + extra.label * date.encapsulate } @@ -1334,7 +2085,7 @@ FUNCTION {format.date.output} { - format.date output + format.date.output.check } FUNCTION {format.btitle} @@ -1559,7 +2310,16 @@ { pop$ pop$ format.pages } { volnum.punct * swap$ - first.page + control.pages duplicate$ #0 < { + pop$ pop$ + }{ + #0 > + { + n.dashify + }{ + first.page + } if$ + } if$ "pages" bibinfo.check * } @@ -1590,7 +2350,6 @@ FUNCTION {format.ser.vol.num} { series "series" bibinfo.check output - after.punctuation 'output.state := volume field.or.null duplicate$ empty$ 'skip$ { @@ -1665,7 +2424,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1679,7 +2438,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1691,15 +2450,6 @@ if$ } -FUNCTION {empty.misc.check} -{ author empty$ title empty$ howpublished empty$ - month empty$ year empty$ note empty$ - and and and and and - { "all relevant fields are empty in " cite$ * warning$ } - 'skip$ - if$ -} - FUNCTION {format.thesis.type} { type duplicate$ empty$ 'pop$ @@ -1724,52 +2474,10 @@ FUNCTION {format.article.crossref} { - key duplicate$ empty$ - { pop$ - journal duplicate$ empty$ - { "need key or journal for " cite$ * " to crossref " * crossref * warning$ } - { "journal" bibinfo.check emphasize word.in swap$ * } - if$ - } - { word.in swap$ * word.space *} - if$ + word.in " \cite{" * crossref * "}" * } -FUNCTION {format.crossref.editor} -{ editor #1 "{vv~}{ll}" format.name$ - bib.name.font - "editor" bibinfo.check - editor num.names$ duplicate$ - #2 > - { pop$ - "editor" bibinfo.check - word.space * bbl.etal - emphasize - * - } - { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { - "editor" bibinfo.check - word.space * bbl.etal - emphasize - * - }{ - bbl.and space.word - * editor #2 "{vv~}{ll}" format.name$ - bib.name.font - "editor" bibinfo.check - * - } - if$ - } - if$ - } - if$ -} - FUNCTION {format.book.crossref} { volume duplicate$ empty$ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ @@ -1779,44 +2487,12 @@ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * } if$ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { series emphasize * } - if$ - } - { key * } - if$ - } - { format.crossref.editor * } - if$ " \cite{" * crossref * "}" * } FUNCTION {format.incoll.inproc.crossref} { - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { format.booktitle duplicate$ empty$ - { "need editor, key, or booktitle for " cite$ * " to crossref " * - crossref * warning$ - } - { word.in swap$ * } - if$ - } - { word.in key * word.space *} - if$ - } - { word.in format.crossref.editor * word.space *} - if$ + word.in " \cite{" * crossref * "}" * } @@ -1904,39 +2580,63 @@ output } +FUNCTION {article.title.produce} +{ + control.title duplicate$ #0 < + { pop$ + }{ + format.title + "title" 'bibfield := + swap$ #0 > + { + "title" output.check + }{ + output + } if$ + new.block.comma + } if$ +} + +FUNCTION {control} +{ +} + FUNCTION {article} { output.bibitem format.authors booktitle empty$ { "author" output.check }{ output } if$ + author format.key output new.block.comma + article.title.produce output.article.booktitle crossref missing$ { + link.open journal "journal" bibinfo.warn - pages empty$ 'skip$ { add.doi } if$ "journal" 'bibfield := output + add.blank format.ser.vol.num output eid.or.pages format.date.output.check + pages empty$ { + doi output + } 'skip$ if$ + link.shut }{ format.article.crossref output.nonnull format.pages output } if$ - format.issn output - pages empty$ { - format.doi output - } 'skip$ if$ + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output format.translation output fin.entry } @@ -1945,24 +2645,28 @@ { output.bibitem author empty$ { + format.editors "author and editor" output.check + editor format.key output }{ format.authors output.nonnull - crossref missing$ { editor.check.book } 'skip$ if$ +% crossref missing$ { editor.check.book } 'skip$ if$ } if$ new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut format.edition output author empty$ { - format.editor.in output } { + format.editor.in output + editor format.key output } if$ - format.number.series output + format.number.series output crossref missing$ { format.bvolume output @@ -1974,35 +2678,41 @@ format.date.output.check } if$ - format.isbn output - format.chapter.pages - output + format.isbn.output + format.chapter.pages + output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {booklet} { output.bibitem format.authors output + author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output format.date.output - format.isbn output + format.isbn.output format.book.pages output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output + fin.entry +} + +FUNCTION {footnote} +{ output.bibitem + format.note output fin.entry } @@ -2011,8 +2721,10 @@ author empty$ { format.editors "editor" output.check + editor format.key output }{ format.authors output.nonnull + author format.key output } if$ new.block.comma @@ -2040,28 +2752,29 @@ } if$ crossref missing$ - { format.isbn output } + { format.isbn.output } 'skip$ if$ new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {incollection} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle format.publisher.address output format.edition output format.chapter.pages output - format.isbn output + format.isbn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2071,21 +2784,22 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {inproceedings} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle format.organization.publisher.address output format.chapter.pages output - format.isbn output - format.issn output + format.isbn.output + format.issn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2095,112 +2809,102 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {conference} { inproceedings } FUNCTION {manual} { output.bibitem - author empty$ - { organization "organization" bibinfo.check - duplicate$ empty$ 'pop$ - { output - address "address" bibinfo.check output - } - if$ - }{ - format.authors output.nonnull - } - if$ + format.authors output + author format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check - author empty$ - { organization empty$ - { - address "address" bibinfo.check output - } - 'skip$ - if$ - }{ + link.shut organization "organization" bibinfo.check output address "address" bibinfo.check output - } - if$ format.edition output format.date.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {mastersthesis} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma format.btitle output new.block.comma + link.open bbl.mthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {misc} { output.bibitem format.authors output - format.title output + author format.key output + new.block.comma + link.open + format.title + output + link.shut + new.block.comma howpublished "howpublished" bibinfo.check output format.date.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry - empty.misc.check } FUNCTION {phdthesis} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma format.btitle output new.block.comma + link.open bbl.phdthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {presentation} { output.bibitem format.authors output + author format.key output new.block.comma - format.title output + link.open + format.title + output + link.shut new.block.comma format.organization.address "organization and address" output.check month "month" output.check @@ -2212,52 +2916,40 @@ type missing$ 'skip$ {"(" type capitalize * ")" * output} if$ - new.block.comma format.url output fin.entry } FUNCTION {proceedings} { output.bibitem - editor empty$ - { organization "organization" bibinfo.check output } - { format.editors output.nonnull } - if$ + format.editors output + editor format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut bookaddress "address" bibinfo.check output format.number.series output format.bvolume output - editor empty$ - { - publisher empty$ - { - }{ - format.publisher.address output - } - if$ - }{ - format.organization.publisher.address output - } - if$ - format.isbn output - format.issn output + format.organization.publisher.address output + format.isbn.output + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {techreport} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut new.block.comma format.tr.number output.nonnull @@ -2267,55 +2959,369 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {unpublished} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut format.date.output new.block.comma new.sentence.comma format.note "note" output.check format.eprint output - format.url output fin.entry } FUNCTION {default.type} { misc } + READ -STRINGS { longest.label } -INTEGERS { number.label longest.label.width } -FUNCTION {initialize.longest.label} -{ "" 'longest.label := - #1 'number.label := - #0 'longest.label.width := + +EXECUTE {control.init} + +ITERATE {control.pass} + +EXECUTE {control.check} + +FUNCTION {sortify} +{ purify$ + "l" change.case$ } -FUNCTION {longest.label.pass} +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {cite.name.font.apply} { - number.label int.to.str$ 'label := - number.label #1 + 'number.label := - label width$ longest.label.width > - { label 'longest.label := - label width$ 'longest.label.width := + word.space * bbl.etal + emphasize + * +} + +FUNCTION {format.lab.names} +{ 's := + "" 't := + #1 'nameptr := + format.name.apply + s num.names$ duplicate$ + #2 > + { pop$ + cite.name.font.apply + }{ + #2 < + 'skip$ + { + s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { + cite.name.font.apply + }{ + bbl.and space.word * + s #2 "{vv~}{ll}" format.name$ + cite.name.font + * + } + if$ + } + if$ + } + if$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ + calc.short.authors + short.list + year duplicate$ empty$ + short.list key field.or.null = or + { + pop$ "" + }{ + control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$ + } + if$ + "(" swap$ * + * 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ll{ }}" + control.author.initials { + "{ f{ }}" * + }{ + "{ ff{ }}" * + } if$ + "{ jj{ }}" * + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { + t sortify * + } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {year.sort.key} +{ + year +} + +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} + +INTEGERS { seq.num } + +FUNCTION {init.seq} +{ #0 'seq.num :=} + +EXECUTE {init.seq} + +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} + +FUNCTION {label.presort} +{ + calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label + * + " " + * + title field.or.null sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +FUNCTION {presort.pass} +{ type$ "control" = 'control.presort 'label.presort if$ +} + +ITERATE {presort.pass} + +SORT + +STRINGS { last.label next.extra } + +INTEGERS { last.extra.num number.label } + +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} + +FUNCTION {label.forward} +{ + last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} + +FUNCTION {label.reverse} +{ next.extra "b" = + { "a" 'extra.label := } 'skip$ if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := +} + +EXECUTE {initialize.extra.label.stuff} + +FUNCTION {forward.pass} +{ type$ "control" = 'control.forward 'label.forward if$ +} + +ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ type$ "control" = 'control.reverse 'label.reverse if$ +} + +REVERSE {reverse.pass} + +FUNCTION {sortkey.sort} +{ sort.label + " " + * + year.sort.key + field.or.null sortify + * + " " + * + title field.or.null sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +FUNCTION {bib.sort.pass} +{ type$ "control" = 'control.sort 'sortkey.sort if$ } -EXECUTE {initialize.longest.label} -ITERATE {longest.label.pass} +ITERATE {bib.sort.pass} + +SORT + FUNCTION {init.bib.eprint} { - "\texttt{" + "\texttt {" pop$ - "\providecommand \url [0]{\begingroup\@sanitize \@url }%" write$ newline$ + "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$ "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$ "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$ eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$ @@ -2323,37 +3329,18 @@ FUNCTION {init.bib.doi} { - "\@ifxundefined \urlstyle {%" write$ newline$ - " \providecommand \doi [1]{doi:\discretionary{}{}{}#1}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand \doi [0]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url }%" - write$ newline$ - "}%" write$ newline$ - "\providecommand \doibase [0]{" doi.base * "}%" * write$ newline$ - doi.command.href "\providecommand " swap$ * "[1]{\href{\doibase#1}}%" * write$ newline$ + "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$ } FUNCTION {init.bib.hypertex} { - "\providecommand\href[0]{\@sanitize\@href}%" write$ newline$ - "\providecommand\@href[1]{\endgroup\@@startlink{#1}\endgroup\@@href}%" write$ newline$ - "\providecommand\@@href[1]{#1\@@endlink}%" write$ newline$ - "\providecommand \@sanitize [0]{\begingroup\catcode`\&12\catcode`\#12\relax}%" write$ newline$ - "\@ifxundefined \pdfoutput {\@firstoftwo}{%" write$ newline$ - " \@ifnum{\z@=\pdfoutput}{\@firstoftwo}{\@secondoftwo}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{\leavevmode\special{html:}}%" * write$ newline$ - " \providecommand\@@endlink[0]{\special{html:}}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{%" write$ newline$ - " \leavevmode" write$ newline$ - " \pdfstartlink" write$ newline$ - " attr{/Border[0 0 1 ]/H/I/C[0 1 1]}%" write$ newline$ - " user{/Subtype/Link/A<>}%" write$ newline$ - " \relax" write$ newline$ - " }%" write$ newline$ - " \providecommand\@@endlink[0]{\pdfendlink}%" write$ newline$ - "}%" write$ newline$ + "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$ + "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$ + "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$ + "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$ + "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$ + "\providecommand \@@startlink[1]{}%" write$ newline$ + "\providecommand \@@endlink[0]{}%" write$ newline$ } FUNCTION {init.bib.namefont} @@ -2370,18 +3357,10 @@ "#1" swap$ "}%" * * * * write$ newline$ } -FUNCTION {init.bib.annote} +FUNCTION {init.bib.ay} { - "\providecommand \bibAnnote [3]{%" write$ newline$ - " " bbl.shut * "{#1}%" * write$ newline$ - " \begin{quotation}\noindent" write$ newline$ - " \textsc{Key:}\ #2\\\textsc{Annotation:}\ #3%" write$ newline$ - " \end{quotation}%" write$ newline$ - "}%" write$ newline$ - "\providecommand \bibAnnoteFile [2]{%" write$ newline$ - " \IfFileExists{#2}{\bibAnnote {#1} {#2} {\input{#2}}}{}%" write$ newline$ - "}%" write$ newline$ - "\providecommand \typeout [0]{\immediate \write \m@ne }%" write$ newline$ + "\providecommand \natexlab [1]{#1}%" + write$ newline$ } FUNCTION {init.bib.bibinfo} @@ -2416,47 +3395,55 @@ { warn.bib "\makeatletter" write$ newline$ - "\providecommand \@ifxundefined [1]{%" write$ newline$ - " \ifx #1\undefined \expandafter \@firstoftwo" write$ newline$ - " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + "\providecommand \@ifxundefined [1]{%" write$ newline$ + " \@ifx{#1\undefined}" write$ newline$ "}%" write$ newline$ "\providecommand \@ifnum [1]{%" write$ newline$ " \ifnum #1\expandafter \@firstoftwo" write$ newline$ " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + " \fi" write$ newline$ "}%" write$ newline$ + "\providecommand \@ifx [1]{%" write$ newline$ + " \ifx #1\expandafter \@firstoftwo" write$ newline$ + " \else \expandafter \@secondoftwo" write$ newline$ + " \fi" write$ newline$ + "}%" write$ newline$ + init.bib.ay init.bib.quote init.bib.namefont init.bib.hypertex init.bib.eprint init.bib.doi - init.bib.annote init.bib.lang init.bib.bibinfo init.bib.translation init.bib.endbibitem "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$ + "\let\auto@bib@innerbib\@empty" write$ newline$ "%" write$ } FUNCTION {begin.bib} { - id.bst duplicate$ top$ "%" swap$ * write$ newline$ + id.bst diagn.cmntlog + control.bib preamble$ empty$ 'skip$ { preamble$ write$ newline$ } if$ "\begin{thebibliography}{" - longest.label + number.label int.to.str$ * "}%" * write$ newline$ init.bib } EXECUTE {begin.bib} + EXECUTE {init.state.consts} + ITERATE {call.type$} + FUNCTION {end.bib} { newline$ "\end{thebibliography}%" @@ -2464,6 +3451,7 @@ } EXECUTE {end.bib} + %% End of customized bst file %% %% End of file `apsrev4-1.bst'. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/bibtex/bst/revtex/aipnum4-1.bst +++ texlive-extra-2009/texmf-dist/bibtex/bst/revtex/aipnum4-1.bst @@ -4,13 +4,13 @@ %% %% The original source files were: %% -%% merlin.mbs (with options: `head,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% physjour.mbs (with options: `lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% geojour.mbs (with options: `lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% photjour.mbs (with options: `lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% merlin.mbs (with options: `tail,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,seq-no,vonx,nm-init,ed-au,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') %% ---------------------------------------- -%% *** REVTeX-compatible aipnum4-1.bst 2009-10-08 *** +%% *** REVTeX-compatible aipnum4-1.bst 2010-07-25 *** %% %% Copyright 1994-2007 Patrick W Daly % =============================================================== @@ -24,23 +24,37 @@ % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2008/01/17 4.21 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in ENGLISH - % This is a numerical citation style, and as such is standard LaTeX. - % It requires no extra package to interface to the main text. + % This is an author-year citation style bibliography. As such, it is + % non-standard LaTeX, and requires a special package file to function properly. + % Such a package is natbib.sty by Patrick W. Daly % The form of the \bibitem entries is - % \bibitem{key}... - % Usage of \cite is as follows: - % \cite{key} ==>> [#] - % \cite[chap. 2]{key} ==>> [#, chap. 2] - % where # is a number determined by the ordering in the reference list. - % The order in the reference list is that by which the works were originally - % cited in the text, or that in the database. + % \bibitem[Jones et al.(1990)]{key}... + % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... + % The essential feature is that the label (the part in brackets) consists + % of the author names, as they should appear in the citation, with the year + % in parentheses following. There must be no space before the opening + % parenthesis! + % With natbib v5.3, a full list of authors may also follow the year. + % In natbib.sty, it is possible to define the type of enclosures that is + % really wanted (brackets or parentheses), but in either case, there must + % be parentheses in the label. + % The \cite command functions as follows: + % \citet{key} ==>> Jones et al. (1990) + % \citet*{key} ==>> Jones, Baker, and Smith (1990) + % \citep{key} ==>> (Jones et al., 1990) + % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) + % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) + % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) + % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32) + % \citeauthor{key} ==>> Jones et al. + % \citeauthor*{key} ==>> Jones, Baker, and Smith + % \citeyear{key} ==>> 1990 %--------------------------------------------------------------------- -FUNCTION {id.bst} {"Merlin.mbs v4.21 2009-07-09. "} +FUNCTION {id.bst} {"merlin.mbs aipnum4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"} ENTRY { address @@ -82,6 +96,8 @@ }{ }{ label + extra.label sort.label + short.list } INTEGERS @@ -97,6 +113,7 @@ } STRINGS { bibfield output.bibfield } + FUNCTION {not} { { #0 } { #1 } @@ -121,6 +138,398 @@ #-1 #1 substring$ "." = } +INTEGERS { arith.mulitplier arith.multiplicand } + +FUNCTION {multiply} +{ + 'arith.multiplicand := + 'arith.mulitplier := + #0 + { arith.mulitplier #0 > } + { arith.multiplicand + + arith.mulitplier #1 - 'arith.mulitplier := + } + while$ +} + +FUNCTION {chr.to.hex} +{ + chr.to.int$ + duplicate$ "0" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #9 > or not + { swap$ pop$ } + { pop$ + duplicate$ "A" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + duplicate$ "a" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + pop$ #-1 + } + if$ + } + if$ + } + if$ +} + +INTEGERS { arith.accumulator } + +FUNCTION {str.to.hex} +{ #0 'arith.accumulator := + { duplicate$ empty$ not } + { duplicate$ #1 #1 substring$ chr.to.hex + duplicate$ #0 < + { pop$ pop$ "" + } + { arith.accumulator #16 multiply + 'arith.accumulator := + #2 global.max$ substring$ + } + if$ + } + while$ + pop$ arith.accumulator +} + +FUNCTION {diagn.cmntlog} +{ + duplicate$ top$ "%" swap$ * write$ newline$ +} + +INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year } + +INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed } + +FUNCTION { control.init } +{ + #0 + 'control.key := + #0 + #8 + + 'control.author := + #0 + 'control.author.jnrlst := + #0 + 'control.author.dotless := + #0 + 'control.author.nospace := + #1 + 'control.author.initials := + #0 + 'control.author.nocomma := + #0 + 'control.author.first := + #0 + 'control.author.reversed := + #1 + 'control.editor := + #-1 + 'control.title := + #0 + 'control.pages := + #0 + 'control.eprint := + #1 + 'control.year := +} + +FUNCTION {warning.dependency} +{ + " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$ +} + +FUNCTION {control.check} +{ + control.editor + { + "editor formatted same as author" + control.author.reversed { + duplicate$ #0 swap$ "reversed" warning.dependency + #0 'control.author.reversed := + } 'skip$ if$ + control.author.first { + duplicate$ #0 swap$ "first" warning.dependency + #0 'control.author.first := + } 'skip$ if$ + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + pop$ + } 'skip$ if$ + control.author.reversed 'skip$ + { + "not reversed" + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.jnrlst 'skip$ { + duplicate$ #1 swap$ "jnrlst" warning.dependency + #1 'control.author.jnrlst := + } if$ + control.author.initials { + duplicate$ ", initials" * + control.author.dotless { + duplicate$ #0 swap$ "dotless" warning.dependency + #0 'control.author.dotless := + } 'skip$ if$ + pop$ + } 'skip$ if$ + pop$ + } + if$ + control.author.initials 'skip$ { + "not initials" + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.dotless 'skip$ { + duplicate$ #1 swap$ "dotless" warning.dependency + #1 'control.author.dotless := + } if$ + pop$ + } if$ +} + +FUNCTION {control.parse} +{ + duplicate$ duplicate$ missing$ + { + pop$ pop$ pop$ + } + { empty$ + { + pop$ #-1 + }{ + str.to.hex + } + if$ + swap$ := + } + if$ +} + +FUNCTION {control.dump} +{ + duplicate$ missing$ { pop$ "N/A" } 'skip$ if$ + "{" swap$ * "}, " * + * +} + +INTEGERS { decode.threshold } + +FUNCTION {control.decode} +{ + - duplicate$ + #0 < + { + skip$ pop$ swap$ #0 + } + { + swap$ pop$ swap$ #1 + } + if$ + swap$ := +} + +FUNCTION {control.author.decode} +{ + control.author + duplicate$ duplicate$ #0 < swap$ #128 < not or + { + int.to.str$ "(" swap$ * ")" * + "Control cannot interpret author " swap$ * + warning$ + }{ + 'control.author.jnrlst swap$ duplicate$ #64 control.decode + 'control.author.dotless swap$ duplicate$ #32 control.decode + 'control.author.nospace swap$ duplicate$ #16 control.decode + 'control.author.initials swap$ duplicate$ #8 control.decode + 'control.author.nocomma swap$ duplicate$ #4 control.decode + 'control.author.first swap$ duplicate$ #2 control.decode + 'control.author.reversed swap$ duplicate$ #1 control.decode + duplicate$ #0 = + 'skip$ + { + "Control: residue of author" + "(" swap$ * ")" * * + warning$ + } + if$ + pop$ + } + if$ +} + +FUNCTION {control.setup} +{ + type$ cite$ "{" swap$ * "}, " * * + "control.key" key control.dump * + "control.author" author control.dump * + "control.editor" editor control.dump * + "control.title" title control.dump * + "control.pages" pages control.dump * + "control.year" year control.dump * + "control.eprint" eprint control.dump * + top$ + 'control.key key control.parse + 'control.author author control.parse + 'control.editor editor control.parse + 'control.title title control.parse + 'control.pages pages control.parse + 'control.year year control.parse + 'control.eprint eprint control.parse + control.author.decode +} + +FUNCTION {control.pass} +{ type$ "control" = 'control.setup 'skip$ if$ +} + +FUNCTION {control.presort} +{ +} + +FUNCTION {control.forward} +{ +} + +FUNCTION {control.reverse} +{ +} + +FUNCTION {control.sort} +{ +} + +FUNCTION {control.longest.label} +{ +} + +FUNCTION {control.key.bib} +{ + "Control: key " + control.key + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + pop$ * + diagn.cmntlog +} + +FUNCTION {control.author.bib} +{ + "Control: author " + control.author "(" swap$ int.to.str$ * ")" * * + control.author.reversed { " reversed" * }{} if$ + control.author.first { " first" * }{} if$ + control.author.nocomma { " nocomma" * }{} if$ + control.author.initials { " initials" * }{} if$ + control.author.nospace { " nospace" * }{} if$ + control.author.dotless { " dotless" * }{} if$ + control.author.jnrlst { " jnrlst" * }{} if$ + diagn.cmntlog +} + +FUNCTION {control.editor.bib} +{ + "Control: editor formatted " + control.editor + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "identically to author" + } { + "differently from author" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.title.bib} +{ + "Control: production of article title " + control.title + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled" + } { + #0 > { + "required" + } { + "allowed" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.pages.bib} +{ + "Control: page " + control.pages + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "none" + } { + #0 > { + "range" + } { + "single" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.year.bib} +{ + "Control: year " + control.year + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "truncated" + } { + "verbatim" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.eprint.bib} +{ + "Control: production of eprint " + control.eprint + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + #0 < { "disabled" } { "enabled" } if$ * * + diagn.cmntlog +} + +FUNCTION {control.bib} +{ + control.key.bib + control.author.bib + control.editor.bib + control.title.bib + control.pages.bib + control.year.bib + control.eprint.bib +} + FUNCTION {init.state.consts} { #0 'before.all := @@ -165,7 +574,7 @@ duplicate$ "2(" swap$ * ")" * top$ } -FUNCTION {bibfield.command}{ "\bibfield"} +FUNCTION {bibfield.command}{ "\bibfield "} FUNCTION {output.nonnull} { @@ -195,9 +604,7 @@ output.bibfield duplicate$ empty$ 'pop$ { bibfield.command - "{" * swap$ * "}{%" * write$ newline$ - " " swap$ * "}%" * write$ newline$ - " " + " {" * swap$ * "} {" * swap$ * "}" * } if$ write$ @@ -228,6 +635,12 @@ if$ } +FUNCTION {output.nopunct} +{ + punctuation.no 'punctuation.state := + output.nonnull +} + FUNCTION {output.check} { swap$ duplicate$ empty$ @@ -236,9 +649,9 @@ if$ } -FUNCTION {bbl.open} { "\BibitemOpen" } +FUNCTION {bbl.open} { "\BibitemOpen " } -FUNCTION {bbl.shut} { "\BibitemShut" } +FUNCTION {bbl.shut} { "\BibitemShut " } FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * } @@ -315,7 +728,7 @@ FUNCTION {no.blank.or.punct} { - "\hspace{0pt}" * + "\hspace {0pt}" * before.all 'output.state := } @@ -325,11 +738,21 @@ skip$ } -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ +STRINGS {z} +FUNCTION {remove.dots} +{ + control.author.dotless { + 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ + } 'skip$ if$ } FUNCTION {new.block.checkb} @@ -341,22 +764,6 @@ if$ } -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} - FUNCTION {field.or.null} { duplicate$ empty$ { pop$ "" } @@ -369,7 +776,7 @@ duplicate$ empty$ { pop$ "" } { - "\emph{" swap$ * "}" * + "\emph {" swap$ * "}" * } if$ } @@ -377,7 +784,7 @@ FUNCTION {bolden} { duplicate$ empty$ { pop$ "" } - { "\textbf{" swap$ * "}" * } + { "\textbf {" swap$ * "}" * } if$ } @@ -386,7 +793,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibnamefont{" swap$ * "}" * + "\bibnamefont {" swap$ * "}" * } if$ } @@ -396,7 +803,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibfnamefont{" swap$ * "}" * + "\bibfnamefont {" swap$ * "}" * } if$ } @@ -406,7 +813,7 @@ duplicate$ empty$ { pop$ "" } { - "\citenamefont{" swap$ * "}" * + "\citenamefont {" swap$ * "}" * } if$ } @@ -430,6 +837,7 @@ % Here are the language-specific definitions for explicit words. % Each function has a name bbl.xxx where xxx is the English word. % The language selected here is ENGLISH + FUNCTION {bbl.and} { "and" @@ -569,7 +977,7 @@ FUNCTION {bbl.url.prefix} { - "\urlprefix" + "\urlprefix " } FUNCTION {eng.ord} @@ -881,7 +1289,7 @@ MACRO {tcs} {"Theor. Comput. Sci."} -FUNCTION {bibinfo.command} { "\bibinfo" } +FUNCTION {bibinfo.command} { "\bibinfo " } FUNCTION {bibinfo.check} { swap$ @@ -895,7 +1303,7 @@ swap$ pop$ }{ swap$ - bibinfo.command " {" * swap$ * "} {" * swap$ * "}" * + bibinfo.command "{" * swap$ * "} {" * swap$ * "}" * } if$ } @@ -933,11 +1341,14 @@ FUNCTION {eprint.command} { - "\Eprint" + "\Eprint " } FUNCTION {format.eprint} -{ eprint duplicate$ empty$ +{ + eprint duplicate$ empty$ + control.eprint #0 < + or { pop$ "" } { duplicate$ @@ -945,13 +1356,13 @@ archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ * "/" * swap$ * - "{" swap$ * "}" * + "{" swap$ * "} " * swap$ "" archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ * swap$ * primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ * - "{" swap$ * "}" * + "{" swap$ * "} " * * eprint.command swap$ * } @@ -973,7 +1384,7 @@ url duplicate$ empty$ { pop$ "" } { - "\url" + "\url " "{" * swap$ * "}" * } if$ @@ -996,75 +1407,348 @@ STRINGS { bibinfo} +FUNCTION {format.names.fname} +{ + control.author.initials { + control.author.dotless { + control.author.nospace { + "f{}" + } { + "f{~}" + } if$ + } { + control.author.nospace { + "f{.}." + } { + "f." + } if$ + } if$ + } { + "ff" + } if$ +} + +FUNCTION {bracify} +{ + "{" swap$ * "}" * +} + +FUNCTION {name.comma} +{ + control.author.nocomma 'skip$ { "," swap$ * } if$ +} + +FUNCTION {format.names.format.onefont} +{ + "{vv~}{ll}" + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + control.author.initials { + "f" + control.author.dotless 'skip$ { + "." * + } if$ + "~" * + } { + "ff" + } if$ + bracify + swap$ + } { + format.names.fname + " " swap$ * + name.comma + bracify + } + if$ + "jj" + " " swap$ * + name.comma + bracify + control.author.jnrlst 'skip$ 'swap$ if$ + * * +} + +FUNCTION {format.names.onefont} +{ + s nameptr format.names.format.onefont format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.morfont} +{ s nameptr + "{vv~}{ll}" format.name$ bib.name.font + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + s nameptr + control.author.initials { + "f" % default: name + surname + comma junior + } { + "ff" + } if$ + control.author.dotless 'skip$ { + "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials + } if$ + bracify + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + swap$ + * + s nameptr + "{jj}" format.name$ duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } { + "," * + s nameptr + format.names.fname + "jj" + " " + name.comma + control.author.jnrlst { + swap$ * skip$ + } { + skip$ * swap$ + } if$ + bracify swap$ bracify swap$ + * + format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } if$ + * +} + +FUNCTION {names.punctuate} +{ + "," * + " " * +} + FUNCTION {format.names} { 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f.}" format.name$ duplicate$ empty$ 'skip$ + duplicate$ empty$ { pop$ "" } { + duplicate$ num.names$ + duplicate$ 'numnames := + 'namesleft := + 's := + #1 'nameptr := + "" + { namesleft #0 > } + { + format.names.morfont + bibinfo bibinfo.check + type$ "presentation" = + 'check.speaker + 'skip$ + if$ + 't := + nameptr #1 > not + { + t * + } { + namesleft #1 > + { + names.punctuate + t * + } { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * + bbl.etal + emphasize + * + } { + bbl.and + space.word * + t * + } + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ +} + +FUNCTION {format.names.ed.onefont} +{ + s nameptr + control.author.initials { + control.author.dotless { + control.author.nospace { + "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx + } { + "{f{~}~}{vv~}{ll}{ jj}" % nm-rv + } if$ + } { + control.author.nospace { + "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc + }{ + "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1 + } if$ + } if$ + } { + "{ff~}{vv~}{ll}{, jj}" + } if$ + format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.ed.morfont} +{ + control.author.reversed { % + control.author.initials { % + control.author.dotless { % + s nameptr + control.author.nospace { % nm-rvx nm-rvcx + "{f{}}" + } { % nm-rv + "{f{~}}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } { % !control.author.dotless + s nameptr + control.author.nospace { % nm-rvv + "{ff}" + } { % nm-rev nm-rev1 + "{f.}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } if$ + } { % Full names !control.author.initials nm-revf nm-revv1 + s nameptr + "{ff}" + format.name$ duplicate$ empty$ 'skip$ { tie.or.space.prefix bib.fname.font swap$ * } if$ s nameptr "{vv~}{ll}" format.name$ bib.name.font * s nameptr - "{jj}" format.name$ duplicate$ empty$ 'skip$ + "{jj}" format.name$ + duplicate$ empty$ 'skip$ { bib.fname.font ", " swap$ * } if$ - * - bibinfo bibinfo.check - type$ "presentation" = - { check.speaker } - 'skip$ - if$ - 't := - nameptr #1 > - { - namesleft #1 > - { - ", " * - t * - }{ - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - numnames #2 > - { - "," * - } - 'skip$ - if$ - t "others" = - { - " " * bbl.etal - emphasize - * - }{ - bbl.and - space.word * - t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ + } if$ + } { % !control.author.reversed nm-init + s nameptr + "{f.}" + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ } if$ + * } FUNCTION {format.names.ed} { - format.names + control.editor #0 > { + format.names + } { + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.names.ed.morfont + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { + names.punctuate + t * + }{ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * bbl.etal emphasize * + }{ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ + } if$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ } FUNCTION {format.authors} @@ -1095,25 +1779,12 @@ if$ } -FUNCTION {format.isbn} +FUNCTION {format.isbn.output} { - isbn "isbn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISBN " swap$ * - } - if$ } -FUNCTION {format.issn} -{ issn "issn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISSN " swap$ * - } - if$ +FUNCTION {format.issn.output} +{ } FUNCTION {doi.base} @@ -1121,41 +1792,60 @@ "http://dx.doi.org/" } -FUNCTION {doi.command} +FUNCTION {doi.base.command} { - "\doi" + "\doibase " } -FUNCTION {doi.command.href} +FUNCTION {noop.command} { - "\Doi" + "\href@noop " } -FUNCTION {format.doi} -{ doi "doi" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - doi.command "{" * swap$ * "}" * - } - if$ +FUNCTION {href.command} +{ + "\href " } -FUNCTION {add.doi} +FUNCTION {link.tag.open} { - duplicate$ empty$ 'skip$ + doi duplicate$ empty$ { - doi duplicate$ empty$ 'pop$ + pop$ + url duplicate$ empty$ { - "{" swap$ * "}" * - swap$ - "{" swap$ * "}" * - * - doi.command.href swap$ * + pop$ "" noop.command + }{ + href.command } if$ } + { + doi.base.command swap$ * + href.command + } if$ + "{" * swap$ * "} {" * +} + +FUNCTION {link.tag.shut} +{ + "}" +} + +FUNCTION {link.open} +{ + link.tag.open output.nopunct +} + +FUNCTION {link.shut} +{ + link.tag.shut * +} + +FUNCTION {add.doi} +{ + link.tag.open swap$ * link.tag.shut * } FUNCTION {select.language} @@ -1190,7 +1880,7 @@ FUNCTION {bbl.enquote} { - "\enquote" + "\enquote " } FUNCTION {string.enquote} @@ -1198,7 +1888,7 @@ punctuation.no 'punctuation.state := non.stop { block.punctuation - } { "." } if$ + } { "" } if$ swap$ pop$ * bbl.enquote "{" * swap$ * "}" * @@ -1225,22 +1915,105 @@ if$ } +FUNCTION {format.name.apply} +{ + s nameptr + "{vv~}{ll}" + format.name$ + cite.name.font +} + +FUNCTION {format.full.names} +{ + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { format.name.apply + 't := + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { + 't := + } + 'pop$ + if$ + t "others" = + { + " " * bbl.etal + emphasize * + }{ + numnames #2 > { "," * }{ skip$ } if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {make.full.names} +{ + key editor author + type$ "proceedings" = + type$ "book" = + type$ "inbook" = + or { pop$ }{ { pop$ "" }{ swap$ pop$ "" swap$ } if$ } if$ + duplicate$ empty$ + { pop$ + duplicate$ empty$ + { pop$ + duplicate$ empty$ + { pop$ + cite$ #1 #3 substring$ + }{ + skip$ + } + if$ + } + { swap$ pop$ format.full.names } + if$ + } + { swap$ pop$ swap$ pop$ format.full.names } + if$ +} + FUNCTION {year.bibitem} { year duplicate$ empty$ { pop$ "" - "????" * }{ skip$ } if$ + extra.label * } FUNCTION {output.bibitem} { newline$ "" - "{" * cite$ * "}%" * - "\bibitem" + label + * ")" * + make.full.names duplicate$ short.list = + { pop$ }{ * } if$ + bracify + "[" swap$ * "]" * + cite$ bracify "%" * + * + "\bibitem " swap$ * write$ newline$ " " @@ -1294,23 +2067,12 @@ FUNCTION {format.date} { - month "month" bibinfo.check - duplicate$ empty$ - year "year" bibinfo.check duplicate$ empty$ - { swap$ 'skip$ - { "there's a month but no year in " cite$ * warning$ } - if$ - * - }{ - swap$ 'skip$ - { - swap$ - word.space * swap$ - } - if$ - * + year "year" bibinfo.check duplicate$ empty$ + { } + 'skip$ if$ + extra.label * date.encapsulate } @@ -1322,7 +2084,7 @@ FUNCTION {format.date.output} { - format.date output + format.date.output.check } FUNCTION {format.btitle} @@ -1547,7 +2309,16 @@ { pop$ pop$ format.pages } { volnum.punct * swap$ - first.page + control.pages duplicate$ #0 < { + pop$ pop$ + }{ + #0 > + { + n.dashify + }{ + first.page + } if$ + } if$ "pages" bibinfo.check * } @@ -1578,7 +2349,6 @@ FUNCTION {format.ser.vol.num} { series "series" bibinfo.check output - after.punctuation 'output.state := volume field.or.null duplicate$ empty$ 'skip$ { @@ -1653,7 +2423,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1667,7 +2437,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1679,15 +2449,6 @@ if$ } -FUNCTION {empty.misc.check} -{ author empty$ title empty$ howpublished empty$ - month empty$ year empty$ note empty$ - and and and and and - { "all relevant fields are empty in " cite$ * warning$ } - 'skip$ - if$ -} - FUNCTION {format.thesis.type} { type duplicate$ empty$ 'pop$ @@ -1712,52 +2473,10 @@ FUNCTION {format.article.crossref} { - key duplicate$ empty$ - { pop$ - journal duplicate$ empty$ - { "need key or journal for " cite$ * " to crossref " * crossref * warning$ } - { "journal" bibinfo.check emphasize word.in swap$ * } - if$ - } - { word.in swap$ * word.space *} - if$ + word.in " \cite{" * crossref * "}" * } -FUNCTION {format.crossref.editor} -{ editor #1 "{vv~}{ll}" format.name$ - bib.name.font - "editor" bibinfo.check - editor num.names$ duplicate$ - #2 > - { pop$ - "editor" bibinfo.check - word.space * bbl.etal - emphasize - * - } - { #2 < - 'skip$ - { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = - { - "editor" bibinfo.check - word.space * bbl.etal - emphasize - * - }{ - bbl.and space.word - * editor #2 "{vv~}{ll}" format.name$ - bib.name.font - "editor" bibinfo.check - * - } - if$ - } - if$ - } - if$ -} - FUNCTION {format.book.crossref} { volume duplicate$ empty$ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ @@ -1767,44 +2486,12 @@ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * } if$ - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { series empty$ - { "need editor, key, or series for " cite$ * " to crossref " * - crossref * warning$ - "" * - } - { series emphasize * } - if$ - } - { key * } - if$ - } - { format.crossref.editor * } - if$ " \cite{" * crossref * "}" * } FUNCTION {format.incoll.inproc.crossref} { - editor empty$ - editor field.or.null author field.or.null = - or - { key empty$ - { format.booktitle duplicate$ empty$ - { "need editor, key, or booktitle for " cite$ * " to crossref " * - crossref * warning$ - } - { word.in swap$ * } - if$ - } - { word.in key * word.space *} - if$ - } - { word.in format.crossref.editor * word.space *} - if$ + word.in " \cite{" * crossref * "}" * } @@ -1892,39 +2579,63 @@ output } +FUNCTION {article.title.produce} +{ + control.title duplicate$ #0 < + { pop$ + }{ + format.title + "title" 'bibfield := + swap$ #0 > + { + "title" output.check + }{ + output + } if$ + new.block.comma + } if$ +} + +FUNCTION {control} +{ +} + FUNCTION {article} { output.bibitem format.authors booktitle empty$ { "author" output.check }{ output } if$ + author format.key output new.block.comma + article.title.produce output.article.booktitle crossref missing$ { + link.open journal "journal" bibinfo.warn - pages empty$ 'skip$ { add.doi } if$ "journal" 'bibfield := output + add.blank format.ser.vol.num output eid.or.pages format.date.output.check + pages empty$ { + doi output + } 'skip$ if$ + link.shut }{ format.article.crossref output.nonnull format.pages output } if$ - format.issn output - pages empty$ { - format.doi output - } 'skip$ if$ + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output format.translation output fin.entry } @@ -1933,24 +2644,28 @@ { output.bibitem author empty$ { + format.editors "author and editor" output.check + editor format.key output }{ format.authors output.nonnull - crossref missing$ { editor.check.book } 'skip$ if$ +% crossref missing$ { editor.check.book } 'skip$ if$ } if$ new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut format.edition output author empty$ { - format.editor.in output } { + format.editor.in output + editor format.key output } if$ - format.number.series output + format.number.series output crossref missing$ { format.bvolume output @@ -1962,35 +2677,41 @@ format.date.output.check } if$ - format.isbn output - format.chapter.pages - output + format.isbn.output + format.chapter.pages + output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {booklet} { output.bibitem format.authors output + author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output format.date.output - format.isbn output + format.isbn.output format.book.pages output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output + fin.entry +} + +FUNCTION {footnote} +{ output.bibitem + format.note output fin.entry } @@ -1999,8 +2720,10 @@ author empty$ { format.editors "editor" output.check + editor format.key output }{ format.authors output.nonnull + author format.key output } if$ new.block.comma @@ -2028,28 +2751,29 @@ } if$ crossref missing$ - { format.isbn output } + { format.isbn.output } 'skip$ if$ new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {incollection} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle format.publisher.address output format.edition output format.chapter.pages output - format.isbn output + format.isbn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2059,21 +2783,22 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {inproceedings} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle format.organization.publisher.address output format.chapter.pages output - format.isbn output - format.issn output + format.isbn.output + format.issn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2083,112 +2808,102 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {conference} { inproceedings } FUNCTION {manual} { output.bibitem - author empty$ - { organization "organization" bibinfo.check - duplicate$ empty$ 'pop$ - { output - address "address" bibinfo.check output - } - if$ - }{ - format.authors output.nonnull - } - if$ + format.authors output + author format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check - author empty$ - { organization empty$ - { - address "address" bibinfo.check output - } - 'skip$ - if$ - }{ + link.shut organization "organization" bibinfo.check output address "address" bibinfo.check output - } - if$ format.edition output format.date.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {mastersthesis} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma format.btitle output new.block.comma + link.open bbl.mthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {misc} { output.bibitem format.authors output - format.title output + author format.key output + new.block.comma + link.open + format.title + output + link.shut + new.block.comma howpublished "howpublished" bibinfo.check output format.date.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry - empty.misc.check } FUNCTION {phdthesis} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma format.btitle output new.block.comma + link.open bbl.phdthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {presentation} { output.bibitem format.authors output + author format.key output new.block.comma - format.title output + link.open + format.title + output + link.shut new.block.comma format.organization.address "organization and address" output.check month "month" output.check @@ -2200,52 +2915,40 @@ type missing$ 'skip$ {"(" type capitalize * ")" * output} if$ - new.block.comma format.url output fin.entry } FUNCTION {proceedings} { output.bibitem - editor empty$ - { organization "organization" bibinfo.check output } - { format.editors output.nonnull } - if$ + format.editors output + editor format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut bookaddress "address" bibinfo.check output format.number.series output format.bvolume output - editor empty$ - { - publisher empty$ - { - }{ - format.publisher.address output - } - if$ - }{ - format.organization.publisher.address output - } - if$ - format.isbn output - format.issn output + format.organization.publisher.address output + format.isbn.output + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {techreport} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma format.tr.number output.nonnull @@ -2255,55 +2958,390 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } FUNCTION {unpublished} { output.bibitem format.authors "author" output.check + author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut format.date.output new.block.comma new.sentence.comma format.note "note" output.check format.eprint output - format.url output fin.entry } FUNCTION {default.type} { misc } + READ -STRINGS { longest.label } -INTEGERS { number.label longest.label.width } -FUNCTION {initialize.longest.label} -{ "" 'longest.label := - #1 'number.label := - #0 'longest.label.width := + +EXECUTE {control.init} + +ITERATE {control.pass} + +EXECUTE {control.check} + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ } -FUNCTION {longest.label.pass} +FUNCTION {cite.name.font.apply} { - number.label int.to.str$ 'label := - number.label #1 + 'number.label := - label width$ longest.label.width > - { label 'longest.label := - label width$ 'longest.label.width := + word.space * bbl.etal + emphasize + * +} + +FUNCTION {format.lab.names} +{ 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.name.apply + 't := + nameptr #1 > + { + nameptr + #2 + = + numnames + #3 + > and + { + "others" 't := + #1 'namesleft := + } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } + { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + cite.name.font.apply + }{ + numnames #2 > { "," * } 'skip$ if$ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := } + while$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.label} +{ editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "proceedings" = + 'editor.key.label + 'author.key.label + if$ + } + if$ + 'short.list := +} + +FUNCTION {calc.label} +{ + calc.short.authors + short.list + year duplicate$ empty$ + { + pop$ "" + }{ + control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$ + } + if$ + "(" swap$ * + * 'label := +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr + "{ll{ }}" + control.author.initials { + "{ f{ }}" * + }{ + "{ ff{ }}" * + } if$ + "{ jj{ }}" * + format.name$ 't := + nameptr #1 > + { + " " * + namesleft #1 = t "others" = and + { "zzzzz" * } + { + t sortify * + } + if$ + } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {year.sort.key} +{ + year +} + +FUNCTION {editor.sort} +{ editor empty$ + { key empty$ + { "to sort, need editor or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ +} + +INTEGERS { seq.num } + +FUNCTION {init.seq} +{ #0 'seq.num :=} + +EXECUTE {init.seq} + +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} + +FUNCTION {label.presort} +{ + calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label + * + " " + * + title field.or.null sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +FUNCTION {presort.pass} +{ type$ "control" = 'control.presort 'label.presort if$ +} + +ITERATE {presort.pass} + +SORT + +STRINGS { last.label next.extra } + +INTEGERS { last.extra.num number.label } + +FUNCTION {initialize.extra.label.stuff} +{ #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'last.extra.num := + #0 'number.label := +} + +FUNCTION {label.forward} +{ + last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := +} + +FUNCTION {label.reverse} +{ next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ 'skip$ + { "{\natexlab{" swap$ * "}}" * } if$ + 'extra.label := + label extra.label * 'label := +} + +EXECUTE {initialize.extra.label.stuff} + +FUNCTION {forward.pass} +{ type$ "control" = 'control.forward 'label.forward if$ +} + +ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ type$ "control" = 'control.reverse 'label.reverse if$ } -EXECUTE {initialize.longest.label} -ITERATE {longest.label.pass} +REVERSE {reverse.pass} + +FUNCTION {sortkey.sort} +{ sort.label + " " + * + year.sort.key + field.or.null sortify + * + " " + * + title field.or.null sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +FUNCTION {bib.sort.pass} +{ type$ "control" = 'control.sort 'sortkey.sort if$ +} + +ITERATE {bib.sort.pass} + +SORT + FUNCTION {init.bib.eprint} { - "\texttt{" + "\texttt {" pop$ - "\providecommand \url [0]{\begingroup\@sanitize \@url }%" write$ newline$ + "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$ "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$ "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$ eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$ @@ -2311,37 +3349,18 @@ FUNCTION {init.bib.doi} { - "\@ifxundefined \urlstyle {%" write$ newline$ - " \providecommand \doi [1]{doi:\discretionary{}{}{}#1}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand \doi [0]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url }%" - write$ newline$ - "}%" write$ newline$ - "\providecommand \doibase [0]{" doi.base * "}%" * write$ newline$ - doi.command.href "\providecommand " swap$ * "[1]{\href{\doibase#1}}%" * write$ newline$ + "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$ } FUNCTION {init.bib.hypertex} { - "\providecommand\href[0]{\@sanitize\@href}%" write$ newline$ - "\providecommand\@href[1]{\endgroup\@@startlink{#1}\endgroup\@@href}%" write$ newline$ - "\providecommand\@@href[1]{#1\@@endlink}%" write$ newline$ - "\providecommand \@sanitize [0]{\begingroup\catcode`\&12\catcode`\#12\relax}%" write$ newline$ - "\@ifxundefined \pdfoutput {\@firstoftwo}{%" write$ newline$ - " \@ifnum{\z@=\pdfoutput}{\@firstoftwo}{\@secondoftwo}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{\leavevmode\special{html:}}%" * write$ newline$ - " \providecommand\@@endlink[0]{\special{html:}}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{%" write$ newline$ - " \leavevmode" write$ newline$ - " \pdfstartlink" write$ newline$ - " attr{/Border[0 0 1 ]/H/I/C[0 1 1]}%" write$ newline$ - " user{/Subtype/Link/A<>}%" write$ newline$ - " \relax" write$ newline$ - " }%" write$ newline$ - " \providecommand\@@endlink[0]{\pdfendlink}%" write$ newline$ - "}%" write$ newline$ + "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$ + "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$ + "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$ + "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$ + "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$ + "\providecommand \@@startlink[1]{}%" write$ newline$ + "\providecommand \@@endlink[0]{}%" write$ newline$ } FUNCTION {init.bib.namefont} @@ -2358,6 +3377,12 @@ "#1" swap$ "}%" * * * * write$ newline$ } +FUNCTION {init.bib.ay} +{ + "\providecommand \natexlab [1]{#1}%" + write$ newline$ +} + FUNCTION {init.bib.bibinfo} { bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$ @@ -2390,16 +3415,20 @@ { warn.bib "\makeatletter" write$ newline$ - "\providecommand \@ifxundefined [1]{%" write$ newline$ - " \ifx #1\undefined \expandafter \@firstoftwo" write$ newline$ - " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + "\providecommand \@ifxundefined [1]{%" write$ newline$ + " \@ifx{#1\undefined}" write$ newline$ "}%" write$ newline$ "\providecommand \@ifnum [1]{%" write$ newline$ " \ifnum #1\expandafter \@firstoftwo" write$ newline$ " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + " \fi" write$ newline$ "}%" write$ newline$ + "\providecommand \@ifx [1]{%" write$ newline$ + " \ifx #1\expandafter \@firstoftwo" write$ newline$ + " \else \expandafter \@secondoftwo" write$ newline$ + " \fi" write$ newline$ + "}%" write$ newline$ + init.bib.ay init.bib.quote init.bib.namefont init.bib.hypertex @@ -2410,26 +3439,31 @@ init.bib.translation init.bib.endbibitem "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$ + "\let\auto@bib@innerbib\@empty" write$ newline$ "%" write$ } FUNCTION {begin.bib} { - id.bst duplicate$ top$ "%" swap$ * write$ newline$ + id.bst diagn.cmntlog + control.bib preamble$ empty$ 'skip$ { preamble$ write$ newline$ } if$ "\begin{thebibliography}{" - longest.label + number.label int.to.str$ * "}%" * write$ newline$ init.bib } EXECUTE {begin.bib} + EXECUTE {init.state.consts} + ITERATE {call.type$} + FUNCTION {end.bib} { newline$ "\end{thebibliography}%" @@ -2437,6 +3471,7 @@ } EXECUTE {end.bib} + %% End of customized bst file %% %% End of file `aipnum4-1.bst'. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst +++ texlive-extra-2009/texmf-dist/bibtex/bst/revtex/aipauth4-1.bst @@ -4,13 +4,13 @@ %% %% The original source files were: %% -%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,pre-pub,pre-edn,isbn,issn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev,mcite,mct-1,mct-x3,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,blkyear,yr-par,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,techreport-institution-par,vol-bf,vnum-x,volp-com,jpg-1,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-date,ay-empty-pub-parens-x,pre-pub,pre-edn,doi-link,doi,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') %% ---------------------------------------- -%% *** REVTeX-compatible aipauth4-1.bst 2009-10-08 *** +%% *** REVTeX-compatible aipauth4-1.bst 2010-07-25 *** %% %% Copyright 1994-2007 Patrick W Daly % =============================================================== @@ -24,7 +24,6 @@ % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2008/01/17 4.21 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in ENGLISH @@ -55,7 +54,7 @@ % \citeyear{key} ==>> 1990 %--------------------------------------------------------------------- -FUNCTION {id.bst} {"Merlin.mbs v4.21 2009-07-09. "} +FUNCTION {id.bst} {"merlin.mbs aipauth4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"} ENTRY { address @@ -114,6 +113,7 @@ } STRINGS { bibfield output.bibfield } + FUNCTION {not} { { #0 } { #1 } @@ -138,6 +138,399 @@ #-1 #1 substring$ "." = } +INTEGERS { arith.mulitplier arith.multiplicand } + +FUNCTION {multiply} +{ + 'arith.multiplicand := + 'arith.mulitplier := + #0 + { arith.mulitplier #0 > } + { arith.multiplicand + + arith.mulitplier #1 - 'arith.mulitplier := + } + while$ +} + +FUNCTION {chr.to.hex} +{ + chr.to.int$ + duplicate$ "0" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #9 > or not + { swap$ pop$ } + { pop$ + duplicate$ "A" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + duplicate$ "a" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + pop$ #-1 + } + if$ + } + if$ + } + if$ +} + +INTEGERS { arith.accumulator } + +FUNCTION {str.to.hex} +{ #0 'arith.accumulator := + { duplicate$ empty$ not } + { duplicate$ #1 #1 substring$ chr.to.hex + duplicate$ #0 < + { pop$ pop$ "" + } + { arith.accumulator #16 multiply + 'arith.accumulator := + #2 global.max$ substring$ + } + if$ + } + while$ + pop$ arith.accumulator +} + +FUNCTION {diagn.cmntlog} +{ + duplicate$ top$ "%" swap$ * write$ newline$ +} + +INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year } + +INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed } + +FUNCTION { control.init } +{ + #0 + 'control.key := + #0 + #1 + + #8 + + 'control.author := + #0 + 'control.author.jnrlst := + #0 + 'control.author.dotless := + #0 + 'control.author.nospace := + #1 + 'control.author.initials := + #0 + 'control.author.nocomma := + #0 + 'control.author.first := + #1 + 'control.author.reversed := + #0 + 'control.editor := + #-1 + 'control.title := + #0 + 'control.pages := + #0 + 'control.eprint := + #1 + 'control.year := +} + +FUNCTION {warning.dependency} +{ + " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$ +} + +FUNCTION {control.check} +{ + control.editor + { + "editor formatted same as author" + control.author.reversed { + duplicate$ #0 swap$ "reversed" warning.dependency + #0 'control.author.reversed := + } 'skip$ if$ + control.author.first { + duplicate$ #0 swap$ "first" warning.dependency + #0 'control.author.first := + } 'skip$ if$ + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + pop$ + } 'skip$ if$ + control.author.reversed 'skip$ + { + "not reversed" + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.jnrlst 'skip$ { + duplicate$ #1 swap$ "jnrlst" warning.dependency + #1 'control.author.jnrlst := + } if$ + control.author.initials { + duplicate$ ", initials" * + control.author.dotless { + duplicate$ #0 swap$ "dotless" warning.dependency + #0 'control.author.dotless := + } 'skip$ if$ + pop$ + } 'skip$ if$ + pop$ + } + if$ + control.author.initials 'skip$ { + "not initials" + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.dotless 'skip$ { + duplicate$ #1 swap$ "dotless" warning.dependency + #1 'control.author.dotless := + } if$ + pop$ + } if$ +} + +FUNCTION {control.parse} +{ + duplicate$ duplicate$ missing$ + { + pop$ pop$ pop$ + } + { empty$ + { + pop$ #-1 + }{ + str.to.hex + } + if$ + swap$ := + } + if$ +} + +FUNCTION {control.dump} +{ + duplicate$ missing$ { pop$ "N/A" } 'skip$ if$ + "{" swap$ * "}, " * + * +} + +INTEGERS { decode.threshold } + +FUNCTION {control.decode} +{ + - duplicate$ + #0 < + { + skip$ pop$ swap$ #0 + } + { + swap$ pop$ swap$ #1 + } + if$ + swap$ := +} + +FUNCTION {control.author.decode} +{ + control.author + duplicate$ duplicate$ #0 < swap$ #128 < not or + { + int.to.str$ "(" swap$ * ")" * + "Control cannot interpret author " swap$ * + warning$ + }{ + 'control.author.jnrlst swap$ duplicate$ #64 control.decode + 'control.author.dotless swap$ duplicate$ #32 control.decode + 'control.author.nospace swap$ duplicate$ #16 control.decode + 'control.author.initials swap$ duplicate$ #8 control.decode + 'control.author.nocomma swap$ duplicate$ #4 control.decode + 'control.author.first swap$ duplicate$ #2 control.decode + 'control.author.reversed swap$ duplicate$ #1 control.decode + duplicate$ #0 = + 'skip$ + { + "Control: residue of author" + "(" swap$ * ")" * * + warning$ + } + if$ + pop$ + } + if$ +} + +FUNCTION {control.setup} +{ + type$ cite$ "{" swap$ * "}, " * * + "control.key" key control.dump * + "control.author" author control.dump * + "control.editor" editor control.dump * + "control.title" title control.dump * + "control.pages" pages control.dump * + "control.year" year control.dump * + "control.eprint" eprint control.dump * + top$ + 'control.key key control.parse + 'control.author author control.parse + 'control.editor editor control.parse + 'control.title title control.parse + 'control.pages pages control.parse + 'control.year year control.parse + 'control.eprint eprint control.parse + control.author.decode +} + +FUNCTION {control.pass} +{ type$ "control" = 'control.setup 'skip$ if$ +} + +FUNCTION {control.presort} +{ +} + +FUNCTION {control.forward} +{ +} + +FUNCTION {control.reverse} +{ +} + +FUNCTION {control.sort} +{ +} + +FUNCTION {control.longest.label} +{ +} + +FUNCTION {control.key.bib} +{ + "Control: key " + control.key + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + pop$ * + diagn.cmntlog +} + +FUNCTION {control.author.bib} +{ + "Control: author " + control.author "(" swap$ int.to.str$ * ")" * * + control.author.reversed { " reversed" * }{} if$ + control.author.first { " first" * }{} if$ + control.author.nocomma { " nocomma" * }{} if$ + control.author.initials { " initials" * }{} if$ + control.author.nospace { " nospace" * }{} if$ + control.author.dotless { " dotless" * }{} if$ + control.author.jnrlst { " jnrlst" * }{} if$ + diagn.cmntlog +} + +FUNCTION {control.editor.bib} +{ + "Control: editor formatted " + control.editor + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "identically to author" + } { + "differently from author" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.title.bib} +{ + "Control: production of article title " + control.title + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled" + } { + #0 > { + "required" + } { + "allowed" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.pages.bib} +{ + "Control: page " + control.pages + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "none" + } { + #0 > { + "range" + } { + "single" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.year.bib} +{ + "Control: year " + control.year + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "truncated" + } { + "verbatim" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.eprint.bib} +{ + "Control: production of eprint " + control.eprint + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + #0 < { "disabled" } { "enabled" } if$ * * + diagn.cmntlog +} + +FUNCTION {control.bib} +{ + control.key.bib + control.author.bib + control.editor.bib + control.title.bib + control.pages.bib + control.year.bib + control.eprint.bib +} + FUNCTION {init.state.consts} { #0 'before.all := @@ -182,7 +575,7 @@ duplicate$ "2(" swap$ * ")" * top$ } -FUNCTION {bibfield.command}{ "\bibfield"} +FUNCTION {bibfield.command}{ "\bibfield "} FUNCTION {output.nonnull} { @@ -212,9 +605,7 @@ output.bibfield duplicate$ empty$ 'pop$ { bibfield.command - "{" * swap$ * "}{%" * write$ newline$ - " " swap$ * "}%" * write$ newline$ - " " + " {" * swap$ * "} {" * swap$ * "}" * } if$ write$ @@ -245,6 +636,12 @@ if$ } +FUNCTION {output.nopunct} +{ + punctuation.no 'punctuation.state := + output.nonnull +} + FUNCTION {output.check} { swap$ duplicate$ empty$ @@ -253,9 +650,9 @@ if$ } -FUNCTION {bbl.open} { "\BibitemOpen" } +FUNCTION {bbl.open} { "\BibitemOpen " } -FUNCTION {bbl.shut} { "\BibitemShut" } +FUNCTION {bbl.shut} { "\BibitemShut " } FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * } @@ -332,7 +729,7 @@ FUNCTION {no.blank.or.punct} { - "\hspace{0pt}" * + "\hspace {0pt}" * before.all 'output.state := } @@ -342,6 +739,23 @@ skip$ } +STRINGS {z} +FUNCTION {remove.dots} +{ + control.author.dotless { + 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ + } 'skip$ if$ +} + FUNCTION {new.block.checkb} { empty$ swap$ empty$ @@ -363,7 +777,7 @@ duplicate$ empty$ { pop$ "" } { - "\emph{" swap$ * "}" * + "\emph {" swap$ * "}" * } if$ } @@ -371,7 +785,7 @@ FUNCTION {bolden} { duplicate$ empty$ { pop$ "" } - { "\textbf{" swap$ * "}" * } + { "\textbf {" swap$ * "}" * } if$ } @@ -380,7 +794,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibnamefont{" swap$ * "}" * + "\bibnamefont {" swap$ * "}" * } if$ } @@ -390,7 +804,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibfnamefont{" swap$ * "}" * + "\bibfnamefont {" swap$ * "}" * } if$ } @@ -400,7 +814,7 @@ duplicate$ empty$ { pop$ "" } { - "\citenamefont{" swap$ * "}" * + "\citenamefont {" swap$ * "}" * } if$ } @@ -424,6 +838,7 @@ % Here are the language-specific definitions for explicit words. % Each function has a name bbl.xxx where xxx is the English word. % The language selected here is ENGLISH + FUNCTION {bbl.and} { "and" @@ -563,7 +978,7 @@ FUNCTION {bbl.url.prefix} { - "\urlprefix" + "\urlprefix " } FUNCTION {eng.ord} @@ -875,7 +1290,7 @@ MACRO {tcs} {"Theor. Comput. Sci."} -FUNCTION {bibinfo.command} { "\bibinfo" } +FUNCTION {bibinfo.command} { "\bibinfo " } FUNCTION {bibinfo.check} { swap$ @@ -889,7 +1304,7 @@ swap$ pop$ }{ swap$ - bibinfo.command " {" * swap$ * "} {" * swap$ * "}" * + bibinfo.command "{" * swap$ * "} {" * swap$ * "}" * } if$ } @@ -927,11 +1342,14 @@ FUNCTION {eprint.command} { - "\Eprint" + "\Eprint " } FUNCTION {format.eprint} -{ eprint duplicate$ empty$ +{ + eprint duplicate$ empty$ + control.eprint #0 < + or { pop$ "" } { duplicate$ @@ -939,13 +1357,13 @@ archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ * "/" * swap$ * - "{" swap$ * "}" * + "{" swap$ * "} " * swap$ "" archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ * swap$ * primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ * - "{" swap$ * "}" * + "{" swap$ * "} " * * eprint.command swap$ * } @@ -967,7 +1385,7 @@ url duplicate$ empty$ { pop$ "" } { - "\url" + "\url " "{" * swap$ * "}" * } if$ @@ -990,127 +1408,340 @@ STRINGS { bibinfo} +FUNCTION {format.names.fname} +{ + control.author.initials { + control.author.dotless { + control.author.nospace { + "f{}" + } { + "f{~}" + } if$ + } { + control.author.nospace { + "f{.}." + } { + "f." + } if$ + } if$ + } { + "ff" + } if$ +} + +FUNCTION {bracify} +{ + "{" swap$ * "}" * +} + +FUNCTION {name.comma} +{ + control.author.nocomma 'skip$ { "," swap$ * } if$ +} + +FUNCTION {format.names.format.onefont} +{ + "{vv~}{ll}" + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + control.author.initials { + "f" + control.author.dotless 'skip$ { + "." * + } if$ + "~" * + } { + "ff" + } if$ + bracify + swap$ + } { + format.names.fname + " " swap$ * + name.comma + bracify + } + if$ + "jj" + " " swap$ * + name.comma + bracify + control.author.jnrlst 'skip$ 'swap$ if$ + * * +} + +FUNCTION {format.names.onefont} +{ + s nameptr format.names.format.onefont format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.morfont} +{ s nameptr + "{vv~}{ll}" format.name$ bib.name.font + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + s nameptr + control.author.initials { + "f" % default: name + surname + comma junior + } { + "ff" + } if$ + control.author.dotless 'skip$ { + "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials + } if$ + bracify + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + swap$ + * + s nameptr + "{jj}" format.name$ duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } { + "," * + s nameptr + format.names.fname + "jj" + " " + name.comma + control.author.jnrlst { + swap$ * skip$ + } { + skip$ * swap$ + } if$ + bracify swap$ bracify swap$ + * + format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } if$ + * +} + +FUNCTION {names.punctuate} +{ + "," * + " " * +} + FUNCTION {format.names} { 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{vv~}{ll}" format.name$ bib.name.font - s nameptr - "{jj, }{f.}" - format.name$ duplicate$ empty$ 'skip$ - { bib.fname.font ", " swap$ * } - if$ - * - bibinfo bibinfo.check - type$ "presentation" = - { check.speaker } - 'skip$ - if$ - 't := - nameptr #1 > - { - namesleft #1 > - { - ", " * - t * - }{ - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - numnames #2 > - { - "," * - } - 'skip$ - if$ - t "others" = - { - " " * bbl.etal - emphasize - * - }{ - bbl.and - space.word * - t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ + duplicate$ empty$ { pop$ "" } { + duplicate$ num.names$ + duplicate$ 'numnames := + 'namesleft := + 's := + #1 'nameptr := + "" + { namesleft #0 > } + { + format.names.morfont + bibinfo bibinfo.check + type$ "presentation" = + 'check.speaker + 'skip$ + if$ + 't := + nameptr #1 > not + { + t * + } { + namesleft #1 > + { + names.punctuate + t * + } { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * + bbl.etal + emphasize + * + } { + bbl.and + space.word * + t * + } + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ } if$ } -FUNCTION {format.names.ed} +FUNCTION {format.names.ed.onefont} { - 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f.}" format.name$ duplicate$ empty$ 'skip$ + s nameptr + control.author.initials { + control.author.dotless { + control.author.nospace { + "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx + } { + "{f{~}~}{vv~}{ll}{ jj}" % nm-rv + } if$ + } { + control.author.nospace { + "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc + }{ + "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1 + } if$ + } if$ + } { + "{ff~}{vv~}{ll}{, jj}" + } if$ + format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.ed.morfont} +{ + control.author.reversed { % + control.author.initials { % + control.author.dotless { % + s nameptr + control.author.nospace { % nm-rvx nm-rvcx + "{f{}}" + } { % nm-rv + "{f{~}}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } { % !control.author.dotless + s nameptr + control.author.nospace { % nm-rvv + "{ff}" + } { % nm-rev nm-rev1 + "{f.}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } if$ + } { % Full names !control.author.initials nm-revf nm-revv1 + s nameptr + "{ff}" + format.name$ duplicate$ empty$ 'skip$ { tie.or.space.prefix bib.fname.font swap$ * } if$ s nameptr "{vv~}{ll}" format.name$ bib.name.font * s nameptr - "{jj}" format.name$ duplicate$ empty$ 'skip$ + "{jj}" format.name$ + duplicate$ empty$ 'skip$ { bib.fname.font ", " swap$ * } if$ - * - bibinfo bibinfo.check - 't := - nameptr #1 > - { - namesleft #1 > - { - ", " * - t * - }{ - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - numnames #2 > - { - "," * - } - { skip$ } - if$ - t "others" = - { + } if$ + } { % !control.author.reversed nm-init + s nameptr + "{f.}" + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } if$ + * +} - " " * bbl.etal emphasize * - }{ - bbl.and - space.word * t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ +FUNCTION {format.names.ed} +{ + control.editor #0 > { + format.names + } { + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.names.ed.morfont + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { + names.punctuate + t * + }{ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * bbl.etal emphasize * + }{ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ } if$ } @@ -1149,25 +1780,12 @@ if$ } -FUNCTION {format.isbn} +FUNCTION {format.isbn.output} { - isbn "isbn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISBN " swap$ * - } - if$ } -FUNCTION {format.issn} -{ issn "issn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISSN " swap$ * - } - if$ +FUNCTION {format.issn.output} +{ } FUNCTION {doi.base} @@ -1175,41 +1793,60 @@ "http://dx.doi.org/" } -FUNCTION {doi.command} +FUNCTION {doi.base.command} { - "\doi" + "\doibase " } -FUNCTION {doi.command.href} +FUNCTION {noop.command} { - "\Doi" + "\href@noop " } -FUNCTION {format.doi} -{ doi "doi" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - doi.command "{" * swap$ * "}" * - } - if$ +FUNCTION {href.command} +{ + "\href " } -FUNCTION {add.doi} +FUNCTION {link.tag.open} { - duplicate$ empty$ 'skip$ + doi duplicate$ empty$ { - doi duplicate$ empty$ 'pop$ + pop$ + url duplicate$ empty$ { - "{" swap$ * "}" * - swap$ - "{" swap$ * "}" * - * - doi.command.href swap$ * + pop$ "" noop.command + }{ + href.command } if$ } + { + doi.base.command swap$ * + href.command + } if$ + "{" * swap$ * "} {" * +} + +FUNCTION {link.tag.shut} +{ + "}" +} + +FUNCTION {link.open} +{ + link.tag.open output.nopunct +} + +FUNCTION {link.shut} +{ + link.tag.shut * +} + +FUNCTION {add.doi} +{ + link.tag.open swap$ * link.tag.shut * } FUNCTION {select.language} @@ -1244,7 +1881,7 @@ FUNCTION {bbl.enquote} { - "\enquote" + "\enquote " } FUNCTION {string.enquote} @@ -1252,7 +1889,7 @@ punctuation.no 'punctuation.state := non.stop { block.punctuation - } { "." } if$ + } { "" } if$ swap$ pop$ * bbl.enquote "{" * swap$ * "}" * @@ -1279,6 +1916,14 @@ if$ } +FUNCTION {format.name.apply} +{ + s nameptr + "{vv~}{ll}" + format.name$ + cite.name.font +} + FUNCTION {format.full.names} { 's := @@ -1287,10 +1932,7 @@ s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } - { s nameptr - "{vv~}{ll}" - format.name$ - cite.name.font + { format.name.apply 't := nameptr #1 > { @@ -1365,14 +2007,14 @@ newline$ "" label - * - ")" * + * ")" * make.full.names duplicate$ short.list = { pop$ }{ * } if$ - "{" swap$ * "}" * + bracify "[" swap$ * "]" * - "{" * cite$ * "}%" * - "\bibitem" + cite$ bracify "%" * + * + "\bibitem " swap$ * write$ newline$ " " @@ -1668,7 +2310,16 @@ { pop$ pop$ format.pages } { volnum.punct * swap$ - first.page + control.pages duplicate$ #0 < { + pop$ pop$ + }{ + #0 > + { + n.dashify + }{ + first.page + } if$ + } if$ "pages" bibinfo.check * } @@ -1699,7 +2350,6 @@ FUNCTION {format.ser.vol.num} { series "series" bibinfo.check output - after.punctuation 'output.state := volume field.or.null duplicate$ empty$ 'skip$ { @@ -1774,7 +2424,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1788,7 +2438,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1930,6 +2580,27 @@ output } +FUNCTION {article.title.produce} +{ + control.title duplicate$ #0 < + { pop$ + }{ + format.title + "title" 'bibfield := + swap$ #0 > + { + "title" output.check + }{ + output + } if$ + new.block.comma + } if$ +} + +FUNCTION {control} +{ +} + FUNCTION {article} { output.bibitem format.authors @@ -1938,32 +2609,34 @@ }{ output } if$ author format.key output new.block.comma + article.title.produce output.article.booktitle crossref missing$ { + link.open journal "journal" bibinfo.warn - pages empty$ 'skip$ { add.doi } if$ "journal" 'bibfield := output + add.blank format.ser.vol.num output eid.or.pages format.date.output.check + pages empty$ { + doi output + } 'skip$ if$ + link.shut }{ format.article.crossref output.nonnull format.pages output } if$ - format.issn output - pages empty$ { - format.doi output - } 'skip$ if$ + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output format.translation output fin.entry } @@ -1972,25 +2645,28 @@ { output.bibitem author empty$ { + format.editors "author and editor" output.check + editor format.key output }{ format.authors output.nonnull - crossref missing$ { editor.check.book } 'skip$ if$ +% crossref missing$ { editor.check.book } 'skip$ if$ } if$ new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut format.edition output author empty$ { - format.editor.in output - editor format.key output } { + format.editor.in output + editor format.key output } if$ - format.number.series output + format.number.series output crossref missing$ { format.bvolume output @@ -2002,14 +2678,13 @@ format.date.output.check } if$ - format.isbn output - format.chapter.pages - output + format.isbn.output + format.chapter.pages + output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2018,20 +2693,26 @@ format.authors output author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output format.date.output - format.isbn output + format.isbn.output format.book.pages output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output + fin.entry +} + +FUNCTION {footnote} +{ output.bibitem + format.note output fin.entry } @@ -2071,14 +2752,13 @@ } if$ crossref missing$ - { format.isbn output } + { format.isbn.output } 'skip$ if$ new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2087,13 +2767,14 @@ format.authors "author" output.check author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle format.publisher.address output format.edition output format.chapter.pages output - format.isbn output + format.isbn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2103,7 +2784,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2112,13 +2792,14 @@ format.authors "author" output.check author format.key output new.block.comma + article.title.produce crossref missing$ { format.in.ed.booktitle format.organization.publisher.address output format.chapter.pages output - format.isbn output - format.issn output + format.isbn.output + format.issn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2128,7 +2809,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2138,9 +2818,10 @@ format.authors output author format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut organization "organization" bibinfo.check output address "address" bibinfo.check output format.edition output @@ -2149,7 +2830,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2161,17 +2841,17 @@ format.btitle output new.block.comma + link.open bbl.mthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2180,9 +2860,10 @@ format.authors output author format.key output new.block.comma + link.open format.title - add.doi output + link.shut new.block.comma howpublished "howpublished" bibinfo.check output format.date.output @@ -2190,7 +2871,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2202,17 +2882,17 @@ format.btitle output new.block.comma + link.open bbl.phdthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output format.date.output.check new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2221,7 +2901,10 @@ format.authors output author format.key output new.block.comma - format.title output + link.open + format.title + output + link.shut new.block.comma format.organization.address "organization and address" output.check month "month" output.check @@ -2233,7 +2916,6 @@ type missing$ 'skip$ {"(" type capitalize * ")" * output} if$ - new.block.comma format.url output fin.entry } @@ -2242,20 +2924,20 @@ format.editors output editor format.key output new.block.comma + link.open format.btitle - add.doi "title" output.check + link.shut bookaddress "address" bibinfo.check output format.number.series output format.bvolume output format.organization.publisher.address output - format.isbn output - format.issn output + format.isbn.output + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2264,9 +2946,10 @@ format.authors "author" output.check author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut new.block.comma format.tr.number output.nonnull @@ -2276,7 +2959,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2285,26 +2967,35 @@ format.authors "author" output.check author format.key output new.block.comma + link.open format.title - add.doi "title" output.check + link.shut format.date.output new.block.comma new.sentence.comma format.note "note" output.check format.eprint output - format.url output fin.entry } FUNCTION {default.type} { misc } + READ + +EXECUTE {control.init} + +ITERATE {control.pass} + +EXECUTE {control.check} + FUNCTION {sortify} { purify$ "l" change.case$ } INTEGERS { len } + FUNCTION {chop.word} { 's := 'len := @@ -2314,39 +3005,62 @@ if$ } +FUNCTION {cite.name.font.apply} +{ + word.space * bbl.etal + emphasize + * +} + FUNCTION {format.lab.names} { 's := "" 't := - s #1 - "{vv~}{ll}" - format.name$ - cite.name.font - s num.names$ duplicate$ - #2 > - { pop$ - word.space * bbl.etal - emphasize - * - }{ - #2 < - 'skip$ + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.name.apply + 't := + nameptr #1 > { - s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + nameptr + #2 + = + numnames + #3 + > and + { + "others" 't := + #1 'namesleft := + } + 'skip$ + if$ + namesleft #1 > + { ", " * t * } { - word.space * bbl.etal - emphasize - * - }{ - bbl.and space.word * - s #2 "{vv~}{ll}" format.name$ - cite.name.font - * + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + t "others" = + { + cite.name.font.apply + }{ + numnames #2 > { "," * } 'skip$ if$ + bbl.and + space.word * t * + } + if$ } if$ } + 't if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := } - if$ + while$ } FUNCTION {author.key.label} @@ -2401,19 +3115,18 @@ } FUNCTION {calc.label} -{ calc.short.authors +{ + calc.short.authors short.list - "(" - * year duplicate$ empty$ { pop$ "" }{ - purify$ #-1 #4 substring$ + control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$ } if$ - * - 'label := + "(" swap$ * + * 'label := } FUNCTION {sort.format.names} @@ -2424,7 +3137,13 @@ numnames 'namesleft := { namesleft #0 > } { s nameptr - "{ll{ }}{ f{ }}{ jj{ }}" + "{ll{ }}" + control.author.initials { + "{ f{ }}" * + }{ + "{ ff{ }}" * + } if$ + "{ jj{ }}" * format.name$ 't := nameptr #1 > { @@ -2485,6 +3204,11 @@ if$ } +FUNCTION {year.sort.key} +{ + year +} + FUNCTION {editor.sort} { editor empty$ { key empty$ @@ -2498,8 +3222,21 @@ if$ } -FUNCTION {presort} -{ calc.label +INTEGERS { seq.num } + +FUNCTION {init.seq} +{ #0 'seq.num :=} + +EXECUTE {init.seq} + +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} + +FUNCTION {label.presort} +{ + calc.label label sortify " " * @@ -2519,17 +3256,24 @@ * " " * - title field.or.null - sort.format.title + title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } -ITERATE {presort} +FUNCTION {presort.pass} +{ type$ "control" = 'control.presort 'label.presort if$ +} + +ITERATE {presort.pass} + SORT + STRINGS { last.label next.extra } + INTEGERS { last.extra.num number.label } + FUNCTION {initialize.extra.label.stuff} { #0 int.to.chr$ 'last.label := "" 'next.extra := @@ -2537,8 +3281,9 @@ #0 'number.label := } -FUNCTION {forward.pass} -{ last.label label = +FUNCTION {label.forward} +{ + last.label label = { last.extra.num #1 + 'last.extra.num := last.extra.num int.to.chr$ 'extra.label := } @@ -2550,7 +3295,7 @@ number.label #1 + 'number.label := } -FUNCTION {reverse.pass} +FUNCTION {label.reverse} { next.extra "b" = { "a" 'extra.label := } 'skip$ @@ -2566,31 +3311,47 @@ } EXECUTE {initialize.extra.label.stuff} + +FUNCTION {forward.pass} +{ type$ "control" = 'control.forward 'label.forward if$ +} + ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ type$ "control" = 'control.reverse 'label.reverse if$ +} + REVERSE {reverse.pass} -FUNCTION {bib.sort.order} + +FUNCTION {sortkey.sort} { sort.label " " * - year + year.sort.key field.or.null sortify * " " * - title field.or.null - sort.format.title + title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } -ITERATE {bib.sort.order} +FUNCTION {bib.sort.pass} +{ type$ "control" = 'control.sort 'sortkey.sort if$ +} + +ITERATE {bib.sort.pass} + SORT + FUNCTION {init.bib.eprint} { - "\texttt{" + "\texttt {" pop$ - "\providecommand \url [0]{\begingroup\@sanitize \@url }%" write$ newline$ + "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$ "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$ "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$ eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$ @@ -2598,37 +3359,18 @@ FUNCTION {init.bib.doi} { - "\@ifxundefined \urlstyle {%" write$ newline$ - " \providecommand \doi [1]{doi:\discretionary{}{}{}#1}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand \doi [0]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url }%" - write$ newline$ - "}%" write$ newline$ - "\providecommand \doibase [0]{" doi.base * "}%" * write$ newline$ - doi.command.href "\providecommand " swap$ * "[1]{\href{\doibase#1}}%" * write$ newline$ + "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$ } FUNCTION {init.bib.hypertex} { - "\providecommand\href[0]{\@sanitize\@href}%" write$ newline$ - "\providecommand\@href[1]{\endgroup\@@startlink{#1}\endgroup\@@href}%" write$ newline$ - "\providecommand\@@href[1]{#1\@@endlink}%" write$ newline$ - "\providecommand \@sanitize [0]{\begingroup\catcode`\&12\catcode`\#12\relax}%" write$ newline$ - "\@ifxundefined \pdfoutput {\@firstoftwo}{%" write$ newline$ - " \@ifnum{\z@=\pdfoutput}{\@firstoftwo}{\@secondoftwo}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{\leavevmode\special{html:}}%" * write$ newline$ - " \providecommand\@@endlink[0]{\special{html:}}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{%" write$ newline$ - " \leavevmode" write$ newline$ - " \pdfstartlink" write$ newline$ - " attr{/Border[0 0 1 ]/H/I/C[0 1 1]}%" write$ newline$ - " user{/Subtype/Link/A<>}%" write$ newline$ - " \relax" write$ newline$ - " }%" write$ newline$ - " \providecommand\@@endlink[0]{\pdfendlink}%" write$ newline$ - "}%" write$ newline$ + "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$ + "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$ + "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$ + "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$ + "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$ + "\providecommand \@@startlink[1]{}%" write$ newline$ + "\providecommand \@@endlink[0]{}%" write$ newline$ } FUNCTION {init.bib.namefont} @@ -2683,15 +3425,18 @@ { warn.bib "\makeatletter" write$ newline$ - "\providecommand \@ifxundefined [1]{%" write$ newline$ - " \ifx #1\undefined \expandafter \@firstoftwo" write$ newline$ - " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + "\providecommand \@ifxundefined [1]{%" write$ newline$ + " \@ifx{#1\undefined}" write$ newline$ "}%" write$ newline$ "\providecommand \@ifnum [1]{%" write$ newline$ " \ifnum #1\expandafter \@firstoftwo" write$ newline$ " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + " \fi" write$ newline$ + "}%" write$ newline$ + "\providecommand \@ifx [1]{%" write$ newline$ + " \ifx #1\expandafter \@firstoftwo" write$ newline$ + " \else \expandafter \@secondoftwo" write$ newline$ + " \fi" write$ newline$ "}%" write$ newline$ init.bib.ay init.bib.quote @@ -2704,12 +3449,14 @@ init.bib.translation init.bib.endbibitem "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$ + "\let\auto@bib@innerbib\@empty" write$ newline$ "%" write$ } FUNCTION {begin.bib} { - id.bst duplicate$ top$ "%" swap$ * write$ newline$ + id.bst diagn.cmntlog + control.bib preamble$ empty$ 'skip$ { preamble$ write$ newline$ } @@ -2722,8 +3469,11 @@ } EXECUTE {begin.bib} + EXECUTE {init.state.consts} + ITERATE {call.type$} + FUNCTION {end.bib} { newline$ "\end{thebibliography}%" @@ -2731,6 +3481,7 @@ } EXECUTE {end.bib} + %% End of customized bst file %% %% End of file `aipauth4-1.bst'. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/bibtex/bst/revtex/apsrmp4-1.bst +++ texlive-extra-2009/texmf-dist/bibtex/bst/revtex/apsrmp4-1.bst @@ -4,13 +4,13 @@ %% %% The original source files were: %% -%% merlin.mbs (with options: `head,ay,nat,lang,annote,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-com,aymth,dtrev,date-nil-x,note-yr,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,isbn,issn,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% physjour.mbs (with options: `ay,nat,lang,annote,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-com,aymth,dtrev,date-nil-x,note-yr,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,isbn,issn,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% geojour.mbs (with options: `ay,nat,lang,annote,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-com,aymth,dtrev,date-nil-x,note-yr,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,isbn,issn,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% photjour.mbs (with options: `ay,nat,lang,annote,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-com,aymth,dtrev,date-nil-x,note-yr,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,isbn,issn,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') -%% merlin.mbs (with options: `tail,ay,nat,lang,annote,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-com,aymth,dtrev,date-nil-x,note-yr,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,isbn,issn,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `head,ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% physjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% geojour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% photjour.mbs (with options: `ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') +%% merlin.mbs (with options: `tail,ay,nat,lang,pres,pres-bf,vonx,nm-rev1,jnrlst,nmft,nmft-def,fnm-def,nmfted,nmand-rm,lab,lab-def,and-rm,keyxyr,dt-beg,yr-par,dtrev,date-nil-x,tit-qq,inproceedings-chapter,jtit-x,inproceedings-chapter,article-booktitle,article-series,jttl-rm,journal-address,book-bt,thesis-title-o,trtit-b,techreport-institution-par,vol-bf,vnum-sp,volp-com,jpg-1,pp-last,book-editor-booktitle,inbook-editor-booktitle,bookaddress,num-xser,number-cap,chapter-cap,series-number,numser-booktitle,ser-vol,ser-rm,volume-cap,ser-ed,jnm-x,pg-bk,book-chapter-pages,pub-par,ay-empty-pub-parens-x,pre-edn,school-par,doi-link,doi,bkedcap,edby,blk-com,fin-endbibitem,pp,ed,abr,ednx,ord,jabr,and-com,etal-it,revdata,eprint,url,url-blk,translation,SLACcitation,numpages-x,url,url-prefix-x,bibinfo,bibfield,nfss,,{}') %% ---------------------------------------- -%% *** REVTeX-compatible RMP 2009-10-08 *** +%% *** REVTeX-compatible RMP 2010-07-25 *** %% %% Copyright 1994-2007 Patrick W Daly % =============================================================== @@ -24,7 +24,6 @@ % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2008/01/17 4.21 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in ENGLISH @@ -55,11 +54,10 @@ % \citeyear{key} ==>> 1990 %--------------------------------------------------------------------- -FUNCTION {id.bst} {"Merlin.mbs v4.21 2009-07-09. "} +FUNCTION {id.bst} {"merlin.mbs apsrmp4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked"} ENTRY { address - annote archive archivePrefix author @@ -115,6 +113,7 @@ } STRINGS { bibfield output.bibfield } + FUNCTION {not} { { #0 } { #1 } @@ -139,6 +138,401 @@ #-1 #1 substring$ "." = } +INTEGERS { arith.mulitplier arith.multiplicand } + +FUNCTION {multiply} +{ + 'arith.multiplicand := + 'arith.mulitplier := + #0 + { arith.mulitplier #0 > } + { arith.multiplicand + + arith.mulitplier #1 - 'arith.mulitplier := + } + while$ +} + +FUNCTION {chr.to.hex} +{ + chr.to.int$ + duplicate$ "0" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #9 > or not + { swap$ pop$ } + { pop$ + duplicate$ "A" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + duplicate$ "a" chr.to.int$ - + duplicate$ duplicate$ #0 < swap$ #5 > or not + { swap$ pop$ #10 + } + { pop$ + pop$ #-1 + } + if$ + } + if$ + } + if$ +} + +INTEGERS { arith.accumulator } + +FUNCTION {str.to.hex} +{ #0 'arith.accumulator := + { duplicate$ empty$ not } + { duplicate$ #1 #1 substring$ chr.to.hex + duplicate$ #0 < + { pop$ pop$ "" + } + { arith.accumulator #16 multiply + 'arith.accumulator := + #2 global.max$ substring$ + } + if$ + } + while$ + pop$ arith.accumulator +} + +FUNCTION {diagn.cmntlog} +{ + duplicate$ top$ "%" swap$ * write$ newline$ +} + +INTEGERS { control.key control.author control.editor control.title control.pages control.eprint control.year } + +INTEGERS { control.author.jnrlst control.author.dotless control.author.nospace control.author.initials control.author.nocomma control.author.first control.author.reversed } + +FUNCTION { control.init } +{ + #0 + 'control.key := + #0 + #1 + + #2 + + #8 + + #64 + + 'control.author := + #1 + 'control.author.jnrlst := + #0 + 'control.author.dotless := + #0 + 'control.author.nospace := + #1 + 'control.author.initials := + #0 + 'control.author.nocomma := + #1 + 'control.author.first := + #1 + 'control.author.reversed := + #0 + 'control.editor := + #-1 + 'control.title := + #0 + 'control.pages := + #0 + 'control.eprint := + #1 + 'control.year := +} + +FUNCTION {warning.dependency} +{ + " (dependency: " * swap$ * ") set " * swap$ int.to.str$ * warning$ +} + +FUNCTION {control.check} +{ + control.editor + { + "editor formatted same as author" + control.author.reversed { + duplicate$ #0 swap$ "reversed" warning.dependency + #0 'control.author.reversed := + } 'skip$ if$ + control.author.first { + duplicate$ #0 swap$ "first" warning.dependency + #0 'control.author.first := + } 'skip$ if$ + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + pop$ + } 'skip$ if$ + control.author.reversed 'skip$ + { + "not reversed" + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.jnrlst 'skip$ { + duplicate$ #1 swap$ "jnrlst" warning.dependency + #1 'control.author.jnrlst := + } if$ + control.author.initials { + duplicate$ ", initials" * + control.author.dotless { + duplicate$ #0 swap$ "dotless" warning.dependency + #0 'control.author.dotless := + } 'skip$ if$ + pop$ + } 'skip$ if$ + pop$ + } + if$ + control.author.initials 'skip$ { + "not initials" + control.author.nocomma { + duplicate$ #0 swap$ "nocomma" warning.dependency + #0 'control.author.nocomma := + } 'skip$ if$ + control.author.nospace { + duplicate$ #0 swap$ "nospace" warning.dependency + #0 'control.author.nospace := + } 'skip$ if$ + control.author.dotless 'skip$ { + duplicate$ #1 swap$ "dotless" warning.dependency + #1 'control.author.dotless := + } if$ + pop$ + } if$ +} + +FUNCTION {control.parse} +{ + duplicate$ duplicate$ missing$ + { + pop$ pop$ pop$ + } + { empty$ + { + pop$ #-1 + }{ + str.to.hex + } + if$ + swap$ := + } + if$ +} + +FUNCTION {control.dump} +{ + duplicate$ missing$ { pop$ "N/A" } 'skip$ if$ + "{" swap$ * "}, " * + * +} + +INTEGERS { decode.threshold } + +FUNCTION {control.decode} +{ + - duplicate$ + #0 < + { + skip$ pop$ swap$ #0 + } + { + swap$ pop$ swap$ #1 + } + if$ + swap$ := +} + +FUNCTION {control.author.decode} +{ + control.author + duplicate$ duplicate$ #0 < swap$ #128 < not or + { + int.to.str$ "(" swap$ * ")" * + "Control cannot interpret author " swap$ * + warning$ + }{ + 'control.author.jnrlst swap$ duplicate$ #64 control.decode + 'control.author.dotless swap$ duplicate$ #32 control.decode + 'control.author.nospace swap$ duplicate$ #16 control.decode + 'control.author.initials swap$ duplicate$ #8 control.decode + 'control.author.nocomma swap$ duplicate$ #4 control.decode + 'control.author.first swap$ duplicate$ #2 control.decode + 'control.author.reversed swap$ duplicate$ #1 control.decode + duplicate$ #0 = + 'skip$ + { + "Control: residue of author" + "(" swap$ * ")" * * + warning$ + } + if$ + pop$ + } + if$ +} + +FUNCTION {control.setup} +{ + type$ cite$ "{" swap$ * "}, " * * + "control.key" key control.dump * + "control.author" author control.dump * + "control.editor" editor control.dump * + "control.title" title control.dump * + "control.pages" pages control.dump * + "control.year" year control.dump * + "control.eprint" eprint control.dump * + top$ + 'control.key key control.parse + 'control.author author control.parse + 'control.editor editor control.parse + 'control.title title control.parse + 'control.pages pages control.parse + 'control.year year control.parse + 'control.eprint eprint control.parse + control.author.decode +} + +FUNCTION {control.pass} +{ type$ "control" = 'control.setup 'skip$ if$ +} + +FUNCTION {control.presort} +{ +} + +FUNCTION {control.forward} +{ +} + +FUNCTION {control.reverse} +{ +} + +FUNCTION {control.sort} +{ +} + +FUNCTION {control.longest.label} +{ +} + +FUNCTION {control.key.bib} +{ + "Control: key " + control.key + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + pop$ * + diagn.cmntlog +} + +FUNCTION {control.author.bib} +{ + "Control: author " + control.author "(" swap$ int.to.str$ * ")" * * + control.author.reversed { " reversed" * }{} if$ + control.author.first { " first" * }{} if$ + control.author.nocomma { " nocomma" * }{} if$ + control.author.initials { " initials" * }{} if$ + control.author.nospace { " nospace" * }{} if$ + control.author.dotless { " dotless" * }{} if$ + control.author.jnrlst { " jnrlst" * }{} if$ + diagn.cmntlog +} + +FUNCTION {control.editor.bib} +{ + "Control: editor formatted " + control.editor + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "identically to author" + } { + "differently from author" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.title.bib} +{ + "Control: production of article title " + control.title + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled" + } { + #0 > { + "required" + } { + "allowed" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.pages.bib} +{ + "Control: page " + control.pages + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "none" + } { + #0 > { + "range" + } { + "single" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.year.bib} +{ + "Control: year " + control.year + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + duplicate$ #0 < { + pop$ + "disabled!" + } { + #0 > { + "truncated" + } { + "verbatim" + } if$ + } if$ * * + diagn.cmntlog +} + +FUNCTION {control.eprint.bib} +{ + "Control: production of eprint " + control.eprint + duplicate$ "(" swap$ int.to.str$ * ") " * swap$ + #0 < { "disabled" } { "enabled" } if$ * * + diagn.cmntlog +} + +FUNCTION {control.bib} +{ + control.key.bib + control.author.bib + control.editor.bib + control.title.bib + control.pages.bib + control.year.bib + control.eprint.bib +} + FUNCTION {init.state.consts} { #0 'before.all := @@ -183,7 +577,7 @@ duplicate$ "2(" swap$ * ")" * top$ } -FUNCTION {bibfield.command}{ "\bibfield"} +FUNCTION {bibfield.command}{ "\bibfield "} FUNCTION {output.nonnull} { @@ -213,9 +607,7 @@ output.bibfield duplicate$ empty$ 'pop$ { bibfield.command - "{" * swap$ * "}{%" * write$ newline$ - " " swap$ * "}%" * write$ newline$ - " " + " {" * swap$ * "} {" * swap$ * "}" * } if$ write$ @@ -246,6 +638,12 @@ if$ } +FUNCTION {output.nopunct} +{ + punctuation.no 'punctuation.state := + output.nonnull +} + FUNCTION {output.check} { swap$ duplicate$ empty$ @@ -254,9 +652,9 @@ if$ } -FUNCTION {bbl.open} { "\BibitemOpen" } +FUNCTION {bbl.open} { "\BibitemOpen " } -FUNCTION {bbl.shut} { "\BibitemShut" } +FUNCTION {bbl.shut} { "\BibitemShut " } FUNCTION {bibitem.shut.stop} { bbl.shut "{Stop}%" * } @@ -293,18 +691,7 @@ FUNCTION {fin.entry} { - non.stop swap$ - "%" * write$ newline$ - { "{NoStop}" } - { "{Stop}" } - if$ - annote missing$ - { - " \bibAnnoteFile" swap$ * "{" * cite$ * "}%" * - }{ - " \bibAnnote" swap$ * "{" * cite$ * "}{" * annote * add.period$ "}%" * - } - if$ + bibitem.shut write$ output.SLACcitation } @@ -344,7 +731,7 @@ FUNCTION {no.blank.or.punct} { - "\hspace{0pt}" * + "\hspace {0pt}" * before.all 'output.state := } @@ -354,6 +741,23 @@ skip$ } +STRINGS {z} +FUNCTION {remove.dots} +{ + control.author.dotless { + 'z := + "" + { z empty$ not } + { z #1 #1 substring$ + z #2 global.max$ substring$ 'z := + duplicate$ "." = 'pop$ + { * } + if$ + } + while$ + } 'skip$ if$ +} + FUNCTION {new.block.checkb} { empty$ swap$ empty$ @@ -375,7 +779,7 @@ duplicate$ empty$ { pop$ "" } { - "\emph{" swap$ * "}" * + "\emph {" swap$ * "}" * } if$ } @@ -383,7 +787,7 @@ FUNCTION {bolden} { duplicate$ empty$ { pop$ "" } - { "\textbf{" swap$ * "}" * } + { "\textbf {" swap$ * "}" * } if$ } @@ -392,7 +796,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibnamefont{" swap$ * "}" * + "\bibnamefont {" swap$ * "}" * } if$ } @@ -402,7 +806,7 @@ duplicate$ empty$ { pop$ "" } { - "\bibfnamefont{" swap$ * "}" * + "\bibfnamefont {" swap$ * "}" * } if$ } @@ -412,7 +816,7 @@ duplicate$ empty$ { pop$ "" } { - "\citenamefont{" swap$ * "}" * + "\citenamefont {" swap$ * "}" * } if$ } @@ -436,6 +840,7 @@ % Here are the language-specific definitions for explicit words. % Each function has a name bbl.xxx where xxx is the English word. % The language selected here is ENGLISH + FUNCTION {bbl.and} { "and" @@ -575,7 +980,7 @@ FUNCTION {bbl.url.prefix} { - "\urlprefix" + "\urlprefix " } FUNCTION {eng.ord} @@ -887,7 +1292,7 @@ MACRO {tcs} {"Theor. Comput. Sci."} -FUNCTION {bibinfo.command} { "\bibinfo" } +FUNCTION {bibinfo.command} { "\bibinfo " } FUNCTION {bibinfo.check} { swap$ @@ -901,7 +1306,7 @@ swap$ pop$ }{ swap$ - bibinfo.command " {" * swap$ * "} {" * swap$ * "}" * + bibinfo.command "{" * swap$ * "} {" * swap$ * "}" * } if$ } @@ -939,11 +1344,14 @@ FUNCTION {eprint.command} { - "\Eprint" + "\Eprint " } FUNCTION {format.eprint} -{ eprint duplicate$ empty$ +{ + eprint duplicate$ empty$ + control.eprint #0 < + or { pop$ "" } { duplicate$ @@ -951,13 +1359,13 @@ archive duplicate$ empty$ { pop$ archiv.base } 'skip$ if$ * "/" * swap$ * - "{" swap$ * "}" * + "{" swap$ * "} " * swap$ "" archivePrefix duplicate$ empty$ { pop$ "" } { ":" * } if$ * swap$ * primaryClass duplicate$ empty$ { pop$ "" } { " [" swap$ * "]" * } if$ * - "{" swap$ * "}" * + "{" swap$ * "} " * * eprint.command swap$ * } @@ -979,7 +1387,7 @@ url duplicate$ empty$ { pop$ "" } { - "\url" + "\url " "{" * swap$ * "}" * } if$ @@ -1002,135 +1410,337 @@ STRINGS { bibinfo} +FUNCTION {format.names.fname} +{ + control.author.initials { + control.author.dotless { + control.author.nospace { + "f{}" + } { + "f{~}" + } if$ + } { + control.author.nospace { + "f{.}." + } { + "f." + } if$ + } if$ + } { + "ff" + } if$ +} + +FUNCTION {bracify} +{ + "{" swap$ * "}" * +} + +FUNCTION {name.comma} +{ + control.author.nocomma 'skip$ { "," swap$ * } if$ +} + +FUNCTION {format.names.format.onefont} +{ + "{vv~}{ll}" + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + control.author.initials { + "f" + control.author.dotless 'skip$ { + "." * + } if$ + "~" * + } { + "ff" + } if$ + bracify + swap$ + } { + format.names.fname + " " swap$ * + name.comma + bracify + } + if$ + "jj" + " " swap$ * + name.comma + bracify + control.author.jnrlst 'skip$ 'swap$ if$ + * * +} + +FUNCTION {format.names.onefont} +{ + s nameptr format.names.format.onefont format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.morfont} +{ s nameptr + "{vv~}{ll}" format.name$ bib.name.font + nameptr #1 > + control.author.first + and + control.author.reversed not + or + { + s nameptr + control.author.initials { + "f" % default: name + surname + comma junior + } { + "ff" + } if$ + control.author.dotless 'skip$ { + "." * % nm-init % Initials. + surname (J. F. Smith) control.author.initials + } if$ + bracify + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + swap$ + * + s nameptr + "{jj}" format.name$ duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } { + "," * + s nameptr + format.names.fname + "jj" + " " + name.comma + control.author.jnrlst { + swap$ * skip$ + } { + skip$ * swap$ + } if$ + bracify swap$ bracify swap$ + * + format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } if$ + * +} + +FUNCTION {names.punctuate} +{ + "," * + " " * +} + FUNCTION {format.names} { 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - nameptr #1 > - { "{f.}" format.name$ duplicate$ empty$ 'skip$ - { tie.or.space.prefix bib.fname.font swap$ * } - if$ - s nameptr - "{vv~}{ll}" format.name$ bib.name.font * - s nameptr - "{jj}" format.name$ duplicate$ empty$ 'skip$ - { bib.fname.font ", " swap$ * } - if$ - } - { "{vv~}{ll}" format.name$ bib.name.font - s nameptr - "{f.}{, jj}" - format.name$ duplicate$ empty$ 'skip$ - { bib.fname.font ", " swap$ * } - if$ - } - if$ - * - bibinfo bibinfo.check - type$ "presentation" = - { check.speaker } - 'skip$ - if$ - 't := - nameptr #1 > - { - namesleft #1 > - { - ", " * - t * - }{ - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - "," * - t "others" = - { - " " * bbl.etal - emphasize - * - }{ - bbl.and - space.word * - t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ + duplicate$ empty$ { pop$ "" } { + duplicate$ num.names$ + duplicate$ 'numnames := + 'namesleft := + 's := + #1 'nameptr := + "" + { namesleft #0 > } + { + format.names.morfont + bibinfo bibinfo.check + type$ "presentation" = + 'check.speaker + 'skip$ + if$ + 't := + nameptr #1 > not + { + t * + } { + namesleft #1 > + { + names.punctuate + t * + } { + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + names.punctuate + t "others" = + { + " " * + bbl.etal + emphasize + * + } { + bbl.and + space.word * + t * + } + if$ + } + if$ + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ } if$ } -FUNCTION {format.names.ed} +FUNCTION {format.names.ed.onefont} { - 'bibinfo := - duplicate$ empty$ 'skip$ { - 's := - "" 't := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr - "{f.}" format.name$ duplicate$ empty$ 'skip$ + s nameptr + control.author.initials { + control.author.dotless { + control.author.nospace { + "{f{}~}{vv~}{ll}{ jj}" % nm-rvx|nm-rvcx + } { + "{f{~}~}{vv~}{ll}{ jj}" % nm-rv + } if$ + } { + control.author.nospace { + "{f{.}.~}{vv~}{ll}{ jj}" % nm-rvv|nm-rvvc + }{ + "{f.~}{vv~}{ll}{, jj}" % nm-init|nm-rev|nm-rev1 + } if$ + } if$ + } { + "{ff~}{vv~}{ll}{, jj}" + } if$ + format.name$ + remove.dots + bib.name.font +} + +FUNCTION {format.names.ed.morfont} +{ + control.author.reversed { % + control.author.initials { % + control.author.dotless { % + s nameptr + control.author.nospace { % nm-rvx nm-rvcx + "{f{}}" + } { % nm-rv + "{f{~}}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + remove.dots + duplicate$ empty$ 'skip$ + { bib.fname.font " " swap$ * } + if$ + } { % !control.author.dotless + s nameptr + control.author.nospace { % nm-rvv + "{ff}" + } { % nm-rev nm-rev1 + "{f.}" + } if$ + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } if$ + } { % Full names !control.author.initials nm-revf nm-revv1 + s nameptr + "{ff}" + format.name$ duplicate$ empty$ 'skip$ { tie.or.space.prefix bib.fname.font swap$ * } if$ s nameptr "{vv~}{ll}" format.name$ bib.name.font * s nameptr - "{jj}" format.name$ duplicate$ empty$ 'skip$ + "{jj}" format.name$ + duplicate$ empty$ 'skip$ { bib.fname.font ", " swap$ * } if$ - * - bibinfo bibinfo.check - 't := - nameptr #1 > - { - namesleft #1 > - { - ", " * - t * - }{ - s nameptr "{ll}" format.name$ duplicate$ "others" = - { 't := } - { pop$ } - if$ - numnames #2 > - { - "," * - } - { skip$ } - if$ - t "others" = - { + } if$ + } { % !control.author.reversed nm-init + s nameptr + "{f.}" + format.name$ duplicate$ empty$ 'skip$ + { tie.or.space.prefix bib.fname.font swap$ * } + if$ + s nameptr + "{vv~}{ll}" format.name$ bib.name.font * + s nameptr + "{jj}" format.name$ + duplicate$ empty$ 'skip$ + { bib.fname.font ", " swap$ * } + if$ + } if$ + * +} - " " * bbl.etal emphasize * - }{ - bbl.and - space.word * t * - } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ +FUNCTION {format.names.ed} +{ + control.editor #0 > { + format.names + } { + 'bibinfo := + duplicate$ empty$ 'skip$ { + 's := + "" 't := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { + format.names.ed.morfont + bibinfo bibinfo.check + 't := + nameptr #1 > + { + namesleft #1 > + { + names.punctuate + t * + }{ + s nameptr "{ll}" format.name$ duplicate$ "others" = + { 't := } + { pop$ } + if$ + numnames #2 > + 'names.punctuate + 'skip$ + if$ + t "others" = + { + " " * bbl.etal emphasize * + }{ + bbl.and + space.word * t * + } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } if$ } if$ } @@ -1170,25 +1780,12 @@ if$ } -FUNCTION {format.isbn} +FUNCTION {format.isbn.output} { - isbn "isbn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISBN " swap$ * - } - if$ } -FUNCTION {format.issn} -{ issn "issn" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - "ISSN " swap$ * - } - if$ +FUNCTION {format.issn.output} +{ } FUNCTION {doi.base} @@ -1196,41 +1793,60 @@ "http://dx.doi.org/" } -FUNCTION {doi.command} +FUNCTION {doi.base.command} { - "\doi" + "\doibase " } -FUNCTION {doi.command.href} +FUNCTION {noop.command} { - "\Doi" + "\href@noop " } -FUNCTION {format.doi} -{ doi "doi" bibinfo.check - duplicate$ empty$ 'skip$ - { - new.block.comma - doi.command "{" * swap$ * "}" * - } - if$ +FUNCTION {href.command} +{ + "\href " } -FUNCTION {add.doi} +FUNCTION {link.tag.open} { - duplicate$ empty$ 'skip$ + doi duplicate$ empty$ { - doi duplicate$ empty$ 'pop$ + pop$ + url duplicate$ empty$ { - "{" swap$ * "}" * - swap$ - "{" swap$ * "}" * - * - doi.command.href swap$ * + pop$ "" noop.command + }{ + href.command } if$ } + { + doi.base.command swap$ * + href.command + } if$ + "{" * swap$ * "} {" * +} + +FUNCTION {link.tag.shut} +{ + "}" +} + +FUNCTION {link.open} +{ + link.tag.open output.nopunct +} + +FUNCTION {link.shut} +{ + link.tag.shut * +} + +FUNCTION {add.doi} +{ + link.tag.open swap$ * link.tag.shut * } FUNCTION {select.language} @@ -1265,7 +1881,7 @@ FUNCTION {bbl.enquote} { - "\enquote" + "\enquote " } FUNCTION {string.enquote} @@ -1273,7 +1889,7 @@ punctuation.no 'punctuation.state := non.stop { block.punctuation - } { "." } if$ + } { "" } if$ swap$ pop$ * bbl.enquote "{" * swap$ * "}" * @@ -1300,6 +1916,14 @@ if$ } +FUNCTION {format.name.apply} +{ + s nameptr + "{vv~}{ll}" + format.name$ + cite.name.font +} + FUNCTION {format.full.names} { 's := @@ -1308,10 +1932,7 @@ s num.names$ 'numnames := numnames 'namesleft := { namesleft #0 > } - { s nameptr - "{vv~}{ll}" - format.name$ - cite.name.font + { format.name.apply 't := nameptr #1 > { @@ -1387,14 +2008,14 @@ newline$ "" label - * - ")" * + * ")" * make.full.names duplicate$ short.list = { pop$ }{ * } if$ - "{" swap$ * "}" * + bracify "[" swap$ * "]" * - "{" * cite$ * "}%" * - "\bibitem" + cite$ bracify "%" * + * + "\bibitem " swap$ * write$ newline$ " " @@ -1441,7 +2062,7 @@ 'skip$ { before.all 'output.state := - ", " swap$ * + " (" swap$ * ")" * } if$ } @@ -1455,14 +2076,6 @@ } 'skip$ if$ - month "month" bibinfo.check duplicate$ empty$ - 'skip$ - { - swap$ - word.space * swap$ - } - if$ - * extra.label * date.encapsulate } @@ -1700,7 +2313,16 @@ { pop$ pop$ format.pages } { volnum.punct * swap$ - first.page + control.pages duplicate$ #0 < { + pop$ pop$ + }{ + #0 > + { + n.dashify + }{ + first.page + } if$ + } if$ "pages" bibinfo.check * } @@ -1731,7 +2353,6 @@ FUNCTION {format.ser.vol.num} { series "series" bibinfo.check output - after.punctuation 'output.state := volume field.or.null duplicate$ empty$ 'skip$ { @@ -1812,7 +2433,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1826,7 +2447,7 @@ { format.booktitle duplicate$ empty$ 'pop$ { - add.doi + add.doi word.in swap$ * output.nonnull bookaddress "address" bibinfo.check output format.number.series "series and number" bibinfo.check output @@ -1946,6 +2567,27 @@ output } +FUNCTION {article.title.produce} +{ + control.title duplicate$ #0 < + { pop$ + }{ + format.title + "title" 'bibfield := + swap$ #0 > + { + "title" output.check + }{ + output + } if$ + new.block.comma + } if$ +} + +FUNCTION {control} +{ +} + FUNCTION {article} { output.bibitem format.authors @@ -1954,30 +2596,33 @@ }{ output } if$ author format.key output format.date.output.check date.block + article.title.produce output.article.booktitle crossref missing$ { + link.open journal "journal" bibinfo.warn - pages empty$ 'skip$ { add.doi } if$ "journal" 'bibfield := output + add.blank format.ser.vol.num output + eid.or.pages + pages empty$ { + doi output + } 'skip$ if$ + link.shut }{ format.article.crossref output.nonnull + eid.or.pages } if$ - eid.or.pages - format.issn output - pages empty$ { - format.doi output - } 'skip$ if$ + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output format.translation output fin.entry } @@ -1986,25 +2631,28 @@ { output.bibitem author empty$ { + format.editors "author and editor" output.check + editor format.key output }{ format.authors output.nonnull - crossref missing$ { editor.check.book } 'skip$ if$ +% crossref missing$ { editor.check.book } 'skip$ if$ } if$ format.date.output.check date.block + link.open format.btitle - add.doi "title" output.check + link.shut format.edition output author empty$ { - format.editor.in output - editor format.key output } { + format.editor.in output + editor format.key output } if$ - format.number.series output + format.number.series output crossref missing$ { format.bvolume output @@ -2015,14 +2663,13 @@ format.book.crossref output.nonnull } if$ - format.isbn output - format.chapter.pages - output + format.isbn.output + format.chapter.pages + output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2031,19 +2678,25 @@ format.authors output author format.key output format.date.output date.block + link.open format.title - add.doi "title" output.check + link.shut new.block.comma howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output - format.isbn output + format.isbn.output format.book.pages output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output + fin.entry +} + +FUNCTION {footnote} +{ output.bibitem + format.note output fin.entry } @@ -2082,7 +2735,7 @@ } if$ crossref missing$ - { format.isbn output } + { format.isbn.output } 'skip$ if$ format.pages "pages" output.check @@ -2090,7 +2743,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2099,13 +2751,14 @@ format.authors "author" output.check author format.key output format.date.output.check date.block + article.title.produce crossref missing$ { format.in.ed.booktitle format.edition output format.chapter.pages output format.publisher.address output - format.isbn output + format.isbn.output }{ format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2116,7 +2769,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2125,12 +2777,13 @@ format.authors "author" output.check author format.key output format.date.output.check date.block + article.title.produce crossref missing$ { format.in.ed.booktitle format.organization.publisher.address output - format.isbn output - format.issn output + format.isbn.output + format.issn.output }{ format.incoll.inproc.crossref output.nonnull } @@ -2141,7 +2794,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2151,9 +2803,10 @@ format.authors output author format.key output format.date.output date.block + link.open format.btitle - add.doi "title" output.check + link.shut organization "organization" bibinfo.check output address "address" bibinfo.check output format.edition output @@ -2161,7 +2814,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2173,16 +2825,16 @@ format.btitle output new.block.comma + link.open bbl.mthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2192,16 +2844,16 @@ author format.key output format.date.output date.block + link.open format.title - add.doi output + link.shut new.block.comma howpublished "howpublished" bibinfo.check output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2213,16 +2865,16 @@ format.btitle output new.block.comma + link.open bbl.phdthesis format.thesis.type - add.doi output.nonnull + link.shut format.school.address.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2231,7 +2883,10 @@ format.authors output author format.key output new.block.comma - format.title output + link.open + format.title + output + link.shut new.block.comma format.organization.address "organization and address" output.check month "month" output.check @@ -2243,7 +2898,6 @@ type missing$ 'skip$ {"(" type capitalize * ")" * output} if$ - new.block.comma format.url output fin.entry } @@ -2252,20 +2906,20 @@ format.editors output editor format.key output format.date.output.check date.block + link.open format.btitle - add.doi "title" output.check + link.shut bookaddress "address" bibinfo.check output format.number.series output format.bvolume output format.organization.publisher.address output - format.isbn output - format.issn output + format.isbn.output + format.issn.output new.block.comma new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2274,9 +2928,10 @@ format.authors "author" output.check author format.key output format.date.output.check date.block + link.open format.btitle - add.doi "title" output.check + link.shut new.block.comma format.tr.number output.nonnull @@ -2286,7 +2941,6 @@ new.sentence.comma format.note output format.eprint output - format.url output fin.entry } @@ -2295,25 +2949,34 @@ format.authors "author" output.check author format.key output format.date.output date.block + link.open format.title - add.doi "title" output.check + link.shut new.block.comma new.sentence.comma format.note "note" output.check format.eprint output - format.url output fin.entry } FUNCTION {default.type} { misc } + READ + +EXECUTE {control.init} + +ITERATE {control.pass} + +EXECUTE {control.check} + FUNCTION {sortify} { purify$ "l" change.case$ } INTEGERS { len } + FUNCTION {chop.word} { 's := 'len := @@ -2323,28 +2986,29 @@ if$ } +FUNCTION {cite.name.font.apply} +{ + word.space * bbl.etal + emphasize + * +} + FUNCTION {format.lab.names} { 's := "" 't := - s #1 - "{vv~}{ll}" - format.name$ - cite.name.font + #1 'nameptr := + format.name.apply s num.names$ duplicate$ #2 > { pop$ - word.space * bbl.etal - emphasize - * + cite.name.font.apply }{ #2 < 'skip$ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = { - word.space * bbl.etal - emphasize - * + cite.name.font.apply }{ bbl.and space.word * s #2 "{vv~}{ll}" format.name$ @@ -2410,21 +3074,20 @@ } FUNCTION {calc.label} -{ calc.short.authors +{ + calc.short.authors short.list - "(" - * year duplicate$ empty$ short.list key field.or.null = or { pop$ "" "????" * }{ - skip$ + control.year #0 > { purify$ #-1 #4 substring$ } 'skip$ if$ } if$ - * - 'label := + "(" swap$ * + * 'label := } FUNCTION {sort.format.names} @@ -2435,7 +3098,13 @@ numnames 'namesleft := { namesleft #0 > } { s nameptr - "{ll{ }}{ f{ }}{ jj{ }}" + "{ll{ }}" + control.author.initials { + "{ f{ }}" * + }{ + "{ ff{ }}" * + } if$ + "{ jj{ }}" * format.name$ 't := nameptr #1 > { @@ -2496,6 +3165,11 @@ if$ } +FUNCTION {year.sort.key} +{ + year +} + FUNCTION {editor.sort} { editor empty$ { key empty$ @@ -2509,8 +3183,21 @@ if$ } -FUNCTION {presort} -{ calc.label +INTEGERS { seq.num } + +FUNCTION {init.seq} +{ #0 'seq.num :=} + +EXECUTE {init.seq} + +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} + +FUNCTION {label.presort} +{ + calc.label label sortify " " * @@ -2530,17 +3217,24 @@ * " " * - title field.or.null - sort.format.title + title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } -ITERATE {presort} +FUNCTION {presort.pass} +{ type$ "control" = 'control.presort 'label.presort if$ +} + +ITERATE {presort.pass} + SORT + STRINGS { last.label next.extra } + INTEGERS { last.extra.num number.label } + FUNCTION {initialize.extra.label.stuff} { #0 int.to.chr$ 'last.label := "" 'next.extra := @@ -2548,8 +3242,9 @@ #0 'number.label := } -FUNCTION {forward.pass} -{ last.label label = +FUNCTION {label.forward} +{ + last.label label = { last.extra.num #1 + 'last.extra.num := last.extra.num int.to.chr$ 'extra.label := } @@ -2561,7 +3256,7 @@ number.label #1 + 'number.label := } -FUNCTION {reverse.pass} +FUNCTION {label.reverse} { next.extra "b" = { "a" 'extra.label := } 'skip$ @@ -2577,31 +3272,47 @@ } EXECUTE {initialize.extra.label.stuff} + +FUNCTION {forward.pass} +{ type$ "control" = 'control.forward 'label.forward if$ +} + ITERATE {forward.pass} + +FUNCTION {reverse.pass} +{ type$ "control" = 'control.reverse 'label.reverse if$ +} + REVERSE {reverse.pass} -FUNCTION {bib.sort.order} + +FUNCTION {sortkey.sort} { sort.label " " * - year + year.sort.key field.or.null sortify * " " * - title field.or.null - sort.format.title + title field.or.null sort.format.title * #1 entry.max$ substring$ 'sort.key$ := } -ITERATE {bib.sort.order} +FUNCTION {bib.sort.pass} +{ type$ "control" = 'control.sort 'sortkey.sort if$ +} + +ITERATE {bib.sort.pass} + SORT + FUNCTION {init.bib.eprint} { - "\texttt{" + "\texttt {" pop$ - "\providecommand \url [0]{\begingroup\@sanitize \@url }%" write$ newline$ + "\providecommand \url [0]{\begingroup\@sanitize@url \@url }%" write$ newline$ "\providecommand \@url [1]{\endgroup\@href {#1}{" "}}%" bbl.url.prefix swap$ * * write$ newline$ "\providecommand " " [0]{URL }%" bbl.url.prefix swap$ * * write$ newline$ eprint.command "\providecommand " swap$ * "[0]{\href }%" * write$ newline$ @@ -2609,37 +3320,18 @@ FUNCTION {init.bib.doi} { - "\@ifxundefined \urlstyle {%" write$ newline$ - " \providecommand \doi [1]{doi:\discretionary{}{}{}#1}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand \doi [0]{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url }%" - write$ newline$ - "}%" write$ newline$ - "\providecommand \doibase [0]{" doi.base * "}%" * write$ newline$ - doi.command.href "\providecommand " swap$ * "[1]{\href{\doibase#1}}%" * write$ newline$ + "\providecommand \doibase [0]{" doi.base "}%" * * write$ newline$ } FUNCTION {init.bib.hypertex} { - "\providecommand\href[0]{\@sanitize\@href}%" write$ newline$ - "\providecommand\@href[1]{\endgroup\@@startlink{#1}\endgroup\@@href}%" write$ newline$ - "\providecommand\@@href[1]{#1\@@endlink}%" write$ newline$ - "\providecommand \@sanitize [0]{\begingroup\catcode`\&12\catcode`\#12\relax}%" write$ newline$ - "\@ifxundefined \pdfoutput {\@firstoftwo}{%" write$ newline$ - " \@ifnum{\z@=\pdfoutput}{\@firstoftwo}{\@secondoftwo}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{\leavevmode\special{html:}}%" * write$ newline$ - " \providecommand\@@endlink[0]{\special{html:}}%" write$ newline$ - "}{%" write$ newline$ - " \providecommand\@@startlink[1]{%" write$ newline$ - " \leavevmode" write$ newline$ - " \pdfstartlink" write$ newline$ - " attr{/Border[0 0 1 ]/H/I/C[0 1 1]}%" write$ newline$ - " user{/Subtype/Link/A<>}%" write$ newline$ - " \relax" write$ newline$ - " }%" write$ newline$ - " \providecommand\@@endlink[0]{\pdfendlink}%" write$ newline$ - "}%" write$ newline$ + "\providecommand " noop.command "[0]{\@secondoftwo}%" * * write$ newline$ + "\providecommand " href.command "[0]{\begingroup \@sanitize@url \@href}%" * * write$ newline$ + "\providecommand \@href[1]{\@@startlink{#1}\@@href}%" write$ newline$ + "\providecommand \@@href[1]{\endgroup#1\@@endlink}%" write$ newline$ + "\providecommand \@sanitize@url [0]{\catcode `\\12\catcode `\$12\catcode `\&12\catcode `\#12\catcode `\^12\catcode `\_12\catcode `\%12\relax}%" write$ newline$ + "\providecommand \@@startlink[1]{}%" write$ newline$ + "\providecommand \@@endlink[0]{}%" write$ newline$ } FUNCTION {init.bib.namefont} @@ -2662,20 +3354,6 @@ write$ newline$ } -FUNCTION {init.bib.annote} -{ - "\providecommand \bibAnnote [3]{%" write$ newline$ - " " bbl.shut * "{#1}%" * write$ newline$ - " \begin{quotation}\noindent" write$ newline$ - " \textsc{Key:}\ #2\\\textsc{Annotation:}\ #3%" write$ newline$ - " \end{quotation}%" write$ newline$ - "}%" write$ newline$ - "\providecommand \bibAnnoteFile [2]{%" write$ newline$ - " \IfFileExists{#2}{\bibAnnote {#1} {#2} {\input{#2}}}{}%" write$ newline$ - "}%" write$ newline$ - "\providecommand \typeout [0]{\immediate \write \m@ne }%" write$ newline$ -} - FUNCTION {init.bib.bibinfo} { bibinfo.command "\providecommand " swap$ * " [0]{\@secondoftwo}%" * write$ newline$ @@ -2708,15 +3386,18 @@ { warn.bib "\makeatletter" write$ newline$ - "\providecommand \@ifxundefined [1]{%" write$ newline$ - " \ifx #1\undefined \expandafter \@firstoftwo" write$ newline$ - " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + "\providecommand \@ifxundefined [1]{%" write$ newline$ + " \@ifx{#1\undefined}" write$ newline$ "}%" write$ newline$ "\providecommand \@ifnum [1]{%" write$ newline$ " \ifnum #1\expandafter \@firstoftwo" write$ newline$ " \else \expandafter \@secondoftwo" write$ newline$ - "\fi" write$ newline$ + " \fi" write$ newline$ + "}%" write$ newline$ + "\providecommand \@ifx [1]{%" write$ newline$ + " \ifx #1\expandafter \@firstoftwo" write$ newline$ + " \else \expandafter \@secondoftwo" write$ newline$ + " \fi" write$ newline$ "}%" write$ newline$ init.bib.ay init.bib.quote @@ -2724,18 +3405,19 @@ init.bib.hypertex init.bib.eprint init.bib.doi - init.bib.annote init.bib.lang init.bib.bibinfo init.bib.translation init.bib.endbibitem "\providecommand " bbl.shut * " [1]{\csname bibitem#1\endcsname}%" * write$ newline$ + "\let\auto@bib@innerbib\@empty" write$ newline$ "%" write$ } FUNCTION {begin.bib} { - id.bst duplicate$ top$ "%" swap$ * write$ newline$ + id.bst diagn.cmntlog + control.bib preamble$ empty$ 'skip$ { preamble$ write$ newline$ } @@ -2748,8 +3430,11 @@ } EXECUTE {begin.bib} + EXECUTE {init.state.consts} + ITERATE {call.type$} + FUNCTION {end.bib} { newline$ "\end{thebibliography}%" @@ -2757,6 +3442,7 @@ } EXECUTE {end.bib} + %% End of customized bst file %% %% End of file `apsrmp4-1.bst'. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/DOWNLOAD +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/DOWNLOAD @@ -1,4 +1,4 @@ -Last updated October 13, 2009 +Last updated August 9, 2010 To download REVTeX 4 (version 4.1), download the files listed below, or, more conveniently, download revtex4-1.zip which contains all of the files. @@ -35,13 +35,9 @@ BibTeX inputs: bibtex/bst/revtex/ ------------------ apsrev4-1.bst - BibTeX styles for use for Phys. Rev. journals -apsrev4-1long.bst - Same as above, but shows titles for cited journal articles apsrmp4-1.bst - BibTeX styles for use for Rev. Mod. Phys. -apsrmp4-1long.bst - Same as above, but shows titles for cited journal articles aipauth4-1.bst - BibTeX styles for AIP journals with author/year style citations -aipauth4-1long.bst- Same as above, but shows titles for cited journal articles aipnum4-1.bst - BibTeX styles for AIP journals with numerical style citations -aipnum4-1long.bst - Same as above, but shows titles for cited journal articles Documentation: doc/latex/revtex/ @@ -68,7 +64,6 @@ ------- apssamp.tex (pdf) - A sample file showing most common features of an APS REVTeX 4.1 document -apssamp.rty fig_1.eps - sample figure for apssamp.tex fig_2.eps - sample wide figure for apssamp.tex vid_1a.eps - sample video frame for apssamp.tex @@ -80,7 +75,6 @@ ------- aipsamp.tex (pdf) - A sample file showing most common features of an AIP REVTeX 4.1 document -aipsamp.rty fig_1.eps - sample figure for apssamp.tex fig_2.eps - sample wide figure for apssamp.tex aipsamp.bib - sample BibTeX source file for apssamp.tex @@ -112,7 +106,7 @@ (Comprehensive TeX Archive Network), e.g. . Direct links to the necessary files can be found at . -natbib.dtx - Version 8.3 or later; found in latex/contrib/natbib on CTAN +natbib.dtx - Version 8.31a or later; found in latex/contrib/natbib on CTAN natbib.ins - LaTeX this to create natbib.sty and natbib documentation from natbib.dtx bm.dtx - Bold math style - part of (current!) standard LaTeX2e tools only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/README +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/README @@ -1,12 +1,12 @@ %% ****** Start of file README ****** % %% %% This file is part of the APS files in the REVTeX 4 distribution. -%% Version 4.1g of REVTeX, October 2009. +%% Version 4.1r of REVTeX, August 2010. %% -%% Copyright (c) 1999, 2000, 2001, 2009 The American Physical Society. +%% Copyright (c) 1999, 2000, 2001, 2009, 2010 The American Physical Society. %% -Last updated 13 October 2009 +Last updated 09 August 2010 This file describes the contents of this distribution of REVTeX 4.1. The definitive source of information about REVTeX 4 is the APS web @@ -44,13 +44,9 @@ BibTeX inputs: bibtex/bst/revtex/ ------------------ apsrev4-1.bst - BibTeX styles for use for Phys. Rev. journals -apsrev4-1long.bst - Same as above, but shows titles for cited journal articles apsrmp4-1.bst - BibTeX styles for use for Rev. Mod. Phys. -apsrmp4-1long.bst - Same as above, but shows titles for cited journal articles aipauth4-1.bst - BibTeX styles for AIP journals with author/year style citations -aipauth4-1long.bst- Same as above, but shows titles for cited journal articles aipnum4-1.bst - BibTeX styles for AIP journals with numerical style citations -aipnum4-1long.bst - Same as above, but shows titles for cited journal articles Documentation: doc/latex/revtex/ @@ -77,7 +73,6 @@ ------- apssamp.tex (pdf) - A sample file showing most common features of an APS REVTeX 4.1 document -apssamp.rty fig_1.eps - sample figure for apssamp.tex fig_2.eps - sample wide figure for apssamp.tex vid_1a.eps - sample figure for apssamp.tex @@ -89,7 +84,6 @@ ------- aipsamp.tex (pdf) - A sample file showing most common features of an AIP REVTeX 4.1 document -aipsamp.rty fig_1.eps - sample figure for apssamp.tex fig_2.eps - sample wide figure for apssamp.tex aipsamp.bib - sample BibTeX source file for apssamp.tex @@ -121,7 +115,7 @@ (Comprehensive TeX Archive Network), e.g. . Direct links to the necessary files can be found at . -natbib.dtx - Version 8.3 or later; found in latex/contrib/natbib on CTAN +natbib.dtx - Version 8.31a or later; found in latex/contrib/natbib on CTAN natbib.ins - LaTeX this to create natbib.sty and natbib documentation from natbib.dtx bm.dtx - Bold math style - part of (current!) standard LaTeX2e tools @@ -174,7 +168,25 @@ Install required packages (AMS-LaTeX, natbib, textcase, and bm). Please consult the documentaton for your local TeX package for more information. -MikTeX users should use version MikTeX 2.1. +MikTeX users should use a recent version (see http://miktex.org/) and consult +the documentation there. There are several steps you will have to do. Please +note that the steps given here may change with future versions of MikTeX, but +the basic steps should be quite similar. + 1) Create a texmf-local directory if needed. For example, you might create + a directory such as C:\local\miktex\texmf-local. + 2) Tell MikTeX where your texmf-local directory is. Find the MikTeX Options + window and look for the "Roots" tab. If your texmf-local directory + is not listed, click "Add" and add it. + 3) Unzip the revtex4-1-tds.zip (part of the REVTeX distribtution) in your + texmf-local directory. + 4) Update the "File Name Database (FNDB)." This step is essential and + it registers all of the files in your texmf-local directory with MikTeX. + Do this by clicking on "Refresh FNDB" in the General tab of the MikTeX + Options window. + +MikTex also comes with a package manager. This can be an easier way to maintain +the packages installed on your system. However, please note that the packages +available may not be the most current version of the packages. Credits ------- @@ -196,5 +208,5 @@ -------------------- REVTeX 4 requires: LaTeX2e [1996/06/01], -natbib [2008/12/08] +natbib [2009/11/07] textcase only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/00readme.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/00readme.tex @@ -120,7 +120,7 @@ \changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}} \changes{4.1d}{2009/03/27}{Definition of \cs{ @fnsymbol} follows fixltx2e.sty} \changes{4.1e}{2008/06/29}{(AO, 455) be nice to a list within the abstract} -\changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \filename{lineno.sty}} +\changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}} \changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon} \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}% \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}% @@ -131,6 +131,35 @@ \changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}% \changes{4.1g}{2009/10/07}{(AO, 538) \cs{MakeTextUppercase} inappropriately expands the double backslash} \changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}% +\changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads} +\changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}} +\changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}} +\changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}} +\changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package} +\changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: invoking class option preprint implies class option preprintnumbers} +\changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms} +\changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}% +\changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}% +\changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}% +\changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}% +\changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}% +\changes{4.1n}{2010/01/04}{(AO, 575) the default for journal prstper is longbibliography}% +\changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}% +\changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}% +\changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}% +\changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}% +\changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}% +\changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a} +\changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.} +\changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.} +\changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.} +\changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}% +\changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.} +\changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}} +\changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl} +\changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}% +\changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}% +\changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}% \iffalse ltxdoc klootch -This file has version number 4.1g, last revised 2009/10/08:11:23.\fi +This file has version number 4.1r, last revised 2010/07/25/20:33:00.\fi only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/apstemplate.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/apstemplate.tex @@ -2,10 +2,10 @@ %% %% %% This file is part of the APS files in the REVTeX 4 distribution. -%% Version 4.1 of REVTeX, October 2009 +%% Version 4.1r of REVTeX, August 2010 %% %% -%% Copyright (c) 2001, 2009 The American Physical Society. +%% Copyright (c) 2001, 2009, 2010 The American Physical Society. %% %% See the REVTeX 4 README file for restrictions and more information. %% only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/apssamp.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/apssamp.tex @@ -1,9 +1,9 @@ % ****** Start of file apssamp.tex ****** % % This file is part of the APS files in the REVTeX 4.1 distribution. -% Version 4.1 of REVTeX, October 2009 +% Version 4.1r of REVTeX, August 2010 % -% Copyright (c) 2009 The American Physical Society. +% Copyright (c) 2009, 2010 The American Physical Society. % % See the REVTeX 4 README file for restrictions and more information. % @@ -32,21 +32,18 @@ %bibnotes, amsmath,amssymb, aps, - prl, %pra, %prb, %rmp, %prstab, %prstper, - longbibliography, %floatfix, - lengthcheck,% ]{revtex4-1} \usepackage{graphicx}% Include figure files \usepackage{dcolumn}% Align table columns on decimal point \usepackage{bm}% bold math -\usepackage{hyperref}% add hypertext capabilities +%\usepackage{hyperref}% add hypertext capabilities %\usepackage[mathlines]{lineno}% Enable numbering of text and display math %\linenumbers\relax % Commence numbering lines @@ -146,13 +143,8 @@ This file may be formatted in either the \texttt{preprint} or \texttt{reprint} style. \texttt{reprint} format mimics final journal output. -Either format may be used for submission purposes; -however, for peer review and production, APS will format the -article using the \texttt{preprint} class option. Hence, it is -essential that authors check that their manuscripts format acceptably -under \texttt{preprint}. Manuscripts submitted to APS that do not -format correctly under the \texttt{preprint} option may be delayed in -both the editorial and production processes. +Either format may be used for submission purposes. \texttt{letter} sized paper should +be used when submitting to APS journals. \subsubsection{Wide text (A level-3 head)} The \texttt{widetext} environment will make the text the width of the @@ -170,14 +162,15 @@ \subsubsection{Citations} Because REV\TeX\ uses the \verb+natbib+ package of Patrick Daly, the entire repertoire of commands in that package are available for your document; -see the \verb+natbib+ documentation for further details. +see the \verb+natbib+ documentation for further details. Please note that +REV\TeX\ requires version 8.31a or later of \verb+natbib+. \paragraph{Syntax} The argument of \verb+\cite+ may be a single \emph{key}, or may consist of a comma-separated list of keys. The citation \emph{key} may contain letters, numbers, the dash (-) character, or the period (.) character. -New with natbib 8.2 is an extension to the syntax that allows for +New with natbib 8.3 is an extension to the syntax that allows for a star (*) form and two optional arguments on the citation key itself. The syntax of the \verb+\cite+ command is thus (informally stated) \begin{quotation}\flushleft\leftskip1em @@ -194,8 +187,8 @@ \texttt{*}\texttt{[}\emph{pre}\texttt{]}\texttt{[}\emph{post}\texttt{]}\emph{key}. \end{quotation}\noindent where \emph{pre} and \emph{post} is whatever text you wish to place -at the beginning, resp. end, of the bibliographic reference -(see Ref.~[\citequiet{witten2001}] and the two under Ref.~[\citequiet{feyn54}]). +at the beginning and end, respectively, of the bibliographic reference +(see Ref.~[\onlinecite{witten2001}] and the two under Ref.~[\onlinecite{feyn54}]). (Keep in mind that no automatic space or punctuation is applied.) It is highly recommended that you put the entire \emph{pre} or \emph{post} portion within its own set of braces, for example: @@ -204,7 +197,7 @@ The star (*) modifier to the \emph{key} signifies that the reference is to be merged with the previous reference into a single bibliographic entry, -a common idiom in APS and AIP articles (see below, Ref.~[\citequiet{epr}]). +a common idiom in APS and AIP articles (see below, Ref.~[\onlinecite{epr}]). When references are merged in this way, they are separated by a semicolon instead of the period (full stop) that would otherwise appear. @@ -213,7 +206,7 @@ when the author matches that of the previous reference, it is omitted. If both author and journal match, both are omitted. If the journal matches, but the author does not, the journal is replaced by \emph{ibid.}, -as exemplified by Ref.~[\citequiet{epr}]. +as exemplified by Ref.~[\onlinecite{epr}]. These rules embody common editorial practice in APS and AIP journals and will only be in effect if the markup features of the APS and AIP Bib\TeX\ styles is employed. @@ -227,17 +220,17 @@ \verb+{+\emph{key-list}\verb+}+. \subsubsection{Example citations} -By default, citations are numerical;\cite{Beutler1994} -author-year citations are obtained when the journal is RMP. +By default, citations are numerical\cite{Beutler1994}. +Author-year citations are used when the journal is RMP. To give a textual citation, use \verb+\onlinecite{#1}+: Refs.~\onlinecite{[][{, and references therein}]witten2001,Bire82}. -By default, the \texttt{natbib} package automatically sorts your citations into numerical order and ``compresses'' runs of consecutive numerical citations. -REV\TeX\ provides the ability to automatically punctuate textual citations; -this facility works reliably with numerical citations only with \texttt{natbib}'s compress option turned off. +By default, the \texttt{natbib} package automatically sorts your citations into numerical order and ``compresses'' runs of three or more consecutive numerical citations. +REV\TeX\ provides the ability to automatically change the punctuation when switching between journal styles that provide citations in square brackets and those that use a superscript style instead. This is done through the \texttt{citeautoscript} option. For instance, the journal style \texttt{prb} automatically invokes this option because \textit{Physical +Review B} uses superscript-style citations. The effect is to move the punctuation, which normally comes after a citation in square brackets, to its proper position before the superscript. To illustrate, we cite several together -\cite{[See the explanation of time travel in ]feyn54,*[The classical relativistic treatment of ][ is a relative classic]epr,witten2001,Berman1983,Bire82}, -and once again in different order (Refs.~\onlinecite{epr,feyn54,Bire82,Berman1983,witten2001}). -Note that the citations were both compressed and sorted. +\cite{[See the explanation of time travel in ]feyn54,*[The classical relativistic treatment of ][ is a relative classic]epr,witten2001,Berman1983,Davies1998,Bire82}, +and once again in different order (Refs.~\cite{epr,feyn54,Bire82,Berman1983,witten2001,Davies1998}). +Note that the citations were both compressed and sorted. Futhermore, running this sample file under the \texttt{prb} option will move the punctuation to the correct place. When the \verb+prb+ class option is used, the \verb+\cite{#1}+ command displays the reference's number as a superscript rather than in @@ -254,13 +247,10 @@ with the same argument as the \verb+\cite{#1}+ command. \verb+\bibitem{#1}+ commands may be crafted by hand or, preferably, generated by Bib\TeX. -REV\TeX~4 includes Bib\TeX\ style files +REV\TeX~4.1 includes Bib\TeX\ style files \verb+apsrev4-1.bst+, \verb+apsrmp4-1.bst+ appropriate for \textit{Physical Review} and \textit{Reviews of Modern Physics}, -respectively. There are also ``long" versions of these two files to typeset -titles of cited journal articles. REV\TeX~4.1 will automatically choose the style -appropriate for the journal specified in the document class -options. +respectively. To display titles for cited journal articles, use the \texttt{longbibliography} class option. \subsubsection{Example references} This sample file employs the \verb+\bibliography+ command, @@ -754,6 +744,10 @@ \end{subequations} They turn out to be Eqs.~(\ref{appa}), (\ref{appb}), and (\ref{appc}). +% The \nocite command causes all entries in a bibliography to be printed out +% whether or not they are actually referenced in the text. This is appropriate +% for the sample file to show the different styles of references, but authors +% most likely will not want to use it. \nocite{*} \bibliography{apssamp}% Produces the bibliography via BibTeX. only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/vid_1a.eps +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/vid_1a.eps @@ -1,5 +1,5 @@ -%!PS-Adobe-3.0 -%%BoundingBox: 0 0 100 100 -0 0 moveto 100 0 lineto 100 100 lineto 0 100 lineto 0 0 lineto stroke -20 50 moveto /Times-Roman findfont 10 scalefont setfont (Clip A Frame) show -%%EOF +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 100 100 +0 0 moveto 100 0 lineto 100 100 lineto 0 100 lineto 0 0 lineto stroke +20 50 moveto /Times-Roman findfont 10 scalefont setfont (Clip A Frame) show +%%EOF only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/apssamp.bib +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/apssamp.bib @@ -20,7 +20,7 @@ @ARTICLE{epr, author = "A. Einstein and {\relax Yu} Podolsky and N. Rosen", - collaboration = "The Swiss Cabal", + collaboration = "EPR", year = "1935", journal = "Phys.\ Rev.", volume = "47", @@ -48,6 +48,7 @@ @MISC{witten2001, author = "Edward Witten", eprint = "hep-th/0106109", + year = "2001", } @INBOOK{Beutler1994, @@ -110,7 +111,7 @@ note = "{J. Appl. Phys.} (unpublished)", month = "", - year = "", + year = "2010", } @UNPUBLISHED{Smith2010a, @@ -119,7 +120,7 @@ note = "{J. Appl. Phys.} (submitted)", month = "", - year = "", + year = "2010", } @UNPUBLISHED{unpublished-full, @@ -201,7 +202,7 @@ author = "R. Smith", title = "Hummingbirds are our friends", journal = {J. Appl. Phys. (these proceedings)}, - year = "", + year = "2001", volume = "", number = "", pages = "", @@ -381,8 +382,8 @@ booktitle = "Magnetism", publisher = "Academic Press", address = "New York", -} year = "1965", +} @INCOLLECTION{Magnetisma, author = "W. Opechowski and R. Guccione", only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/fig_2.eps +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/fig_2.eps @@ -1,5 +1,5 @@ -%!PS-Adobe-3.0 -%%BoundingBox: 0 0 500 80 -0 0 moveto 500 0 lineto 500 80 lineto 0 80 lineto 0 0 lineto stroke -200 40 moveto /Times-Roman findfont 10 scalefont setfont (Wide Test Figure) show -%%EOF +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 500 80 +0 0 moveto 500 0 lineto 500 80 lineto 0 80 lineto 0 0 lineto stroke +200 40 moveto /Times-Roman findfont 10 scalefont setfont (Wide Test Figure) show +%%EOF only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/vid_1b.eps +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/vid_1b.eps @@ -1,5 +1,5 @@ -%!PS-Adobe-3.0 -%%BoundingBox: 0 0 100 100 -0 0 moveto 100 0 lineto 100 100 lineto 0 100 lineto 0 0 lineto stroke -20 50 moveto /Times-Roman findfont 10 scalefont setfont (Clip B Frame) show -%%EOF +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 100 100 +0 0 moveto 100 0 lineto 100 100 lineto 0 100 lineto 0 0 lineto stroke +20 50 moveto /Times-Roman findfont 10 scalefont setfont (Clip B Frame) show +%%EOF only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aps/fig_1.eps +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aps/fig_1.eps @@ -1,5 +1,5 @@ -%!PS-Adobe-3.0 -%%BoundingBox: 0 0 100 100 -0 0 moveto 100 0 lineto 100 100 lineto 0 100 lineto 0 0 lineto stroke -20 50 moveto /Times-Roman findfont 10 scalefont setfont (Test Figure) show -%%EOF +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 100 100 +0 0 moveto 100 0 lineto 100 100 lineto 0 100 lineto 0 0 lineto stroke +20 50 moveto /Times-Roman findfont 10 scalefont setfont (Test Figure) show +%%EOF only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aip/aipsamp.bib +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aip/aipsamp.bib @@ -1,482 +1,482 @@ -@PREAMBLE{ - "\providecommand{\noopsort}[1]{}" - # "\providecommand{\singleletter}[1]{#1}%" -} - -@BOOK{Bire82, - author = {N. D. Birell and P. C. W. Davies}, - year = 1982, - title = {Quantum Fields in Curved Space}, - publisher = {Cambridge University Press} -} - -@ARTICLE{feyn54, - author = "R. P. Feynman", - year = "1954", - journal = "Phys.\ Rev.", - volume = "94", - pages = "262", -} - -@ARTICLE{epr, - author = "A. Einstein and {\relax Yu} Podolsky and N. Rosen", - year = "1935", - journal = "Phys.\ Rev.", - volume = "47", - pages = "777", -} - -@ARTICLE{Berman1983, - author = "Berman, Jr., G. P. and Izrailev, Jr., F. M.", - title = "Stability of nonlinear modes", - journal = "Physica D", - volume = "88", - pages = "445", - year = "1983", -} - -@ARTICLE{Davies1998, - author = "E. B. Davies and L. Parns", - title = "Trapped modes in acoustic waveguides", - journal = "Q. J. Mech. Appl. Math.", - volume = "51", - pages = "477--492", - year = "1988", -} - -@MISC{witten2001, - author = "Edward Witten", - eprint = "hep-th/0106109", - year = "2001", -} - -@INBOOK{Beutler1994, - author = "E. Beutler", - editor = "E. Beutler and M. A. Lichtman and B. W. Coller and T. S. Kipps", - title = "Williams Hematology", - chapter = "7", - pages = "654--662", - publisher = "McGraw-Hill", - year = "1994", - - edition = "5", - address = "New York", - volume = "2", -} - -@INBOOK{inbook-full, - author = "Donald E. Knuth", - title = "Fundamental Algorithms", - volume = 1, - series = "The Art of Computer Programming", - publisher = "Addison-Wesley", - address = "Reading, Massachusetts", - edition = "Second", - month = "10~" # jan, - year = "\noopsort{1973b}1973", - type = "Section", - chapter = "1.2", - pages = "10--119", - note = "A full INBOOK entry", -} - -@ARTICLE{Smith2005, - author = "J. S. Smith and G. W. Johnson", - journal = "Philos. Trans. R. Soc. London, Ser. B", - title = "", - year = "2005", - - volume = "777", - pages = "1395", -} - -@UNPUBLISHED{Smith2010, - author = "W. J. Smith and T. J. Johnson and B. G. Miller", - title = "Surface chemistry and preferential crystal orientation on a silicon surface", - note = "{J. Appl. Phys.} (unpublished)", - - month = "", - year = "", -} - -@UNPUBLISHED{Smith2010a, - author = "V. K. Smith and K. Johnson and M. O. Klein", - title = "Surface chemistry and preferential crystal orientation on a silicon surface", - note = "{J. Appl. Phys.} (submitted)", - - month = "", - year = "", -} - -@UNPUBLISHED{unpublished-full, - author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot", - title = "Lower Bounds for Wishful Research Results", - month = nov # ", " # dec, - year = 1988, - note = "Talk at Fanstord University (A full UNPUBLISHED entry)", -} - -@MISC{JohnsonMillerSmith2007, - - author = "M. P. Johnson and K. L. Miller and K. Smith", - title = "", - howpublished = "personal communication", - month = "1~" # may, - year = "2007", - note = "", -} - -@PROCEEDINGS{Smith2007, - title = "AIP Conf. Proc.", - year = "2007", - - editor = "J. Smith", - volume = "841", - number = "21", - series = "", - address = "", - month = "", - organization = "", - publisher = "", - note = "", -} - -@PROCEEDINGS{proceedings-full, - editor = "Wizard V. Oz and Mihalis Yannakakis", - title = "Proc. Fifteenth Annual", - number = 17, - series = "All ACM Conferences", - month = mar, - year = 1983, - address = "Boston", - organization = "ACM", - publisher = "Academic Press", - note = "A full PROCEEDINGS entry", -} - -@UNPUBLISHED{Burstyn2004, - author = "Y. Burstyn", - title = "{Proceedings of the 5th International Molecular Beam Epitaxy Conference, Santa Fe, NM}", - note = "(unpublished)", - - month = "5--8~" # oct, - year = "2004", -} - -@PROCEEDINGS{Quinn2001, - title = "{Proceedings of the 2003 Particle Accelerator Conference, Portland, OR, 12-16 May 2005}", - year = "2001", - - editor = "B. Quinn", - address = "New York", - publisher = "Wiley", - note = "Albeit the conference was held in 2005, it was the 2003 conference, and the proceedings were published in 2001; go figure", -} - -@ARTICLE{Agarwal2001, - author = "A. G. Agarwal", - title = "{Proceedings of the Fifth Low Temperature Conference, Madison, WI, 1999}", - journal = "Semiconductors", - year = "2001", - - volume = "66", - pages = "1238", -} - -@ARTICLE{SmithDA01, - author = "R. Smith", - title = "Hummingbirds are our friends", - journal = {J. Appl. Phys. (these proceedings)}, - year = "", - volume = "", - number = "", - pages = "", - month = "", - note = "Abstract No. DA-01", -} - -@ARTICLE{Smith2007a, - author = "J. Smith", - title = "", - journal = "Proc. SPIE", - year = "2007", - - volume = "124", - pages = "367", - note = "Required title is missing", -} - -@TECHREPORT{techreport-full, - author = "Tom T{\'{e}}rrific", - title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm", - institution = "Fanstord University", - type = "Wishful Research Result", - number = "7", - address = "Computer Science Department, Fanstord, California", - month = oct, - year = 1988, - note = "A full TECHREPORT entry", -} - -@TECHREPORT{Nelson1999, - author = "J. Nelson", - type = "{TWI Report}", - number = "666/1999", - institution = "", - year = jan # "~1999", - - note = "Required institution missing", -} - -@TECHREPORT{Fields2005, - author = "W. K. Fields", - type = "{ECE Report No.}", - number = "AL944", - institution = "", - year = "2005", - - note = "Required institution missing", -} - -@MISC{Zalkins2008, - - author = "Y. M. Zalkins", - title = "", - howpublished = "e-print arXiv:cond-mat/040426", - month = "", - year = "2008", - note = "", -} - -@MISC{Nelson2005, - - author = "J. Nelson", - howpublished = "{U.S. Patent No.} 5,693,000", - year = "12~" # dec # "~2005", -} - -@MASTERSTHESIS{Nelson1999a, - author = "J. K. Nelson", - title = "", - school = "New York University", - year = "1999", - - type = "M.{S}. thesis", - address = "", - month = "", - note = "", -} - -@MASTERSTHESIS{mastersthesis-full, - author = "{\'{E}}douard Masterly", - title = "Mastering Thesis Writing", - school = "Stanford University", - type = "Master's project", - address = "English Department", - month = jun # "-" # aug, - year = 1988, - note = "A full MASTERSTHESIS entry", -} - -@PHDTHESIS{Smith2003, - author = "S. M. Smith", - title = "", - school = "Massachusetts Institute of Technology", - year = "2003", - - type = "{Ph.D.} thesis", - address = "", - month = "", - note = "", -} - -@ARTICLE{KawaLin2003, - author = "S. R. Kawa and S.-J. Lin", - title = "", - journal = "J. Geophys. Res.", - year = "2003", - - volume = "108", - number = "D6", - pages = "4201", - month = "", - note = "{DOI:10.1029/2002JD002268}", -} - -@PHDTHESIS{phdthesis-full, - author = "F. Phidias Phony-Baloney", - title = "Fighting Fire with Fire: Festooning {F}rench Phrases", - school = "Fanstord University", - type = "{PhD} Dissertation", - address = "Department of French", - month = jun # "-" # aug, - year = 1988, - note = "A full PHDTHESIS entry", -} - -@BOOK{book-full, - author = "Donald E. Knuth", - title = "Seminumerical Algorithms", - volume = 2, - series = "The Art of Computer Programming", - publisher = "Addison-Wesley", - address = "Reading, Massachusetts", - edition = "Second", - month = "10~" # jan, - year = "\noopsort{1973c}1981", - note = "A full BOOK entry", -} - -@BOOKLET{booklet-full, - author = "Jill C. Knvth", - title = "The Programming of Computer Art", - howpublished = "Vernier Art Center", - address = "Stanford, California", - month = feb, - year = 1988, - note = "A full BOOKLET entry", -} - -@INBOOK{ballagh2000, - author = "R. Ballagh and C.M. Savage", - editor = "C.M. Savage and M. Das", - title = "Bose-Einstein condensation: from atomic physics to quantum fluids, Proceedings of the 13th Physics Summer School", - year = "2000", - publisher = "World Scientific", - address = "Singapore", - eprint = "cond-mat/0008070", -} - -@inBook{Magnetism, - author = "W. Opechowski and R. Guccione", - title = "Introduction to the Theory of Normal Metals", - volume = "IIa", - pages = "105", - editor = "G. T. Rado and H. Suhl", - booktitle = "Magnetism", - publisher = "Academic Press", - address = "New York", -} - year = "1965", - -@INPROCEEDINGS{Magnetismb, - author = "W. Opechowski and R. Guccione", - title = "Introduction to the Theory of Normal Metals", - editor = "G. T. Rado and H. Suhl", - booktitle = "Magnetism", - volume = "IIa", - pages = "105", - publisher = "Academic Press", - address = "New York", - year = "1965", -} - -@INBOOK{Smith80, - author = "J. M. Smith", - title = "Molecular Dynamics", - publisher = "Academic", - year = "1980", - address = "New York", - editor = "C. Brown", -} - -@article{ZS71, - author = "V. E. Zakharov and A. B. Shabat", - year = "1971", - title = "Exact theory of two-dimensional self-focusing and one-dimensional self-modulation of waves in nonlinear media", - journal = "Zh. Eksp. Teor. Fiz.", - volume = "61", - pages = "118--134", - translation = "Sov. Phys. JETP \textbf{34}, 62 (1972)" -} - -@INCOLLECTION{Beutler1994a, - author = "E. Beutler", - year = "1994", - booktitle = "Williams Hematology", - edition = "5", - chapter = "7", - editor = "E. Beutler and M. A. Lichtman and B. W. Coller and T. S. Kipps", - publisher = "McGraw-Hill", - address = "New York", - volume = "2", - pages = "654--662", -} - -@INCOLLECTION{ballagh2000a, - author = "R. Ballagh and C.M. Savage", - year = "2000", - title = "Bose-Einstein condensation: from atomic physics to quantum fluids", - booktitle = "Proceedings of the 13th Physics Summer School", - editor = "C.M. Savage and M. Das", - publisher = "World Scientific", - address = "Singapore", - eprint = "cond-mat/0008070", -} - -@INCOLLECTION{Magnetisma, - author = "W. Opechowski and R. Guccione", - year = "1965", - title = "Introduction to the Theory of Normal Metals", - booktitle = "Magnetism", - editor = "G. T. Rado and H. Suhl", - publisher = "Academic Press", - address = "New York", - volume = "IIa", - pages = "105", -} - -@INCOLLECTION{Smith80a, - author = "J. M. Smith", - year = "1980", - booktitle = "Molecular Dynamics", - editor = "C. Brown", - publisher = "Academic", - address = "New York", -} - -@INCOLLECTION{incollection-full, - key = "incol-ful", - author = "Daniel D. Lincoll", - year = 1977, - title = "Semigroups of Recurrences", - booktitle = "High Speed Computer and Algorithm Organization", - edition = "Third", - series = "Fast Computers", - number = 23, - chapter = 3, - type = "Part", - editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh", - publisher = "Academic Press", - address = "New York", - month = sep, - pages = "179--183", - note = "A full INCOLLECTION entry", -} - -@INPROCEEDINGS{inproceedings-full, - author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis", - title = "On Notions of Information Transfer in {VLSI} Circuits", - editor = "Wizard V. Oz and Mihalis Yannakakis", - booktitle = "Proc. Fifteenth Annual ACM", - number = 17, - series = "All ACM Conferences", - pages = "133--139", - month = mar, - year = 1983, - address = "Boston", - organization = "ACM", - publisher = "Academic Press", - note = "A full INPROCEDINGS entry", -} - -@MANUAL{manual-full, - author = "Larry Manmaker", - title = "The Definitive Computer Manual", - organization = "Chips-R-Us", - address = "Silicon Valley", - edition = "Silver", - month = apr # "-" # may, - year = 1986, - note = "A full MANUAL entry", -} +@PREAMBLE{ + "\providecommand{\noopsort}[1]{}" + # "\providecommand{\singleletter}[1]{#1}%" +} + +@BOOK{Bire82, + author = {N. D. Birell and P. C. W. Davies}, + year = 1982, + title = {Quantum Fields in Curved Space}, + publisher = {Cambridge University Press} +} + +@ARTICLE{feyn54, + author = "R. P. Feynman", + year = "1954", + journal = "Phys.\ Rev.", + volume = "94", + pages = "262", +} + +@ARTICLE{epr, + author = "A. Einstein and {\relax Yu} Podolsky and N. Rosen", + year = "1935", + journal = "Phys.\ Rev.", + volume = "47", + pages = "777", +} + +@ARTICLE{Berman1983, + author = "Berman, Jr., G. P. and Izrailev, Jr., F. M.", + title = "Stability of nonlinear modes", + journal = "Physica D", + volume = "88", + pages = "445", + year = "1983", +} + +@ARTICLE{Davies1998, + author = "E. B. Davies and L. Parns", + title = "Trapped modes in acoustic waveguides", + journal = "Q. J. Mech. Appl. Math.", + volume = "51", + pages = "477--492", + year = "1988", +} + +@MISC{witten2001, + author = "Edward Witten", + eprint = "hep-th/0106109", + year = "2001", +} + +@INBOOK{Beutler1994, + author = "E. Beutler", + editor = "E. Beutler and M. A. Lichtman and B. W. Coller and T. S. Kipps", + title = "Williams Hematology", + chapter = "7", + pages = "654--662", + publisher = "McGraw-Hill", + year = "1994", + + edition = "5", + address = "New York", + volume = "2", +} + +@INBOOK{inbook-full, + author = "Donald E. Knuth", + title = "Fundamental Algorithms", + volume = 1, + series = "The Art of Computer Programming", + publisher = "Addison-Wesley", + address = "Reading, Massachusetts", + edition = "Second", + month = "10~" # jan, + year = "\noopsort{1973b}1973", + type = "Section", + chapter = "1.2", + pages = "10--119", + note = "A full INBOOK entry", +} + +@ARTICLE{Smith2005, + author = "J. S. Smith and G. W. Johnson", + journal = "Philos. Trans. R. Soc. London, Ser. B", + title = "", + year = "2005", + + volume = "777", + pages = "1395", +} + +@UNPUBLISHED{Smith2010, + author = "W. J. Smith and T. J. Johnson and B. G. Miller", + title = "Surface chemistry and preferential crystal orientation on a silicon surface", + note = "{J. Appl. Phys.} (unpublished)", + + month = "", + year = "", +} + +@UNPUBLISHED{Smith2010a, + author = "V. K. Smith and K. Johnson and M. O. Klein", + title = "Surface chemistry and preferential crystal orientation on a silicon surface", + note = "{J. Appl. Phys.} (submitted)", + + month = "", + year = "", +} + +@UNPUBLISHED{unpublished-full, + author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot", + title = "Lower Bounds for Wishful Research Results", + month = nov # ", " # dec, + year = 1988, + note = "Talk at Fanstord University (A full UNPUBLISHED entry)", +} + +@MISC{JohnsonMillerSmith2007, + + author = "M. P. Johnson and K. L. Miller and K. Smith", + title = "", + howpublished = "personal communication", + month = "1~" # may, + year = "2007", + note = "", +} + +@PROCEEDINGS{Smith2007, + title = "AIP Conf. Proc.", + year = "2007", + + editor = "J. Smith", + volume = "841", + number = "21", + series = "", + address = "", + month = "", + organization = "", + publisher = "", + note = "", +} + +@PROCEEDINGS{proceedings-full, + editor = "Wizard V. Oz and Mihalis Yannakakis", + title = "Proc. Fifteenth Annual", + number = 17, + series = "All ACM Conferences", + month = mar, + year = 1983, + address = "Boston", + organization = "ACM", + publisher = "Academic Press", + note = "A full PROCEEDINGS entry", +} + +@UNPUBLISHED{Burstyn2004, + author = "Y. Burstyn", + title = "{Proceedings of the 5th International Molecular Beam Epitaxy Conference, Santa Fe, NM}", + note = "(unpublished)", + + month = "5--8~" # oct, + year = "2004", +} + +@PROCEEDINGS{Quinn2001, + title = "{Proceedings of the 2003 Particle Accelerator Conference, Portland, OR, 12-16 May 2005}", + year = "2001", + + editor = "B. Quinn", + address = "New York", + publisher = "Wiley", + note = "Albeit the conference was held in 2005, it was the 2003 conference, and the proceedings were published in 2001; go figure", +} + +@ARTICLE{Agarwal2001, + author = "A. G. Agarwal", + title = "{Proceedings of the Fifth Low Temperature Conference, Madison, WI, 1999}", + journal = "Semiconductors", + year = "2001", + + volume = "66", + pages = "1238", +} + +@ARTICLE{SmithDA01, + author = "R. Smith", + title = "Hummingbirds are our friends", + journal = {J. Appl. Phys. (these proceedings)}, + year = "", + volume = "", + number = "", + pages = "", + month = "", + note = "Abstract No. DA-01", +} + +@ARTICLE{Smith2007a, + author = "J. Smith", + title = "", + journal = "Proc. SPIE", + year = "2007", + + volume = "124", + pages = "367", + note = "Required title is missing", +} + +@TECHREPORT{techreport-full, + author = "Tom T{\'{e}}rrific", + title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm", + institution = "Fanstord University", + type = "Wishful Research Result", + number = "7", + address = "Computer Science Department, Fanstord, California", + month = oct, + year = 1988, + note = "A full TECHREPORT entry", +} + +@TECHREPORT{Nelson1999, + author = "J. Nelson", + type = "{TWI Report}", + number = "666/1999", + institution = "", + year = jan # "~1999", + + note = "Required institution missing", +} + +@TECHREPORT{Fields2005, + author = "W. K. Fields", + type = "{ECE Report No.}", + number = "AL944", + institution = "", + year = "2005", + + note = "Required institution missing", +} + +@MISC{Zalkins2008, + + author = "Y. M. Zalkins", + title = "", + howpublished = "e-print arXiv:cond-mat/040426", + month = "", + year = "2008", + note = "", +} + +@MISC{Nelson2005, + + author = "J. Nelson", + howpublished = "{U.S. Patent No.} 5,693,000", + year = "12~" # dec # "~2005", +} + +@MASTERSTHESIS{Nelson1999a, + author = "J. K. Nelson", + title = "", + school = "New York University", + year = "1999", + + type = "M.{S}. thesis", + address = "", + month = "", + note = "", +} + +@MASTERSTHESIS{mastersthesis-full, + author = "{\'{E}}douard Masterly", + title = "Mastering Thesis Writing", + school = "Stanford University", + type = "Master's project", + address = "English Department", + month = jun # "-" # aug, + year = 1988, + note = "A full MASTERSTHESIS entry", +} + +@PHDTHESIS{Smith2003, + author = "S. M. Smith", + title = "", + school = "Massachusetts Institute of Technology", + year = "2003", + + type = "{Ph.D.} thesis", + address = "", + month = "", + note = "", +} + +@ARTICLE{KawaLin2003, + author = "S. R. Kawa and S.-J. Lin", + title = "", + journal = "J. Geophys. Res.", + year = "2003", + + volume = "108", + number = "D6", + pages = "4201", + month = "", + note = "{DOI:10.1029/2002JD002268}", +} + +@PHDTHESIS{phdthesis-full, + author = "F. Phidias Phony-Baloney", + title = "Fighting Fire with Fire: Festooning {F}rench Phrases", + school = "Fanstord University", + type = "{PhD} Dissertation", + address = "Department of French", + month = jun # "-" # aug, + year = 1988, + note = "A full PHDTHESIS entry", +} + +@BOOK{book-full, + author = "Donald E. Knuth", + title = "Seminumerical Algorithms", + volume = 2, + series = "The Art of Computer Programming", + publisher = "Addison-Wesley", + address = "Reading, Massachusetts", + edition = "Second", + month = "10~" # jan, + year = "\noopsort{1973c}1981", + note = "A full BOOK entry", +} + +@BOOKLET{booklet-full, + author = "Jill C. Knvth", + title = "The Programming of Computer Art", + howpublished = "Vernier Art Center", + address = "Stanford, California", + month = feb, + year = 1988, + note = "A full BOOKLET entry", +} + +@INBOOK{ballagh2000, + author = "R. Ballagh and C.M. Savage", + editor = "C.M. Savage and M. Das", + title = "Bose-Einstein condensation: from atomic physics to quantum fluids, Proceedings of the 13th Physics Summer School", + year = "2000", + publisher = "World Scientific", + address = "Singapore", + eprint = "cond-mat/0008070", +} + +@inBook{Magnetism, + author = "W. Opechowski and R. Guccione", + title = "Introduction to the Theory of Normal Metals", + volume = "IIa", + pages = "105", + editor = "G. T. Rado and H. Suhl", + booktitle = "Magnetism", + publisher = "Academic Press", + address = "New York", +} + year = "1965", + +@INPROCEEDINGS{Magnetismb, + author = "W. Opechowski and R. Guccione", + title = "Introduction to the Theory of Normal Metals", + editor = "G. T. Rado and H. Suhl", + booktitle = "Magnetism", + volume = "IIa", + pages = "105", + publisher = "Academic Press", + address = "New York", + year = "1965", +} + +@INBOOK{Smith80, + author = "J. M. Smith", + title = "Molecular Dynamics", + publisher = "Academic", + year = "1980", + address = "New York", + editor = "C. Brown", +} + +@article{ZS71, + author = "V. E. Zakharov and A. B. Shabat", + year = "1971", + title = "Exact theory of two-dimensional self-focusing and one-dimensional self-modulation of waves in nonlinear media", + journal = "Zh. Eksp. Teor. Fiz.", + volume = "61", + pages = "118--134", + translation = "Sov. Phys. JETP \textbf{34}, 62 (1972)" +} + +@INCOLLECTION{Beutler1994a, + author = "E. Beutler", + year = "1994", + booktitle = "Williams Hematology", + edition = "5", + chapter = "7", + editor = "E. Beutler and M. A. Lichtman and B. W. Coller and T. S. Kipps", + publisher = "McGraw-Hill", + address = "New York", + volume = "2", + pages = "654--662", +} + +@INCOLLECTION{ballagh2000a, + author = "R. Ballagh and C.M. Savage", + year = "2000", + title = "Bose-Einstein condensation: from atomic physics to quantum fluids", + booktitle = "Proceedings of the 13th Physics Summer School", + editor = "C.M. Savage and M. Das", + publisher = "World Scientific", + address = "Singapore", + eprint = "cond-mat/0008070", +} + +@INCOLLECTION{Magnetisma, + author = "W. Opechowski and R. Guccione", + year = "1965", + title = "Introduction to the Theory of Normal Metals", + booktitle = "Magnetism", + editor = "G. T. Rado and H. Suhl", + publisher = "Academic Press", + address = "New York", + volume = "IIa", + pages = "105", +} + +@INCOLLECTION{Smith80a, + author = "J. M. Smith", + year = "1980", + booktitle = "Molecular Dynamics", + editor = "C. Brown", + publisher = "Academic", + address = "New York", +} + +@INCOLLECTION{incollection-full, + key = "incol-ful", + author = "Daniel D. Lincoll", + year = 1977, + title = "Semigroups of Recurrences", + booktitle = "High Speed Computer and Algorithm Organization", + edition = "Third", + series = "Fast Computers", + number = 23, + chapter = 3, + type = "Part", + editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh", + publisher = "Academic Press", + address = "New York", + month = sep, + pages = "179--183", + note = "A full INCOLLECTION entry", +} + +@INPROCEEDINGS{inproceedings-full, + author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis", + title = "On Notions of Information Transfer in {VLSI} Circuits", + editor = "Wizard V. Oz and Mihalis Yannakakis", + booktitle = "Proc. Fifteenth Annual ACM", + number = 17, + series = "All ACM Conferences", + pages = "133--139", + month = mar, + year = 1983, + address = "Boston", + organization = "ACM", + publisher = "Academic Press", + note = "A full INPROCEDINGS entry", +} + +@MANUAL{manual-full, + author = "Larry Manmaker", + title = "The Definitive Computer Manual", + organization = "Chips-R-Us", + address = "Silicon Valley", + edition = "Silver", + month = apr # "-" # may, + year = 1986, + note = "A full MANUAL entry", +} only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/sample/aip/aipsamp.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/sample/aip/aipsamp.tex @@ -1,613 +1,613 @@ -% ****** Start of file aipsamp.tex ****** -% -% This file is part of the AIP files in the AIP distribution for REVTeX 4. -% Version 4.1 of REVTeX, October 2009 -% -% Copyright (c) 2009 American Institute of Physics. -% -% See the AIP README file for restrictions and more information. -% -% TeX'ing this file requires that you have AMS-LaTeX 2.0 installed -% as well as the rest of the prerequisites for REVTeX 4.1 -% -% It also requires running BibTeX. The commands are as follows: -% -% 1) latex aipsamp -% 2) bibtex aipsamp -% 3) latex aipsamp -% 4) latex aipsamp -% -% Use this file as a source of example code for your aip document. -% Use the file aiptemplate.tex as a template for your document. -\documentclass[% - aip, - jmp,% - amsmath,amssymb, -%preprint,% - reprint,% -%author-year,% -%author-numerical,% -]{revtex4-1} - -\usepackage{graphicx}% Include figure files -\usepackage{dcolumn}% Align table columns on decimal point -\usepackage{bm}% bold math -%\usepackage[mathlines]{lineno}% Enable numbering of text and display math -%\linenumbers\relax % Commence numbering lines - -\begin{document} - -\preprint{AIP/123-QED} - -\title[Sample title]{Sample Title:\\with Forced Linebreak\footnote{Error!}}% Force line breaks with \\ -\thanks{Footnote to title of article.} - -\author{A. Author} - \altaffiliation[Also at ]{Physics Department, XYZ University.}%Lines break automatically or can be forced with \\ -\author{B. Author}% - \email{Second.Author@institution.edu.} -\affiliation{ -Authors' institution and/or address%\\This line break forced with \textbackslash\textbackslash -}% - -\author{C. Author} - \homepage{http://www.Second.institution.edu/~Charlie.Author.} -\affiliation{% -Second institution and/or address%\\This line break forced% with \\ -}% - -\date{\today}% It is always \today, today, - % but any date may be explicitly specified - -\begin{abstract} -An article usually includes an abstract, a concise summary of the work -covered at length in the main body of the article. It is used for -secondary publications and for information retrieval purposes. -% -Valid PACS numbers may be entered using the \verb+\pacs{#1}+ command. -\end{abstract} - -\pacs{Valid PACS appear here}% PACS, the Physics and Astronomy - % Classification Scheme. -\keywords{Suggested keywords}%Use showkeys class option if keyword - %display desired -\maketitle - -\begin{quotation} -The ``lead paragraph'' is encapsulated with the \LaTeX\ -\verb+quotation+ environment and is formatted as a single paragraph before the first section heading. -(The \verb+quotation+ environment reverts to its usual meaning after the first sectioning command.) -Note that numbered references are allowed in the lead paragraph. -% -The lead paragraph will only be found in an article being prepared for the journal \textit{Chaos}. -\end{quotation} - -\section{\label{sec:level1}First-level heading:\protect\\ The line -break was forced \lowercase{via} \textbackslash\textbackslash} - -This sample document demonstrates proper use of REV\TeX~4.1 (and -\LaTeXe) in manuscripts prepared for submission to AIP -journals. Further information can be found in the documentation included in the distribution or available at -\url{http://authors.aip.org} and in the documentation for -REV\TeX~4.1 itself. - -When commands are referred to in this example file, they are always -shown with their required arguments, using normal \TeX{} format. In -this format, \verb+#1+, \verb+#2+, etc. stand for required -author-supplied arguments to commands. For example, in -\verb+\section{#1}+ the \verb+#1+ stands for the title text of the -author's section heading, and in \verb+\title{#1}+ the \verb+#1+ -stands for the title text of the paper. - -Line breaks in section headings at all levels can be introduced using -\textbackslash\textbackslash. A blank input line tells \TeX\ that the -paragraph has ended. - -\subsection{\label{sec:level2}Second-level heading: Formatting} - -This file may be formatted in both the \texttt{preprint} (the default) and -\texttt{reprint} styles; the latter format may be used to -mimic final journal output. Either format may be used for submission -purposes; however, for peer review and production, AIP will format the -article using the \texttt{preprint} class option. Hence, it is -essential that authors check that their manuscripts format acceptably -under \texttt{preprint}. Manuscripts submitted to AIP that do not -format correctly under the \texttt{preprint} option may be delayed in -both the editorial and production processes. - -The \texttt{widetext} environment will make the text the width of the -full page, as on page~\pageref{eq:wideeq}. (Note the use the -\verb+\pageref{#1}+ to get the page number right automatically.) The -width-changing commands only take effect in \texttt{twocolumn} -formatting. It has no effect if \texttt{preprint} formatting is chosen -instead. - -\subsubsection{\label{sec:level3}Third-level heading: Citations and Footnotes} - -Citations in text refer to entries in the Bibliography; -they use the commands \verb+\cite{#1}+ or \verb+\onlinecite{#1}+. -Because REV\TeX\ uses the \verb+natbib+ package of Patrick Daly, -its entire repertoire of commands are available in your document; -see the \verb+natbib+ documentation for further details. -The argument of \verb+\cite+ is a comma-separated list of \emph{keys}; -a key may consist of letters and numerals. - -By default, citations are numerical; \cite{feyn54} author-year citations are an option. -To give a textual citation, use \verb+\onlinecite{#1}+: (Refs.~\onlinecite{witten2001,epr,Bire82}). -REV\TeX\ ``collapses'' lists of consecutive numerical citations when appropriate. -REV\TeX\ provides the ability to properly punctuate textual citations in author-year style; -this facility works correctly with numerical citations only with \texttt{natbib}'s compress option turned off. -To illustrate, we cite several together \cite{feyn54,witten2001,epr,Berman1983}, -and once again (Refs.~\onlinecite{epr,feyn54,Bire82,Berman1983}). -Note that, when numerical citations are used, the references were sorted into the same order they appear in the bibliography. - -A reference within the bibliography is specified with a \verb+\bibitem{#1}+ command, -where the argument is the citation key mentioned above. -\verb+\bibitem{#1}+ commands may be crafted by hand or, preferably, -generated by using Bib\TeX. -The AIP styles for REV\TeX~4 include Bib\TeX\ style files -\verb+aipnum.bst+ and \verb+aipauth.bst+, appropriate for -numbered and author-year bibliographies, -respectively. -REV\TeX~4 will automatically choose the style appropriate for -the document's selected class options: the default is numerical, and -you obtain the author-year style by specifying a class option of \verb+author-year+. - -This sample file demonstrates a simple use of Bib\TeX\ -via a \verb+\bibliography+ command referencing the \verb+aipsamp.bib+ file. -Running Bib\TeX\ (in this case \texttt{bibtex -aipsamp}) after the first pass of \LaTeX\ produces the file -\verb+aipsamp.bbl+ which contains the automatically formatted -\verb+\bibitem+ commands (including extra markup information via -\verb+\bibinfo+ commands). If not using Bib\TeX, the -\verb+thebibiliography+ environment should be used instead. - -\paragraph{Fourth-level heading is run in.}% -Footnotes are produced using the \verb+\footnote{#1}+ command. -Numerical style citations put footnotes into the -bibliography\footnote{Automatically placing footnotes into the bibliography requires using BibTeX to compile the bibliography.}. -Author-year and numerical author-year citation styles (each for its own reason) cannot use this method. -Note: due to the method used to place footnotes in the bibliography, \emph{you -must re-run BibTeX every time you change any of your document's -footnotes}. - -\section{Math and Equations} -Inline math may be typeset using the \verb+$+ delimiters. Bold math -symbols may be achieved using the \verb+bm+ package and the -\verb+\bm{#1}+ command it supplies. For instance, a bold $\alpha$ can -be typeset as \verb+$\bm{\alpha}$+ giving $\bm{\alpha}$. Fraktur and -Blackboard (or open face or double struck) characters should be -typeset using the \verb+\mathfrak{#1}+ and \verb+\mathbb{#1}+ commands -respectively. Both are supplied by the \texttt{amssymb} package. For -example, \verb+$\mathbb{R}$+ gives $\mathbb{R}$ and -\verb+$\mathfrak{G}$+ gives $\mathfrak{G}$ - -In \LaTeX\ there are many different ways to display equations, and a -few preferred ways are noted below. Displayed math will center by -default. Use the class option \verb+fleqn+ to flush equations left. - -Below we have numbered single-line equations, the most common kind: -\begin{eqnarray} -\chi_+(p)\alt{\bf [}2|{\bf p}|(|{\bf p}|+p_z){\bf ]}^{-1/2} -\left( -\begin{array}{c} -|{\bf p}|+p_z\\ -px+ip_y -\end{array}\right)\;, -\\ -\left\{% - \openone234567890abc123\alpha\beta\gamma\delta1234556\alpha\beta - \frac{1\sum^{a}_{b}}{A^2}% -\right\}% -\label{eq:one}. -\end{eqnarray} -Note the open one in Eq.~(\ref{eq:one}). - -Not all numbered equations will fit within a narrow column this -way. The equation number will move down automatically if it cannot fit -on the same line with a one-line equation: -\begin{equation} -\left\{ - ab12345678abc123456abcdef\alpha\beta\gamma\delta1234556\alpha\beta - \frac{1\sum^{a}_{b}}{A^2}% -\right\}. -\end{equation} - -When the \verb+\label{#1}+ command is used [cf. input for -Eq.~(\ref{eq:one})], the equation can be referred to in text without -knowing the equation number that \TeX\ will assign to it. Just -use \verb+\ref{#1}+, where \verb+#1+ is the same name that used in -the \verb+\label{#1}+ command. - -Unnumbered single-line equations can be typeset -using the \verb+\[+, \verb+\]+ format: -\[g^+g^+ \rightarrow g^+g^+g^+g^+ \dots ~,~~q^+q^+\rightarrow -q^+g^+g^+ \dots ~. \] - -\subsection{Multiline equations} - -Multiline equations are obtained by using the \verb+eqnarray+ -environment. Use the \verb+\nonumber+ command at the end of each line -to avoid assigning a number: -\begin{eqnarray} -{\cal M}=&&ig_Z^2(4E_1E_2)^{1/2}(l_i^2)^{-1} -\delta_{\sigma_1,-\sigma_2} -(g_{\sigma_2}^e)^2\chi_{-\sigma_2}(p_2)\nonumber\\ -&&\times -[\epsilon_jl_i\epsilon_i]_{\sigma_1}\chi_{\sigma_1}(p_1), -\end{eqnarray} -\begin{eqnarray} -\sum \vert M^{\text{viol}}_g \vert ^2&=&g^{2n-4}_S(Q^2)~N^{n-2} - (N^2-1)\nonumber \\ - & &\times \left( \sum_{i#1=\string\meta{#1}}% -}% -\DeclareRobustCommand\meta[1]{% - \mbox{\m@th\LANGLE\itshape#1\/\RANGLE}% -}% -\def\LANGLE{$\langle$}% -\def\RANGLE{$\rangle$}% -\DeclareRobustCommand{\marg}[1]{% - {\ttfamily\string{}\meta{#1}{\ttfamily\string}}% - \index{#1=\string\ttt{#1}, argument}\index{argument>#1=\string\ttt{#1}}% -}% -\DeclareRobustCommand{\aarg}[1]{% - {\ttfamily\string{}#1{\ttfamily\string}}% -}% -\let\oarg\undefined -\DeclareRobustCommand{\oarg}[1]{% - {\ttfamily[%] - }\meta{#1}{\ttfamily%[ - ]}% - \index{#1=\string\ttt{#1}, optional argument}% - \index{argument, optional>#1=\string\ttt{#1}}% -}% -\DeclareRobustCommand\cmd{\begingroup\makeatletter\@cmd}% -\long\def\@cmd#1{% - \endgroup - \cs{\expandafter\cmd@to@cs\string#1}% - \expandafter\cmd@to@index\string#1\@nil -}% -\def\cmd@to@cs#1#2{\char\number`#2\relax}% -\def\cmd@to@index#1#2\@nil{% - \index{#2=\string\cmd#1#2}%\index{command>#2=\string\cmd#1#2}% -}% -\DeclareRobustCommand\cs[1]{{\ttfamily\char`\\#1}}% -\def\scmd#1{% - \cs{\expandafter\cmd@to@cs\string#1}% - \expandafter\scmd@to@index\string#1\@nil -}% -\def\scmd@to@index#1#2\@nil#3{% - \index{\string$#3=\string\cmd#1#2---#3}% -%\index{command>\string$#3=\string\cmd#1#2---#3}% -}% -\DeclareRobustCommand\env{\name@idx{environment}}% -\DeclareRobustCommand\envb[1]{% - {\ttfamily\string\begin\string{}\env{#1}{\ttfamily\string}}% -}% -\DeclareRobustCommand\enve[1]{{\ttfamily\string\end\string{}\env{#1}{\ttfamily\string}}}% -\DeclareRobustCommand*{\file}[1]{% - {\ttfamily#1}% - \index{#1=\string\ttt{#1}}\index{file>#1=\string\ttt{#1}}% -}% -\DeclareRobustCommand\substyle{\name@idx{document substyle}}% -\DeclareRobustCommand\classoption{\name@idx{document class option}}% -\DeclareRobustCommand\classname{\name@idx{document class}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -% -% Needed for index: -% -\def\ttt{\texttt}% -\def\pfill{\ }% -\def\efill{\ }% -\let\scan@allowedfalse\relax -%\makeindex -\AtEndDocument{\@input@{\jobname.ind}\null}% -% -% Processing options -% -% -% Layout: override revtex4|aps -\c@secnumdepth2 -\prepdef\@verbatim{\topsep.5\baselineskip}% -\renewenvironment{quotation}{% - \list{}{% - \listparindent 10\p@ - \itemindent\listparindent - \leftmargin10\p@ - \rightmargin\leftmargin - \parsep \z@ \@plus\p@ - \small - }% - \item[]% -}{% - \endlist -}% -\renewenvironment{quote}{% - \list{}{% - \leftmargin\z@ - \rightmargin\leftmargin - }\item[]% -}{% - \endlist -}% -\leftmargini\parindent -\def\descriptionlabel#1{% - \hspace\labelsep\ignorespaces - #1\unskip -}% -\def\toprule{\hline\hline\frstrut}% -\def\colrule{\hline\frstrut}% -\def\frstrut{\vrule height2.5ex width\z@ depth\z@\relax}% -\def\lrstrut{\vrule height\z@ width\z@ depth.5ex\relax}% -% -% Klootches -% -\let\savenofiles\nofiles -% -% Patches: -% -% -\endinput +% authguide.rty - macros for processing revguide.tex under \documentclass{revtex4} +% Text entities +\DeclareRobustCommand\SNG{\emph{Physical Review Style and Notation Guide}} +\DeclareRobustCommand\LUG{\emph{\LaTeX{} User's Guide \& Reference Manual}} +\DeclareRobustCommand\revtex{REV\TeX} +\DeclareRobustCommand\marglat{\marginpar[\textbf{2e}]{\textbf{2e}}} +\DeclareRobustCommand\margrev{\marginpar[\textbf{4}]{\textbf{4}}} +\DeclareRobustCommand\AmS{% + {\protect\the\textfont\tw@ A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}% +}% +\DeclareRobustCommand\AmSLaTeX{\AmS-\LaTeX} +\DeclareRobustCommand\BibTeX{{\rm B}{\sc ib}\TeX} +% +% Various forms of self-indexing commands: +% \begin{macrocode} +\DeclareRobustCommand{\m}[1]{% + \meta{#1}% + \index{#1=\string\meta{#1} placeholder}\index{placeholder>#1=\string\meta{#1}}% +}% +\DeclareRobustCommand\meta[1]{% + \mbox{\m@th\LANGLE\itshape#1\/\RANGLE}% +}% +\def\LANGLE{$\langle$}% +\def\RANGLE{$\rangle$}% +\DeclareRobustCommand{\marg}[1]{% + {\ttfamily\string{}\meta{#1}{\ttfamily\string}}% + \index{#1=\string\ttt{#1}, argument}\index{argument>#1=\string\ttt{#1}}% +}% +\DeclareRobustCommand{\aarg}[1]{% + {\ttfamily\string{}#1{\ttfamily\string}}% +}% +\let\oarg\undefined +\DeclareRobustCommand{\oarg}[1]{% + {\ttfamily[%] + }\meta{#1}{\ttfamily%[ + ]}% + \index{#1=\string\ttt{#1}, optional argument}% + \index{argument, optional>#1=\string\ttt{#1}}% +}% +\DeclareRobustCommand\cmd{\begingroup\makeatletter\@cmd}% +\long\def\@cmd#1{% + \endgroup + \cs{\expandafter\cmd@to@cs\string#1}% + \expandafter\cmd@to@index\string#1\@nil +}% +\def\cmd@to@cs#1#2{\char\number`#2\relax}% +\def\cmd@to@index#1#2\@nil{% + \index{#2=\string\cmd#1#2}%\index{command>#2=\string\cmd#1#2}% +}% +\DeclareRobustCommand\cs[1]{{\ttfamily\char`\\#1}}% +\def\scmd#1{% + \cs{\expandafter\cmd@to@cs\string#1}% + \expandafter\scmd@to@index\string#1\@nil +}% +\def\scmd@to@index#1#2\@nil#3{% + \index{\string$#3=\string\cmd#1#2---#3}% +%\index{command>\string$#3=\string\cmd#1#2---#3}% +}% +\DeclareRobustCommand\env{\name@idx{environment}}% +\DeclareRobustCommand\envb[1]{% + {\ttfamily\string\begin\string{}\env{#1}{\ttfamily\string}}% +}% +\DeclareRobustCommand\enve[1]{{\ttfamily\string\end\string{}\env{#1}{\ttfamily\string}}}% +\DeclareRobustCommand*{\file}[1]{% + {\ttfamily#1}% + \index{#1=\string\ttt{#1}}\index{file>#1=\string\ttt{#1}}% +}% +\DeclareRobustCommand\substyle{\name@idx{document substyle}}% +\DeclareRobustCommand\classoption{\name@idx{document class option}}% +\DeclareRobustCommand\classname{\name@idx{document class}}% +\def\name@idx#1#2{% + {\ttfamily#2}% + \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% +}% +% +% Needed for index: +% +\def\ttt{\texttt}% +\def\pfill{\ }% +\def\efill{\ }% +\let\scan@allowedfalse\relax +%\makeindex +\AtEndDocument{\@input@{\jobname.ind}\null}% +% +% Processing options +% +% +% Layout: override revtex4|aps +\c@secnumdepth2 +\prepdef\@verbatim{\topsep.5\baselineskip}% +\renewenvironment{quotation}{% + \list{}{% + \listparindent 10\p@ + \itemindent\listparindent + \leftmargin10\p@ + \rightmargin\leftmargin + \parsep \z@ \@plus\p@ + \small + }% + \item[]% +}{% + \endlist +}% +\renewenvironment{quote}{% + \list{}{% + \leftmargin\z@ + \rightmargin\leftmargin + }\item[]% +}{% + \endlist +}% +\leftmargini\parindent +\def\descriptionlabel#1{% + \hspace\labelsep\ignorespaces + #1\unskip +}% +\def\toprule{\hline\hline\frstrut}% +\def\colrule{\hline\frstrut}% +\def\frstrut{\vrule height2.5ex width\z@ depth\z@\relax}% +\def\lrstrut{\vrule height\z@ width\z@ depth.5ex\relax}% +% +% Klootches +% +\let\savenofiles\nofiles +% +% Patches: +% +% +\endinput only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/auguide/whatsnew4-1.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/auguide/whatsnew4-1.tex @@ -1,9 +1,9 @@ %% ****** Start of file whatsnew4-1.tex ****** % %% %% This file is part of the APS files in the REVTeX 4 distribution. -%% Version 4.1 of REVTeX, October 2009 +%% Version 4.1r of REVTeX, August, 2010 %% -%% Copyright (c) 2009 The American Physical Society. +%% Copyright (c) 2009, 2010 The American Physical Society. %% %% See the REVTeX 4.1 README file for restrictions and more information. %% @@ -13,7 +13,7 @@ ,twocolumn% ,secnumarabic% %,tightenlines% -,amssymb,aps,prl,nobibnotes]{revtex4-1} +,amssymb,aps,pra,nobibnotes]{revtex4-1} \usepackage{docs} %\usepackage{acrofont}%NOTE: Comment out this line for the release version! %\usepackage[colorlinks=true,linkcolor=blue]{hyperref}% @@ -38,12 +38,12 @@ \author{American Physical Society}% %\email{revtex4@aps.org} \affiliation{1 Research Road, Ridge, NY 11961} -\date{October 2009}% +\date{August 2010}% %\tableofcontents \begin{abstract} -This document gives a brief summary of what's new in \revtex~4.1. The changes include bug fixes, improved functionality, and support for a wider range of journals, including those of the American Institute of Physics (AIP). \revtex~4.1 was developed jointly by APS, AIP, and Arthur Ogawa. Additional work was done by Patrick Daly to incorporate our suggested improvements into \texttt{natbib 8.3} to address many new features concerning bibliographies. \texttt{natbib 8.3} or later is required to run \revtex~4.1. +This document gives a brief summary of what's new in \revtex~4.1. The changes include bug fixes, improved functionality, and support for a wider range of journals, including those of the American Institute of Physics (AIP). \revtex~4.1 was developed jointly by APS, AIP, and Arthur Ogawa. Additional work was done by Patrick Daly to incorporate our suggested improvements into \texttt{natbib 8.3} to address many new features concerning bibliographies. \texttt{natbib 8.31a} or later is required to run \revtex~4.1. \end{abstract} \maketitle @@ -55,6 +55,7 @@ \item \textbf{Added support for AIP journals.} There is now an explicit \texttt{aip} society option along with support for AIP journals. Please see the \textit{Author's Guide to AIP Substyles for \revtex~4.1}. In addition, \revtex~4.1 provides an extensible system for the easy addition of new collections of journals. \item \textbf{Endnotes now ordered correctly.} Endnotes in the bibliography now appear in the correct order, interleaved with citations. \item \textbf{Multiple references in a single citation supported using a special starred (*) argument to the \cmd\cite\ command.} One of the major new features in 4.1 made possible by the joint work on \texttt{natbib 8.3}. Multiple Bib\TeX\ entries can be combined into a single \cmd\bibitem\ command. +\item \textbf{Bib\TeX\ style files can now display journal article titles in the bibliography.} Use the \texttt{longbibliography} class option. \item \textbf{Free form text can be prepended and appended to a bibliographic entry using the special starred (*) argument to the \cmd\cite\ command.} Often a citation in the bibliography will have explanatory text such as \textit{See also} or \textit{and references therein} before and after the actual citation. The new \revtex~4.1 \cmd\cite\ command allows the specification of both text to precede and follow a citation. \item \textbf{Structured Abstracts.} Use of the \texttt{description} environment in abstracts now provides for ``structured" abstracts. \item \textbf{Figures referring to videos now supported.} A ``figure" may now be labeled as a \textbf{Video} by using the \texttt{video} environment. A frame from the video may be included in the figure and a URL to link the caption's label to the online video also may be included. There is also a \cmd\listofvideos\ command. @@ -72,7 +73,7 @@ \item \textbf{\cmd\collaboration\ can be used with the \texttt{groupedaddress} option now.} \item \textbf{\texttt{letterpaper} now ensured as default paper size.} \item \textbf{Table of Contents formatting improved.} -\item \textbf{Support for \texttt{longtable} package improved.} +\item \textbf{Support for \texttt{longtable} and \texttt{lscape} packages improved.} \item \textbf{\texttt{reftest} restored.} \item \textbf{Compatibility with the \texttt{geometry, lineno,} and \texttt{colortbl} packages improved.} For line numbering, rather than using \texttt{lineno.sty} directly, the \texttt{linenumbers} class option should be used (this will call in \texttt{lineno.sty} with a proper set of default parameters). \item \texttt{hyperref} \textbf{fixes}. Improved compatibility between footnotes and the \texttt{hyperref} package. In particular, table footnotes were fixed. More anchors for \texttt{hyperref} were also added (titlepage, abstract, and acknowledgements). @@ -158,4 +159,8 @@ will include the arXiv.org e-print identifier as \texttt{arXiv:hep-th/9108028} and hyperlink it (if using \texttt{hyperref}). The newer format for arXiv identifiers with primary classificiations will produce output such as \texttt{arXiv:0905.1949 [hep-ph]}. +\begin{acknowledgments} +The development of \revtex~4.1 was managed by Mark Doyle (APS). The development of the new AIP style files and their accompanying documentation was managed by Susan Joy (AIP) with the help of Chris McMahon (AIP) and Rich O'Keeffe (AIP). Testing and evaluation were done by Michele Hake (APS), Liz Belmont (AIP), Brian Goss (AIP), Alison Waldron (AIP), and Phil Robertson (AIP). Additional detailed testing and feedback were provided by Lev Bishop (Yale). +\end{acknowledgments} + \end{document} only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/auguide/summary4-1.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/auguide/summary4-1.tex @@ -1,9 +1,9 @@ %% ****** Start of file summary4-1.tex ****** % %% %% This file is part of the APS files in the REVTeX 4 distribution. -%% Version 4.1g of REVTeX, October, 2009. +%% Version 4.1r of REVTeX, August, 2010 %% -%% Copyright (c) 2000, 2001, 2009 The American Physical Society. +%% Copyright (c) 2000, 2001, 2009, 2010 The American Physical Society. %% %% See the REVTeX 4.1 README file for restrictions and more information. %% @@ -34,7 +34,7 @@ \author{American Physical Society}% \email{revtex4@aps.org} \affiliation{One Research Road, Ridge, NY 11961} -\date{October 2009}% +\date{August 2010}% \maketitle This is the \textit{\revtex~4.1 Command and Options Summary}. It details @@ -72,8 +72,8 @@ % \multicolumn{2}{c}{\textsc{Frequently Used Class Options}\rule[-6pt]{0pt}{18pt}}\\* \verb+[aps]+ & \textit{American Physical Society} styling. Default.\\ -\verb+[aip]+ & \textit{American Institute of Physics} styling. Default.\\ -\verb+[prl]+, \verb+[pra]+, \verb+[prb]+, \verb+[prc]+, \verb+[prd]+, \verb+[pre]+, \verb+[prstab]+, \verb+[rmp]+& Further customize \verb+[aps]+ styling for APS journals.\\ +\verb+[aip]+ & \textit{American Institute of Physics} styling.\\ +\verb+[prl]+, \verb+[pra]+, \verb+[prb]+, \verb+[prc]+, \verb+[prd]+, \verb+[pre]+, \verb+[prstab]+, \verb+[prstper]+, \verb+[rmp]+& Further customize \verb+[aps]+ styling for APS journals.\\ \verb+[apl]+, \verb+[bmf]+, \verb+[cha]+, \verb+[jap]+, \verb+[jcp]+, \verb+[jmp]+, \verb+[rse]+, \verb+[pof]+, \verb+[pop]+, \verb+[rsi]+& Further customize \verb+[aip]+ styling for AIP journals.\\ %\verb+[rmp]+ & Further customize \verb+[aps]+ styling for \textit{Reviews of Modern Physics}.\\ \verb+[twocolumn]+ & Two-column formatting.\\ @@ -86,6 +86,7 @@ \verb+[superscriptaddress]+ & Associate authors with affiliations via superscript numbers. Appropriate for collaborations or if several authors share some, but not all, affiliations.\\ \verb+[draft]+ & Mark overfull lines.\\ \verb+[linenumbers]+ & Number lines (requires lineno.sty).\\ +\verb+[longbibliography]+ & Use alternative Bib\TeX\ style files that show journal article titles in the bibliography.\\ \verb+[amsfonts]+, \verb+[noamsfonts]+ & Load (don't load) \verb+amsfonts+ package. Adds AMS font support.\\ \verb+[amssymb]+, \verb+[noamssymb]+ & Load (don't load) @@ -126,7 +127,7 @@ \multicolumn{2}{c}{\textsc{Frontmatter Commands}\rule[-6pt]{0pt}{18pt}}\\* \verb+\title{}+ & The manuscript title.\\ \verb+\author{One Author}+ & Specify one author's name.\\ -\verb+\surname{Llyod Weber}+, \verb+\surname{Mao}+ & Indicate which part of a name within +\verb+\surname{Lloyd Weber}+, \verb+\surname{Mao}+ & Indicate which part of a name within \verb+\author+ should be used for alphabetizing and indexing.\\ \verb+\email[<optional text>]{author@any.edu}+& Specify an e-mail address for an author.\\ \verb+\homepage[<optional text>]+ \verb+ {http://any.edu/homepage/}+& Specify a URL for an author's web site.\\ @@ -155,8 +156,8 @@ \multicolumn{2}{c}{\textsc{Citation, Footnote, and Cross-referencing Commands}\rule[-6pt]{0pt}{18pt}}\\* \verb+\bibliography{<bib file basename>}+ & Specify a list of .bib files in which to find references. Read in the resulting .bbl file. For use with Bib\TeX\ . \\ -\verb+\bibligraphystyle{<bst stylefile>}+ & Specify a Bib\TeX\ (.bst) style file to use. APS journal options select the proper default (\texttt{apsrev} or \texttt{apsrmp}).\\ -\verb+\begin{thebibliography}+ & Start the reference section (when not using Bib\TeX\ . \\ +\verb+\bibliographystyle{<bst stylefile>}+ & Specify a Bib\TeX\ (.bst) style file to use. APS journal options select the proper default (\texttt{apsrev} or \texttt{apsrmp}).\\ +\verb+\begin{thebibliography}+ & Start the reference section (when not using Bib\TeX). \\ \verb+\bibitem[<optional text>]{<key>}+ & Specify a single reference.\\ \verb+\cite{<list of keys>}+ & Cite one or more references. \verb+<key>+ is same as that of \verb+\bibitem+. Prepend a * in front of a key to merge the reference with the previous one in the bibliography.\\ \verb+\cite{*[{<prepended>}][{<appended>}]{<keys>}+ & Prepend and/or append text to a bibliography entry. Note use of curly braces within the square brackets.\\ @@ -197,7 +198,7 @@ % \multicolumn{2}{c}{\textsc{Some} AMS-\LaTeX\ \textsc{Commands}\rule[-6pt]{0pt}{18pt}}\\* \verb+\begin{split}+ & Split equations with alignment.\\ -\verb+\begin{multiline}+ & Split equations without alignment.\\ +\verb+\begin{multline}+ & Split equations without alignment.\\ \verb+\begin{align}+ & Equation groups with alignment.\\ \verb+\begin{gather}+ & Equation groups without alignment.\\ \verb+\begin{subequations}+ & Create an equation array in which each only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/auguide/auguide4-1.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/auguide/auguide4-1.tex @@ -1,9 +1,9 @@ %% ****** Start of file authguide.tex ****** % %% %% This file is part of the APS files in the REVTeX 4 distribution. -%% Version 4.1 of REVTeX, October, 2009 +%% Version 4.1r of REVTeX, August 2010 %% -%% Copyright (c) 2009 The American Physical Society. +%% Copyright (c) 2009, 2010 The American Physical Society. %% %% See the REVTeX 4.1 README file for restrictions and more information. %% @@ -30,7 +30,7 @@ \author{American Physical Society}% \email{revtex@aps.org} \affiliation{1 Research Road, Ridge, NY 11961} -\date{October 2009}% +\date{August 2010}% \maketitle \tableofcontents \clearpage @@ -69,16 +69,16 @@ \item \textbf{Structured Abstracts.} Use of the \texttt{description} environment in abstracts now provides for ``structured" abstracts. \item \textbf{Figures referring to videos now supported.} A ``figure" may now be labeled as a \textbf{Video} by using the \texttt{video} environment. A frame from the video may be included in the figure and a URL to link the caption's label to the online video also may be included. There is also a \cmd\listofvideos\ command. \item \textbf{Better support for arXiv.org in Bib\TeX\ } Three more Bib\TeX\ fields have been added: \texttt{SLACcitation}, \texttt{archivePrefix}, and \texttt{primaryClass} in addition to the existing field \texttt{eprint}. -\item \textbf{Improved Bib\TeX\ \texttt{bst} files.} In addition to the new features above, numerous other improvements to the APS \texttt{bst} files have been made, including support for displaying journal article titles and many fixes for \textit{Reviews of Modern Physics}. Also, long author lists are no longer automatically truncated. +\item \textbf{Improved Bib\TeX\ \texttt{bst} files.} In addition to the new features above, numerous other improvements to the APS \texttt{bst} files have been made, including support for displaying journal article titles (using the new \texttt{longbibliography} option) and many fixes for \textit{Reviews of Modern Physics}. Also, long author lists are no longer automatically truncated. \item \textbf{\cmd\footnote\ in \cmd\widetext\ and \texttt{table*} environments improved.} \cmd\footnote\relax s in the \cmd\widetext\ or \texttt{table*} environments are now correctly placed and formatted. \item \textbf{Email addresses no longer print twice on papers less than one page long.} \item \textbf{\texttt{eqnarray} alignment improved.} \item \textbf{\cmd\collaboration\ can be used with the \texttt{groupedaddress} option now.} \item \textbf{\texttt{letterpaper} now ensured as default paper size.} \item \textbf{Table of Contents formatting improved.} -\item \textbf{Support for \texttt{longtable} package improved.} +\item \textbf{Support for the \texttt{longtable} package improved.} \item \textbf{\texttt{reftest} restored.} -\item \textbf{Compatibility with the \texttt{geometry, lineno,} and \texttt{colortbl} packages improved.} For line numbering, rather than using \texttt{lineno.sty} directly, the \texttt{linenumbers} class option should be used (this will call in \texttt{lineno.sty} with a proper set of default parameters). +\item \textbf{Compatibility with the \texttt{geometry, lineno, lscape} and \texttt{colortbl} packages improved.} For line numbering, rather than using \texttt{lineno.sty} directly, the \texttt{linenumbers} class option should be used (this will call in \texttt{lineno.sty} with a proper set of default parameters). \item \texttt{hyperref} \textbf{fixes}. Improvements were to make footnotes work better with the \texttt{hyperref} package. In particular, table footnotes were fixed. More anchors for \texttt{hyperref} were also added (titlepage, abstract, and acknowledgements). \item \textbf{Documents can have more than 256 \cmd\cite\ commands now.} \item \textbf{\cmd\listoffigures\ and \cmd\listoftables\ fixed.} @@ -303,6 +303,8 @@ \item[\textbf{lineno}] \revtex~4.1 improves compatibility with \classname{lineno.sty}. This package should only be loaded via the new \classoption{linenumbers} class option. See Section~\ref{sec:lineno} for more information. +\item[\textbf{lscape}] \revtex~4.1 improves compatibility with \classname{lscape.sty}. + \item[\textbf{geometry}] \revtex~4.1 improves compatibility with \classname{geometry.sty}. \item[\textbf{colortbl}] \revtex~4.1 improves compatibility with \classname{colortbl.sty}. @@ -498,7 +500,7 @@ \subsubsection{Footnotes for authors, collaborations, affiliations or title}\label{sec:footau} Often one wants to specify additional information associated with an -author, collaboration, or affiliation such an e-mail address, an +author, collaboration, or affiliation such as an e-mail address, an alternate affiliation, or some other ancillary information. \revtex~4.1 introduces several new macros just for this purpose. They are: @@ -509,8 +511,7 @@ \item\cmd\thanks\aarg{miscellaneous text} \end{itemize} In the first three, the \emph{optional text} will be prepended before the -actual information specified in the required argument. \cmd\email\ and -\cmd\homepage\ each have a default text for their optional arguments +actual information specified in the required argument. In the APS journal style files, \cmd\email\ and \cmd\homepage\ no longer have a default value. However, in the AIP styles, each have a default text for their optional arguments (`Electronic address:' and `URL:' respectively). The \cmd\thanks\ macro should only be used if one of the other three do not apply. Any author name can have multiple occurences of these four macros. Note @@ -657,9 +658,8 @@ \subsection{Institutional report numbers} Institutional report numbers can be specified using the \cmd\preprint\ -macro. These will be displayed in the upper lefthand corner of the -first page. Multiple \cmd\preprint\ macros maybe supplied (space is -limited though, so only three or less may actually fit). +macro. If the \classoption{preprintnumbers} class option is specified, these will be displayed in the upper right corner of the first page. Multiple \cmd\preprint\ macros maybe supplied (space is +limited though, so only three or less may actually fit). Please note that the \classoption{preprint} class option does not automatically invoke \classoption{preprintnumbers}. \subsection{maketitle} After specifying the title, authors, affiliations, abstract, PACS @@ -1102,11 +1102,17 @@ \section{Footnotes} \LaTeX's standard \cmd\footnote\ command is available in \revtex~4.1. The footnote text can either appear at the bottom of a page or -as part of the bibliography (in order, after the rest of the -references). This choice can be controlled by two class options: +as part of the bibliography. This choice can be controlled by two class options: \classoption{footinbib} and \classoption{nofootinbib}. \revtex~4.1 defaults to the former. Specific journal options may select a -different value than the default. Note that in the latter case, the +different value than the default. + +Please note that even if Bib\TeX\ is not being used for the references, you +may have to run Bib\TeX\ if you are using footnotes without the \classoption{nofootinbib} option. +The log file will contain errors about missing references such as \texttt{Note1} in this case and a file ending in +\texttt{Notes.bib} will have been produced during the processing of the \TeX\ file. + +Note that in the latter case, the argument of the \cmd\footnote\ command is a moving argument in the sense of the \LUG, Appendix~C.1.3: any fragile command within that argument must be @@ -1136,12 +1142,12 @@ Proper formatting of references requires Patrick Daly's \classname{natbib} citation package. \BibTeX\ style files for APS and AIP journals are created using his \classname{custom-bib} tool kit. From an author's point of view, all this means is that a proper -\revtex~4.1 installation requires having \classname{natbib} (version 8.3 +\revtex~4.1 installation requires having \classname{natbib} (version 8.31a or higher) installed. It also means that the full set of \classname{natbib} functionality is available from within \revtex~4.1 (but see the \textit{APS Author Guide for \revtex~4.1} and \textit{Author's Guide to AIP Substyles for \revtex~4.1} for restrictions if submitting to an APS or AIP journal). The \classname{natbib} documentation contains many examples; see in -particular the \verb+natnotes.tex+ file for a convenient summary. +particular the \verb+natnotes.tex+ file for a convenient summary. Please also note that \classname{natbib 8.3} and later now gives an error (rather than merely a warning as in earlier versions) if you try to use a Bib\TeX\ file that isn't compatible with author-year style citations with a journal style that requires author-year citations (such as \textit{Reviews of Modern Physics}). \subsection{Citing a reference} As in standard \LaTeX, references are cited in text using the @@ -1340,9 +1346,9 @@ in }] [{ in the context of carbon nanotube p-n junctions. The only difference is that no integration over ky is present -there.}]andreev2007] +there.}] andreev2007} \end{verbatim} -Please note the use of curly braces to enclose the text within the square brackets. +Please note the use of curly braces to enclose the text within the square brackets as well as the spaces next to the brackets. \section{Figures and Artwork}\label{sec:figures} \subsection{\texttt{figure} environment} @@ -1709,6 +1715,7 @@ guidelines in the \textit{APS Author Guide for \revtex~4.1} when submitting. Similarly, AIP authors should refer to the \textit{Author's Guide to AIP Substyles for \revtex~4.1} + \begin{thebibliography}{}\label{sec:TeXbooks} \bibitem[Knuth(1986)]{TeXbook} D.E. Knuth, \emph{The \TeX book}, (Addison-Wesley, Reading, MA, 1986). only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/aps/apsguide4-1.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/aps/apsguide4-1.tex @@ -1,9 +1,9 @@ %% ****** Start of file apsguide4-1.tex ****** % %% %% This file is part of the APS files in the REVTeX 4.1 distribution. -%% Version 4.1 of REVTeX, October, 2009. +%% Version 4.1r of REVTeX, August 2010. %% -%% Copyright (c) 2009 The American Physical Society. +%% Copyright (c) 2009, 2010 The American Physical Society. %% %% See the REVTeX 4.1 README file for restrictions and more information. %% @@ -23,7 +23,7 @@ \author{The American Physical Society}% \email[REVTeX Support: ]{revtex@aps.org} \affiliation{1 Research Road, Ridge, NY 11961} -\date{October 9, 2009}% +\date{August 10, 2010}% \maketitle \tableofcontents @@ -58,22 +58,13 @@ in length or appearance after it goes through our production process. This is mostly due to the choice of fonts and the scaling of figures. -All manuscripts that are submitted to APS must format correctly under -the \classoption{preprint} class option. \revtex\ 4.1 is designed to +\revtex\ 4.1 is designed to make it straightforward to switch between two-column and single-column formatting just by changing the class option. Authors may submit with -either the \classoption{reprint} or the \classoption{twocolumn} class options, but this will be changed to -the \classoption{preprint} class option upon submission. It is -imperative that authors check that their papers will format properly -when this change is made. Papers which do not format correctly under the -\classoption{preprint} option may be delayed in the review and/or production processes. - +either the \classoption{reprint} or the \classoption{twocolumn} class options. The \classoption{preprint} primarily does three things: It increases the font size to 12pt, increases the line spacing, and changes the -formatting to single column. The changes in font size and spacing can -cause problems. In particular, equations and tables may need to be -re-formatted. Please see Section \ref{sec:tables} for details in -fixing table problems. +formatting to single column. \subsection{Paper size} Manuscripts should be submitted to APS formatted for letter size @@ -121,29 +112,50 @@ \subsection{Abstract} The abstract must be specified using the \env{abstract} environment. Note that in \revtex\ 4.1, the abstract must come before -the \m{maketitle} command. +the \m{maketitle} command. \revtex\ 4.1 now allows the the use of the \env{description} +environment within the abstract to provide \textit{structured abstracts}. For instance, \textit{Physical Review C} would like authors to provide abstracts with sections summarizing the paper's \textbf{Background}, \textbf{Purpose}, \textbf{Method}, \textbf{Results}, and \textbf{Conclusions}. This can be accomplished in the following manner: +\begin{verbatim} +\begin{abstract} +\begin{description} +\item[Background] This part would describe the +context needed to understand what the paper +is about. +\item[Purpose] This part would state the purpose +of the present paper. +\item[Method] This part describe the methods +used in the paper. +\item[Results] This part would summarize the +results. +\item[Conclusions] This part would state the +conclusions of the paper. +\end{description} +\end{abstract} +\end{verbatim} + \subsection{PACS codes} If supplying suggested PACS codes, they must be supplied as a comma-separated list using a single \m{pacs} macro. \section{References and footnotes} -\revtex\ 4.1 comes with four Bib\TeX\ style files for formatting -references, two for the \textit{Physical Review} journals and two -for \textit{Review of Modern Physics}. Authors are strongly encouraged +Authors are strongly encouraged to use Bib\TeX\ when preparing their bibliographies. If Bib\TeX\ is used, current production processes require that the \texttt{.bbl} file be included directly into the -manuscript's main \texttt{.tex} file. The following apply whether -Bib\TeX\ is used or not. +manuscript's main \texttt{.tex} file. \revtex\ 4.1 comes with two Bib\TeX\ style files for formatting +references, one for the \textit{Physical Review} journals and one +for \textit{Review of Modern Physics}. The Bib\TeX\ styles support the optional display of journal article titles in the bibliography. To display the titles, use the \texttt{longbibliography} class option. + +The following apply whether +Bib\TeX\ is used or not. \begin{itemize} \item Authors should use the \m{cite} and \m{bibitem} commands to create bibliographies and to refer to items in the bibliography. ``By hand" numbering of references should be avoided. \item \revtex~4.1 provides new syntax for combining multiple citations into a single entry in the bibliography and for putting extra text before and after a reference. Please refer to \textit{\revtex~4.1 Author's Guide} included with the \revtex~4.1 distribution for full details. \item Footnotes must be specified using the \m{footnote} -macro. \revtex\ 4.1 will automatically place the footnotes at the end of -the bibliography by default for the Physical Review -journals. Footnotes giving additional information about authors (such +macro. \revtex\ 4.1 will place the footnotes in +the bibliography for the \textit{Physical Review} +journals. Please note that even if you don't use Bib\TeX, you may have to run Bib\TeX\ to get the footnotes to appear. Footnotes giving additional information about authors (such as e-mail addresses) must not be specified using the \m{footnote} macro (see Section~\ref{sec:authors}). \item Avoid custom footnotes using \m{footnotemark} and \m{footnotetext} [except in the context of tables (see @@ -325,15 +337,7 @@ The standard \LaTeXe\ table formatting environments are supported as is the use of the \texttt{longtable} package. Tables may be reformatted during production to meet APS style guidelines. -\subsection{Single column formatting} -Because \classoption{preprint} formatting is used during the editorial and -production processes, authors must ensure that their tables format -correctly under the \classoption{preprint} option. Tables are -particularly sensitive to this change because the font size and line -spacing increase -making tables wider and longer. This means some tables may no longer -fit upon the page. It is the author's responsibility to fix this -before submitting the manuscript. Here are some helpful hints: +Here are some helpful hints for trying to get tables formatted correctly: \begin{itemize} \item Use the \texttt{longtable} package to get tables to break across pages. @@ -373,8 +377,7 @@ When typesetting using \classoption{twocolumn}, tables can either span a single column or both columns. Using the '\verb+*+'-ed version of the \env{table} or \env{longtable} environments produces wide tables -that span the columns. For submissions to APS, authors should ensure that that their tables format -correctly under the \classoption{preprint} option. +that span the columns. Tables that are very wide and that may be better typeset in a landscape orientation (rotated 90 degrees) should be enclosed in a only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/aip/docs.sty +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/aip/docs.sty @@ -1,129 +1,129 @@ -% authguide.rty - macros for processing revguide.tex under \documentclass{revtex4} -% Text entities -\DeclareRobustCommand\SNG{\emph{Physical Review Style and Notation Guide}} -\DeclareRobustCommand\LUG{\emph{\LaTeX{} User's Guide \& Reference Manual}} -\DeclareRobustCommand\revtex{REV\TeX} -\DeclareRobustCommand\marglat{\marginpar[\textbf{2e}]{\textbf{2e}}} -\DeclareRobustCommand\margrev{\marginpar[\textbf{4}]{\textbf{4}}} -\DeclareRobustCommand\AmS{% - {\protect\the\textfont\tw@ A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}% -}% -\DeclareRobustCommand\AmSLaTeX{\AmS-\LaTeX} -\DeclareRobustCommand\BibTeX{{\rm B}{\sc ib}\TeX} -% -% Various forms of self-indexing commands: -% \begin{macrocode} -\DeclareRobustCommand{\m}[1]{% - \meta{#1}% - \index{#1=\string\meta{#1} placeholder}\index{placeholder>#1=\string\meta{#1}}% -}% -\DeclareRobustCommand\meta[1]{% - \mbox{\m@th\LANGLE\itshape#1\/\RANGLE}% -}% -\def\LANGLE{$\langle$}% -\def\RANGLE{$\rangle$}% -\DeclareRobustCommand{\marg}[1]{% - {\ttfamily\string{}\meta{#1}{\ttfamily\string}}% - \index{#1=\string\ttt{#1}, argument}\index{argument>#1=\string\ttt{#1}}% -}% -\DeclareRobustCommand{\aarg}[1]{% - {\ttfamily\string{}#1{\ttfamily\string}}% -}% -\let\oarg\undefined -\DeclareRobustCommand{\oarg}[1]{% - {\ttfamily[%] - }\meta{#1}{\ttfamily%[ - ]}% - \index{#1=\string\ttt{#1}, optional argument}% - \index{argument, optional>#1=\string\ttt{#1}}% -}% -\DeclareRobustCommand\cmd{\begingroup\makeatletter\@cmd}% -\long\def\@cmd#1{% - \endgroup - \cs{\expandafter\cmd@to@cs\string#1}% - \expandafter\cmd@to@index\string#1\@nil -}% -\def\cmd@to@cs#1#2{\char\number`#2\relax}% -\def\cmd@to@index#1#2\@nil{% - \index{#2=\string\cmd#1#2}%\index{command>#2=\string\cmd#1#2}% -}% -\DeclareRobustCommand\cs[1]{{\ttfamily\char`\\#1}}% -\def\scmd#1{% - \cs{\expandafter\cmd@to@cs\string#1}% - \expandafter\scmd@to@index\string#1\@nil -}% -\def\scmd@to@index#1#2\@nil#3{% - \index{\string$#3=\string\cmd#1#2---#3}% -%\index{command>\string$#3=\string\cmd#1#2---#3}% -}% -\DeclareRobustCommand\env{\name@idx{environment}}% -\DeclareRobustCommand\envb[1]{% - {\ttfamily\string\begin\string{}\env{#1}{\ttfamily\string}}% -}% -\DeclareRobustCommand\enve[1]{{\ttfamily\string\end\string{}\env{#1}{\ttfamily\string}}}% -\DeclareRobustCommand*{\file}[1]{% - {\ttfamily#1}% - \index{#1=\string\ttt{#1}}\index{file>#1=\string\ttt{#1}}% -}% -\DeclareRobustCommand\substyle{\name@idx{document substyle}}% -\DeclareRobustCommand\classoption{\name@idx{document class option}}% -\DeclareRobustCommand\classname{\name@idx{document class}}% -\def\name@idx#1#2{% - {\ttfamily#2}% - \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% -}% -% -% Needed for index: -% -\def\ttt{\texttt}% -\def\pfill{\ }% -\def\efill{\ }% -\let\scan@allowedfalse\relax -%\makeindex -\AtEndDocument{\@input@{\jobname.ind}\null}% -% -% Processing options -% -% -% Layout: override revtex4|aps -\c@secnumdepth2 -\prepdef\@verbatim{\topsep.5\baselineskip}% -\renewenvironment{quotation}{% - \list{}{% - \listparindent 10\p@ - \itemindent\listparindent - \leftmargin10\p@ - \rightmargin\leftmargin - \parsep \z@ \@plus\p@ - \small - }% - \item[]% -}{% - \endlist -}% -\renewenvironment{quote}{% - \list{}{% - \leftmargin\z@ - \rightmargin\leftmargin - }\item[]% -}{% - \endlist -}% -\leftmargini\parindent -\def\descriptionlabel#1{% - \hspace\labelsep\ignorespaces - #1\unskip -}% -\def\toprule{\hline\hline\frstrut}% -\def\colrule{\hline\frstrut}% -\def\frstrut{\vrule height2.5ex width\z@ depth\z@\relax}% -\def\lrstrut{\vrule height\z@ width\z@ depth.5ex\relax}% -% -% Klootches -% -\let\savenofiles\nofiles -% -% Patches: -% -% -\endinput +% authguide.rty - macros for processing revguide.tex under \documentclass{revtex4} +% Text entities +\DeclareRobustCommand\SNG{\emph{Physical Review Style and Notation Guide}} +\DeclareRobustCommand\LUG{\emph{\LaTeX{} User's Guide \& Reference Manual}} +\DeclareRobustCommand\revtex{REV\TeX} +\DeclareRobustCommand\marglat{\marginpar[\textbf{2e}]{\textbf{2e}}} +\DeclareRobustCommand\margrev{\marginpar[\textbf{4}]{\textbf{4}}} +\DeclareRobustCommand\AmS{% + {\protect\the\textfont\tw@ A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}% +}% +\DeclareRobustCommand\AmSLaTeX{\AmS-\LaTeX} +\DeclareRobustCommand\BibTeX{{\rm B}{\sc ib}\TeX} +% +% Various forms of self-indexing commands: +% \begin{macrocode} +\DeclareRobustCommand{\m}[1]{% + \meta{#1}% + \index{#1=\string\meta{#1} placeholder}\index{placeholder>#1=\string\meta{#1}}% +}% +\DeclareRobustCommand\meta[1]{% + \mbox{\m@th\LANGLE\itshape#1\/\RANGLE}% +}% +\def\LANGLE{$\langle$}% +\def\RANGLE{$\rangle$}% +\DeclareRobustCommand{\marg}[1]{% + {\ttfamily\string{}\meta{#1}{\ttfamily\string}}% + \index{#1=\string\ttt{#1}, argument}\index{argument>#1=\string\ttt{#1}}% +}% +\DeclareRobustCommand{\aarg}[1]{% + {\ttfamily\string{}#1{\ttfamily\string}}% +}% +\let\oarg\undefined +\DeclareRobustCommand{\oarg}[1]{% + {\ttfamily[%] + }\meta{#1}{\ttfamily%[ + ]}% + \index{#1=\string\ttt{#1}, optional argument}% + \index{argument, optional>#1=\string\ttt{#1}}% +}% +\DeclareRobustCommand\cmd{\begingroup\makeatletter\@cmd}% +\long\def\@cmd#1{% + \endgroup + \cs{\expandafter\cmd@to@cs\string#1}% + \expandafter\cmd@to@index\string#1\@nil +}% +\def\cmd@to@cs#1#2{\char\number`#2\relax}% +\def\cmd@to@index#1#2\@nil{% + \index{#2=\string\cmd#1#2}%\index{command>#2=\string\cmd#1#2}% +}% +\DeclareRobustCommand\cs[1]{{\ttfamily\char`\\#1}}% +\def\scmd#1{% + \cs{\expandafter\cmd@to@cs\string#1}% + \expandafter\scmd@to@index\string#1\@nil +}% +\def\scmd@to@index#1#2\@nil#3{% + \index{\string$#3=\string\cmd#1#2---#3}% +%\index{command>\string$#3=\string\cmd#1#2---#3}% +}% +\DeclareRobustCommand\env{\name@idx{environment}}% +\DeclareRobustCommand\envb[1]{% + {\ttfamily\string\begin\string{}\env{#1}{\ttfamily\string}}% +}% +\DeclareRobustCommand\enve[1]{{\ttfamily\string\end\string{}\env{#1}{\ttfamily\string}}}% +\DeclareRobustCommand*{\file}[1]{% + {\ttfamily#1}% + \index{#1=\string\ttt{#1}}\index{file>#1=\string\ttt{#1}}% +}% +\DeclareRobustCommand\substyle{\name@idx{document substyle}}% +\DeclareRobustCommand\classoption{\name@idx{document class option}}% +\DeclareRobustCommand\classname{\name@idx{document class}}% +\def\name@idx#1#2{% + {\ttfamily#2}% + \index{#2\space#1=\string\ttt{#2}\space#1}\index{#1>#2=\string\ttt{#2}}% +}% +% +% Needed for index: +% +\def\ttt{\texttt}% +\def\pfill{\ }% +\def\efill{\ }% +\let\scan@allowedfalse\relax +%\makeindex +\AtEndDocument{\@input@{\jobname.ind}\null}% +% +% Processing options +% +% +% Layout: override revtex4|aps +\c@secnumdepth2 +\prepdef\@verbatim{\topsep.5\baselineskip}% +\renewenvironment{quotation}{% + \list{}{% + \listparindent 10\p@ + \itemindent\listparindent + \leftmargin10\p@ + \rightmargin\leftmargin + \parsep \z@ \@plus\p@ + \small + }% + \item[]% +}{% + \endlist +}% +\renewenvironment{quote}{% + \list{}{% + \leftmargin\z@ + \rightmargin\leftmargin + }\item[]% +}{% + \endlist +}% +\leftmargini\parindent +\def\descriptionlabel#1{% + \hspace\labelsep\ignorespaces + #1\unskip +}% +\def\toprule{\hline\hline\frstrut}% +\def\colrule{\hline\frstrut}% +\def\frstrut{\vrule height2.5ex width\z@ depth\z@\relax}% +\def\lrstrut{\vrule height\z@ width\z@ depth.5ex\relax}% +% +% Klootches +% +\let\savenofiles\nofiles +% +% Patches: +% +% +\endinput only in patch2: unchanged: --- texlive-extra-2009.orig/texmf-dist/doc/latex/revtex/aip/aipguide4-1.tex +++ texlive-extra-2009/texmf-dist/doc/latex/revtex/aip/aipguide4-1.tex @@ -1,9 +1,9 @@ %% ****** Start of file auguide.tex ****** % %% %% This file is part of the AIP distribution of substyles for REVTeX 4.1 -%% For version 4.1 of REVTeX, October, 2009 +%% For version 4.1r of REVTeX, August 2010 %% -%% Copyright (c) 2009 American Institute of Physics +%% Copyright (c) 2009,2010 American Institute of Physics %% \listfiles \documentclass[% @@ -35,8 +35,8 @@ \email{tex@aip.org} \affiliation{American Institute of Physics\\Suite 1NO1, 2 Huntington Quadrangle\\Melville, New York 11747-4502, USA}% -\date{October 2009}% -\revised{\today}% +\date{March 2010}% +\revised{August 2010}% \maketitle