summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/revtex/ltxfront.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-18 23:53:14 +0000
committerKarl Berry <karl@freefriends.org>2010-03-18 23:53:14 +0000
commitaeb40e4eddc0e83dfd8f55c18ffd3b94540c0f47 (patch)
treeae4269d5a89406c04493af63b04c8fabc71fb754 /Master/texmf-dist/source/latex/revtex/ltxfront.dtx
parent481fc83998309f749f51e74a5e711829a5a3c80b (diff)
revtex 4.1p (17mar10)
git-svn-id: svn://tug.org/texlive/trunk@17498 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/revtex/ltxfront.dtx')
-rw-r--r--Master/texmf-dist/source/latex/revtex/ltxfront.dtx530
1 files changed, 348 insertions, 182 deletions
diff --git a/Master/texmf-dist/source/latex/revtex/ltxfront.dtx b/Master/texmf-dist/source/latex/revtex/ltxfront.dtx
index b9432481136..1a519133be4 100644
--- a/Master/texmf-dist/source/latex/revtex/ltxfront.dtx
+++ b/Master/texmf-dist/source/latex/revtex/ltxfront.dtx
@@ -108,15 +108,15 @@ License
%</ignore>
% \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.1p",
+%%% date = "2010/02/25",
+%%% time = "18:00:00 UT-8",
%%% checksum = "2012",
%%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
%%% commissioned by the American Physical Society.
@@ -145,7 +145,7 @@ License
% 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 @@ License
% An appropriate message is displayed if
% a different \TeX{} format is used.
% \begin{macrocode}
-%<*driver|package>
+%<*doc|package>
\NeedsTeXFormat{LaTeX2e}[1995/12/01]%
-%</driver|package>
+%</doc|package>
% \end{macrocode}
% As desired, the following modules all
% take common version information:
% \begin{macrocode}
-%<package>\ProvidesFile{ltxfront.sty}%
-%<*driver>
-\expandafter\ProvidesFile\expandafter{\jobname.dtx}%
-%</driver>
+%<kernel&!package&!doc>\typeout{%
+%<*package|doc>
+\ProvidesFile{%
+%</package|doc>
+%<*kernel|package|doc>
+ltxfront%
+%</kernel|package|doc>
+%<*doc>
+.dtx%
+%</doc>
+%<package>.sty%
+%<*package|doc>
+}%
+%</package|doc>
% \end{macrocode}
%
% The following line contains, for once and for all,
@@ -207,30 +217,32 @@ License
% consistently in all generated files and in the
% typeset documentation.
% \begin{macrocode}
-%<*driver|package>
- [2009/10/09 4.1h frontmatter package]% \fileversion
-%</driver|package>
+%<*doc|package|kernel>
+%<version>
+ [2010/02/25/18:00:00 4.1p frontmatter package (AO,DPC)]% \fileversion
+%</doc|package|kernel>
+%<kernel&!package&!doc>}%
% \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 @@ now put a \cmd\usepackage\texttt{\{ltxfront\}} in your document preamble!
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \end{macrocode}
%
% \begin{macrocode}
-%</driver>
+%</doc>
% \end{macrocode}
%
% \section{Using this package}
@@ -615,7 +640,7 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
Title page macros for \protect\LaTeXe,
by A. Ogawa (arthur_ogawa at sbcglobal.net)%
}%
-%</package>
-% \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)%
-}%
-%</kernel>
% \end{macrocode}
%
% \subsection{Prerequisites}%
%
% This package requires the use of the \classname{ltxutil} package.
% \begin{macrocode}
-%<*package>
\let\class@name\package@name
\RequirePackage{ltxutil}%
%</package>
@@ -863,6 +876,10 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
}{}\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\@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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
}%
}%
}%
- \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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}
+% 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}
-% Next, append the current affiliation group to \cmd\@AFG@list,
+% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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{<affiliation ID>}{<collaboration ID>}{<address>}{<auxiliary info>} \frontmatter@author@produce@script \affils@present@group
%\@AFG@list \AFG@opr{{<affiliation ID>}..{<affiliation ID>}} \frontmatter@author@produce@group
@@ -1679,7 +1766,7 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% (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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\@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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\begingroup
\frontmatter@collaboration@above
\@affilID@def{}%
+ \@tempcnta\z@
\@author@present{}{(\ignorespaces#3\unskip)}{#4}%
\par
\endgroup
@@ -2699,8 +2805,8 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
}%
}%
}%
-\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% pathological cases.
% \begin{macrocode}
\begingroup
- \frontmatterverbose@sw{\say\@AAC@list}{}%
\def\AF@temp{#1}%
\@tempcnta\z@
\let\AU@opr \@undefined
@@ -2968,9 +3107,11 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
}{%
\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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
}{%
\let\AU@opr \@author@gobble
}%
- \let\CO@opr \@collaboration@err
+ \let\CO@opr \@collaboration@gobble
}%
% \end{macrocode}
% \end{macro}
@@ -3089,17 +3230,25 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\@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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
% \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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
%
% 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 @@ We reproduce most features of \LaTeX\ manual, Figure C.4, p. 183.
\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}