diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/revtex/revtex4-1.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/revtex/revtex4-1.cls | 1030 |
1 files changed, 663 insertions, 367 deletions
diff --git a/Master/texmf-dist/tex/latex/revtex/revtex4-1.cls b/Master/texmf-dist/tex/latex/revtex/revtex4-1.cls index a463a6c5619..84c0d941c2d 100644 --- a/Master/texmf-dist/tex/latex/revtex/revtex4-1.cls +++ b/Master/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/02/25/18:00:00 4.1p (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/02/25/18:00:00 4.1p 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:<a href="#1">}}% - \def\@@endlink{\special{html:</a>}}% + \def\@@startlink@hypertext#1{\leavevmode\special{html:<a href="#1">}}% + \def\@@endlink@hypertext{\special{html:</a>}}% }{% - \def\@@startlink#1{% + \def\@@startlink@hypertext#1{% \leavevmode \pdfstartlink\pdfstartlink@attr user{/Subtype/Link/A<</Type/Action/S/URI/URI(#1)>>}% \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/02/25/18:00:00 4.1p 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/02/25/18:00:00 4.1p 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 +\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}}{}% }% \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.1p", +%%% date = "2010/02/25", +%%% time = "18:00: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{% @@ -6650,8 +6906,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 +6923,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,36 +6972,55 @@ \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\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]{% \NAT@thebibliography{#1}% \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 +7028,7 @@ \normalfont \Hy@raisedlink{\hyper@anchorstart{frontmatter.#1}\hyper@anchorend}% \begingroup - \c@footnote#1\relax + \csname c@\@mpfn\endcsname#1\relax \frontmatter@thefootnote \endgroup }% @@ -6797,8 +7089,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 +7114,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 +7133,24 @@ \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 + \@bibdataout@rev }% -\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 +7178,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 +7193,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 +7213,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 +7223,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 +7245,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 +7318,6 @@ \onecolumngrid \begingroup \let\@footnotetext\frontmatter@footnotetext - \let\set@footnotewidth\set@footnotewidth@ii \ltx@no@footnote #1% \endgroup @@ -7024,30 +7332,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 +7363,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 +7546,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'. |