Debian Codegraph @

texmf-dist/source/latex/preprint/authblk.dtx

raw
1 % \iffalse THIS IS A META-COMMENT
2 %<*dtx>
3 \ProvidesFile
4 %========================================================================
5 {AUTHBLK.DTX}
6 %========================================================================
7 %</dtx>
8 %% Copyright 1997-1999 Patrick W Daly
9 %% Max-Planck-Institut f\"ur Aeronomie
10 %% Max-Planck-Str. 2
11 %% D-37191 Katlenburg-Lindau
12 %% Germany
13 %% E-mail: [email protected]
14 %
15 % This program can be redistributed and/or modified under the terms
16 % of the LaTeX Project Public License Distributed from CTAN
17 % archives in directory macros/latex/base/lppl.txt; either
18 % version 1 of the License, or any later version.
19 %
20 % This is a contributed file to the LaTeX2e system.
21 % -------------------------------------------------
22 % This is a LaTeX package to prepare author/affiliation blocks
23 % Installation:
24 % LaTeX this file: creates docstrip installation file authblk.ins
25 % AND the (LaTeX2e) documentation
26 % (La)TeX authblk.ins: creates package files authblk.sty, and optionally
27 % documentation driver authblk.drv
28 % (authblk.ins may be edited as needed)
29 % Docstrip options available:
30 % package - to produce a .sty file with the uncommented coding
31 % driver - to produce a driver file to print the documentation
32 % 209 - (with package) for package that runs under LaTeX 2.09
33 % subpack - (with package) for coding included in other packages
34 % LaTeX the unstripped version to obtain the documentation
35 % (Documentation can be produced with LaTeX2e only)
36 %--------------------------------------------------------------------------
37 %<*!subpack>
38 %<package&209>\def\ProvidesPackage#1#2]
39 %<package&209> {\typeout{Style option `#1'#2]}}
40 %
41 % *** Identify the package file:-
42 %<package&!209>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
43 %<package>\ProvidesPackage{authblk}
44 %</!subpack>
45 %
46 % *** Provide command to dislay module version
47 %<package&subpack>\def\ModuleVersion#1[#2]{}
48 %<package&subpack> \ModuleVersion{authblk}
49 %
50 % *** Identify the driver file:-
51 %<driver>\NeedsTeXFormat{LaTeX2e}
52 %<driver>\ProvidesFile{authblk.drv}
53 %
54 % *** The DATE, VERSION, and other INFO
55 %\fi
56 %\ProvidesFile{authblk}
57 [2001/02/27 1.3 (PWD)]
58 %\iffalse
59 %<*package>
60 %<*!subpack>
61 %-------------------------------------------------------------------
62 % NOTICE:
63 % This file may be used for non-profit purposes.
64 % It may not be distributed in exchange for money,
65 % other than distribution costs.
66 %
67 % The author provides it `as is' and does not guarantee it in any way.
68 %
69 %</!subpack>
70 %</package>
71 %% authblk coding copyright (C) 1997 Patrick W. Daly
72 %<*package>
73 %<*!subpack>
74 % Max-Planck-Institut f\"ur Aeronomie
75 % Max-Planck-Str. 2
76 % D-37191 Katlenburg-Lindau
77 % Germany
78 %
79 % E-mail: [email protected]
80 %-----------------------------------------------------------
81 %</!subpack>
82 %</package>
83 % END META-COMMENT \fi
84 % \changes{1.0}{1997 Apr 22}{First version}
85 % \changes{1.1}{1997 Aug 28}{Allow standard \cs{author} to come before package
86 % loaded}
87 % \changes{1.1a}{1998 Jul 14}{A 2.09 fixup}
88 % \changes{1.2}{1999 Feb 23}{Update copyright notice}
89 % \changes{1.3}{2001 Feb 27}{Make stand-alone by changing \cs{maketitle} to center}
90 %
91 % \CheckSum{404}
92 % \CharacterTable
93 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
94 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
95 % Digits \0\1\2\3\4\5\6\7\8\9
96 % Exclamation \! Double quote \" Hash (number) \#
97 % Dollar \$ Percent \% Ampersand \&
98 % Acute accent \' Left paren \( Right paren \)
99 % Asterisk \* Plus \+ Comma \,
100 % Minus \- Point \. Solidus \/
101 % Colon \: Semicolon \; Less than \<
102 % Equals \= Greater than \> Question mark \?
103 % Commercial at \@ Left bracket \[ Backslash \\
104 % Right bracket \] Circumflex \^ Underscore \_
105 % Grave accent \` Left brace \{ Vertical bar \|
106 % Right brace \} Tilde \~}
107 %
108 % \iffalse
109 %<*install>
110 %^^A =============================================
111 %^^A Here is the docstrip installation file
112 %^^A It is written on first LaTeX run if it
113 %^^A does not already exist
114 %^^A =============================================
115 \begin{filecontents*}{authblk.ins}
116 % File: authblk.ins
117 % Copyright 1999 Patrick W. Daly
118 %
119 % This file can be redistributed and/or modified under the terms
120 % of the LaTeX Project Public License Distributed from CTAN
121 % archives in directory macros/latex/base/lppl.txt; either
122 % version 1 of the License, or any later version.
123 %
124 % It is an installation file for extracting package and driver
125 % files from the original source file. Simply process it under
126 % TeX or LaTeX.
127
128 \input docstrip
129
130 \preamble
131 =============================================
132 IMPORTANT NOTICE:
133
134 This program can be redistributed and/or modified under the terms
135 of the LaTeX Project Public License Distributed from CTAN
136 archives in directory macros/latex/base/lppl.txt; either
137 version 1 of the License, or any later version.
138
139 This is a generated file.
140 It may not be distributed without the original source file \inFileName.
141
142 Full documentation can be obtained by LaTeXing that original file.
143 Only a few abbreviated comments remain here to describe the usage.
144 =============================================
145 \endpreamble
146 \postamble
147
148 <<<<< End of generated file <<<<<<
149 \endpostamble
150
151 \declarepreamble\driver
152 ============================================
153 This is the driver file to produce the LaTeX documentation
154 from the original source file \inFileName.
155
156 Make changes to it as needed. (Never change the file \inFileName!)
157 ============================================
158 \endpreamble
159
160 \declarepostamble\driverq
161
162 End of documentation driver file.
163 \endpostamble
164
165 \keepsilent
166 \askforoverwritefalse
167
168 \generate{\file{authblk.sty}{\from{authblk.dtx}{package}}
169 \file{authblk.drv}{\usepreamble\driver\usepostamble\driverq
170 \from{authblk.dtx}{driver}}
171 }
172
173 \obeyspaces
174 \Msg{******************************************}%
175 \Msg{* For documentation, process authblk.dtx *}%
176 \Msg{* or the driver file authblk.drv *}%
177 \Msg{******************************************}
178
179 \endbatchfile
180 \end{filecontents*}
181 %</install>
182 %<*driver>
183 \documentclass{ltxdoc}
184 %<driver>%\documentclass[twoside]{ltxdoc}
185 %<driver>%\documentclass[a4paper]{ltxdoc}
186 %<driver>%\documentclass[twoside,a4paper]{ltxdoc}
187 \raggedbottom
188
189 %** To include the detailed explanation of the coding, comment out
190 %** the next line
191 \OnlyDescription
192
193 %** To produce a command index: add the following line for one run,
194 %** then run makeindex -s gind.ist authblk
195 %** and reprocess, with or without this line (much faster without)
196 %<driver>% \EnableCrossrefs\CodelineIndex
197
198 %** To produce a change history: add the following line for one run,
199 %** then run makeindex -s gglo.ist -o authblk.gls authblk.glo
200 %** and reprocess, with or without this line (faster without)
201 %<driver>% \RecordChanges
202
203 \DisableCrossrefs %May stay; zapped by \EnableCrossrefs
204 \CodelineNumbered %May stay
205
206 \begin{document}
207 \DocInput{authblk.dtx}
208 \end{document}
209 %</driver>
210 %\fi
211 %
212 % \DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs}
213 % \DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo}
214 % \DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage}
215 % \DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage}
216 % \DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage}
217 % \DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions}
218 % \DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument}
219 % \DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError}
220 % \DoNotIndex{\ClassWarning,\PackageWarning,\ClassWarningNoLine}
221 % \DoNotIndex{\PackageWarningNoLine,\ClassInfo,\PackageInfo,\MessageBreak}
222 % \DoNotIndex{\space,\protect,\DeclareRobustCommand,\CheckCommand}
223 % \DoNotIndex{\newcommand,\renewcommand,\providecommand,\newenvironment}
224 % \DoNotIndex{\renewenvironment,\newif,\newlength,\newcounter,\setlength}
225 % \DoNotIndex{\setcounter,\if,\ifx,\ifcase,\ifnum,\ifdim,\else,\fi}
226 % \DoNotIndex{\texttt,\textbf,\textrm,\textsl,\textsc}
227 % \DoNotIndex{\textup,\textit,\textmd,\textsf,\emph}
228 % \DoNotIndex{\ttfamily,\rmfamily,\sffamily,\mdseries,\bfseries,\upshape}
229 % \DoNotIndex{\slshape,\scshape,\itshape,\em,\LaTeX,\LaTeXe}
230 % \DoNotIndex{\filename,\fileversion,\filedate,\let}
231 % \DoNotIndex{\\,\@empty,\@namedef,\@nameuse,\@tempa,\@temptokena}
232 % \DoNotIndex{\@unexpandable@protect,\addtocounter,\and,\arabic}
233 % \DoNotIndex{\begingroup,\c@authors,\edef,\endgroup,\expandafter}
234 % \DoNotIndex{\ignorespaces,\large,\maxdimen,\noexpand,\normalfont,\number}
235 % \DoNotIndex{\relax,\textsuperscript,\the,\value,\xdef,\z@}
236 % \DoNotIndex{\@ifundefined,\@ifnextchar,\document,\gdef,\global,\rm}
237 % \DoNotIndex{\rlap,\footnote,\thanks}
238 %
239 % \setcounter{IndexColumns}{2}
240 % \setlength{\IndexMin}{10cm}
241 % \setcounter{StandardModuleDepth}{1}
242 %
243 % \GetFileInfo{authblk}
244 %
245 % \title{\bfseries A \LaTeX\ Package to Prepare Author and Affiliation Blocks}
246 %
247 % \author{Patrick W. Daly}
248 %
249 % \date{This paper describes \LaTeXe\ package \texttt{\filename}\\
250 % version \fileversion{} from \filedate\\[1ex]
251 % \textsl{It is part of the \texttt{preprint} collection of packages}
252 % }
253 %
254 % \maketitle
255 %
256 % \pagestyle{myheadings}
257 % \markboth{P. W. Daly}{Author/Affiliation Blocks}
258 %
259 %^^A In order to keep all marginal notes on the one (left) side:
260 %^^A (otherwise they switch sides disasterously with twoside option)
261 % \makeatletter \@mparswitchfalse \makeatother
262 %
263 %\begin{small}\begin{center}\textbf{Summary}\end{center}
264 % The stripped version of this file contains the following brief description:
265 %\iffalse
266 %<*package&!subpack>
267 % Author/Affiliation Blocks
268 %\fi
269 % \begin{verbatim}
270 % A LaTeX2e package to redefine the \author command to work as normal or
271 % to allow a footnote style of author/affiliation input.
272 %
273 % Three methods of input:
274 % 1. Standard LaTeX
275 % \author{Name1\\Affil1 /and Name2 and Name3\\Affil2 . . .}
276 % (use \authorcr, not \\, to force new line within the author text)
277 % 2. Automatic mode (selects modes 1 or 3 depending on number of affiliations)
278 % \author{Name1}
279 % \affil{Affil1}
280 % \author{Name2}
281 % \author{Name3}
282 % \affil{Affil2}
283 % . . .
284 % 3. Footnotes explicitly
285 % \author[*]{Name1}
286 % \author[**]{Name2}
287 % \author[**]{Name3}
288 % \affil[*]{Affil1}
289 % \affil[**]{Affil2}
290 % . . .
291 % \end{verbatim}
292 %\iffalse
293 % See documentation in authblk.dtx for further configuration possibilities.
294 %-----------------------------------------------------------
295 %</package&!subpack>
296 %\fi
297 %\end{small}
298 % \newcommand\brsl{/\discretionary{}{}{}}
299 %
300 % \section{Introduction}
301 % The standard \LaTeX\ syntax for entering author names and their
302 % affiliations is rather limited. The standard is to have \emph{author
303 % blocks} consisting of all authors from one institute grouped together.
304 % However, if there are many institutes, or if the authors are ordered in
305 % some other way (e.g.\ alphabetically) it is more appropriate to use a
306 % footnote system. Both methods should be available for any paper since the
307 % style depends more on the number of authors and affiliations and their
308 % mixture.
309 %
310 % This package offers a syntax for entering author names and their
311 % affiliations that permits both styles, and is also compatible with the
312 % standard \LaTeX\ syntax. It places its results in the control sequence
313 % |\@author|, which is the standard container for the author\brsl{}affiliation
314 % names; in this way it can be used immediately with standard \LaTeX\
315 % classes, or with packages that modify the title\brsl{}author block.
316 %
317 % \section{Invoking the Package}
318 % The macros in this package are included in the main document
319 % with the |\usepackage| command of \LaTeXe,
320 % \begin{quote}
321 % |\documentclass[..]{...}|\\
322 % |\usepackage[|\emph{options}|]{|\texttt{\filename}|}|
323 % \end{quote}
324 % where the possible \emph{options} are described below in Section~\ref{opts}.
325 %
326 % \section{Usage}
327 %
328 % Authors and affiliations can be printed in author blocks, as
329 % \begin{center}
330 % \begin{tabular}[t]{c}
331 % J. B. Smith\\Institute for Research\\Hamilton, Ontario
332 % \end{tabular}\\[1ex]
333 % \begin{tabular}[t]{c}
334 % C. T. Appleton and P. R. Bailey\\NASA, Greenbelt, MD
335 % \end{tabular}
336 % \end{center}
337 % or in a line with footnote markers for the affiliations, as
338 % \begin{center}
339 % J. B. Smith\textsuperscript{1}, C. T. Appleton\textsuperscript{2}, and
340 % P. R. Bailey\textsuperscript{2}\\[1ex]
341 % \textsuperscript{1}Institute for Research, Hamilton, Ontario\\
342 % \textsuperscript{2}NASA, Greenbelt, MD
343 % \end{center}
344 %
345 % \DescribeMacro{\author}
346 % \DescribeMacro{\affil}
347 % The user can enter the author and affiliation information in a number of
348 % different manners.
349 % \begin{enumerate}
350 % \item \label{ab}Standard \LaTeX, with syntax
351 % \begin{quote}
352 % |\author{|\dots|\and|\dots|\and|\dots|}|
353 % \end{quote}
354 % where each block of author(s)\brsl{}affiliation comes between the
355 % |\and| commands, containing possibly |\\| for new lines;
356 %
357 % \item \label{abfn} Automatic switching between author block or footnote
358 % style, information input with a series of |\author|, |\affil|
359 % commands as
360 % \begin{quote}
361 % |\author{|\emph{author1}|}|\\
362 % |\author{|\emph{author2}|}|\\
363 % |\affil{|\emph{affil1}|}|\\
364 % |\author{|\emph{author3}|}|\\
365 % |\author{|\emph{author4}|}|\\
366 % |\affil{|\emph{affil2}|}|\\
367 % $\cdots$
368 % \end{quote}
369 % where the authors will appear all in one (possibly continued) line
370 % with automatic footnotes, and the affiliations appear in separate lines
371 % below;
372 %
373 % \item \label{fn}Footnote style with manual footnote markers given as
374 % optional arguments; in this case, the |\author| and |\affil| commands
375 % can be fully separated:
376 % \begin{quote}
377 % |\author[1]{|\emph{author1}|}|\\
378 % |\author[1]{|\emph{author2}|}|\\
379 % |\author[2]{|\emph{author3}|}|\\
380 % |\author[2]{|\emph{author4}|}|\\
381 % |\affil[1]{|\emph{affil1}|}|\\
382 % |\affil[2]{|\emph{affil2}|}|\\
383 % $\cdots$
384 % \end{quote}
385 % \end{enumerate}
386 % Method \ref{ab} can only produce author blocks; method \ref{fn} only
387 % footnotes, while \ref{abfn} can produce both. If the number of affiliations
388 % is greater than \texttt{Maxaffil}, footnotes are used, otherwise author
389 % blocks.
390 %
391 % \DescribeMacro{\authorcr}
392 % With method \ref{ab}, the |\\| command is used to switch to affiliation
393 % text, possibly changing the font; if the author text is to be forced to a
394 % new line, use |\authorcr| instead.
395 %
396 % \noindent\textbf{Warning:}
397 % methods \ref{abfn} and \ref{fn} can only be used \emph{after}
398 % \texttt{\filename} has been loaded, since |\affil| is otherwise
399 % not defined. However, a single |\author| command (method \ref{ab})
400 % can appear before |\usepackage|, or even before |\documentclass|,
401 % as is allowed in standard \LaTeX.
402 %
403 % \section{Configuration}
404 %
405 % Certain aspects of the author\brsl{}affiliation blocks can be controlled by
406 % the user through redefinitions.
407 %
408 % As already \marginpar{\raggedleft\texttt{Maxaffil}}
409 % mentioned, the maximum number of affiliations before automatically
410 % switching from author block to footnote mode is set in the counter
411 % |Maxaffil|. Redefine this with
412 % \begin{quote}|\setcounter{Maxaffil}{2}|\end{quote}
413 % The default is 2.
414 %
415 % \DescribeMacro{\Authfont}
416 % \DescribeMacro{\Affilfont}
417 % The author and affiliation lines can be set in different fonts, determined
418 % by these macros. By default they are |\normalfont|. Redefine them with
419 % |\renewcommand|, for example:
420 % \begin{quote}\begin{verbatim}
421 % \renewcommand\Authfont{\scshape}
422 % \renewcommand\Affilfont{\itshape\small}
423 % \end{verbatim}
424 % \end{quote}
425 %
426 % \DescribeMacro{\affilsep}
427 % The interline spacing between the author and affiliation lines is set by
428 % the length |\affilsep|. Change this with |\setlength|, as
429 % \begin{quote}|\setlength{\affilsep}{1em}|\end{quote}
430 % This spacing applies to both footnote and author block modes.
431 %
432 % \DescribeMacro{\Authsep}
433 % \DescribeMacro{\Authand}
434 % \DescribeMacro{\Authands}
435 % In footnote mode, one can change the texts that comes between the
436 % authors' names, between two authors, and before the last author when there
437 % are more than two. For example,
438 % \begin{quote}\begin{verbatim}
439 % \renewcommand\Authsep{, }
440 % \renewcommand\Authand{ and }
441 % \renewcommand\Authands{, and }
442 % \end{verbatim}
443 % \end{quote}
444 % This example actually shows the defaults.
445 %
446 % \section{Options during Loading}\label{opts}
447 % Some reconfigurations are provided for by means of options to the
448 % |\usepackage| command. These are:
449 % \begin{description}
450 % \item[\ttfamily blocks]
451 % sets |Maxaffil| to $\infty$ so that the automatic selection will always be
452 % author\brsl{}affiliation blocks;
453 %
454 % \item[\ttfamily noblocks]
455 % sets |Maxaffil| to 0 so that the automatic selection will always be
456 % footnote mode;
457 %
458 % \item[\ttfamily max$n$] ($n=2,6$) sets |Maxaffil| to $n$;
459 %
460 % \item[\ttfamily auth-sc] sets author font to small caps;
461 %
462 % \item[\ttfamily auth-sc-lg] sets author font to small caps, but with size
463 % |\large|;
464 %
465 % \item[\ttfamily auth-lg] sets author font to normal, but in size |\large|;
466 %
467 % \item[\ttfamily affil-sl] sets affiliation font to slanted;
468 %
469 % \item[\ttfamily affil-it] sets affiliation font to italic;
470 %
471 % \item[\ttfamily german] changes `and' to `und' in author lists.
472 % \end{description}
473 %
474 % \StopEventually{\PrintIndex\PrintChanges}
475 %
476 % \section{Options with \texttt{docstrip}}
477 % The source \texttt{.dtx} file is meant to be processed with
478 % \texttt{docstrip}, for which a number of options are available:
479 % \begin{description}
480 % \item[\ttfamily package] to produce a \texttt{.sty} package file with most
481 % comments removed;
482 %
483 % \item[\ttfamily subpack] (together with \texttt{package}) for coding that
484 % is to be included inside a larger package; even more comments are
485 % removed, as well as \LaTeXe{} option handling and identification;
486 %
487 % \item[\ttfamily 209] (together with \texttt{package}) for a style option
488 % file that will run under the older \LaTeX~2.09;
489 %
490 % \item[\ttfamily driver] to produce a driver \texttt{.drv} file that will
491 % print out the documentation under \LaTeXe. The documentation cannot
492 % be printed under \LaTeX~2.09.
493 %
494 % \end{description}
495 % The source file \texttt{\filename.dtx} is itself a driver file and can
496 % be processed directly by \LaTeXe.
497 %
498 % \section{The Coding}
499 % This section presents and explains the actual coding of the macros.
500 % It is nested between |%<*package>| and |%</package>|, which
501 % are indicators to \texttt{docstrip} that this coding belongs to the package
502 % file.
503 %
504 % The \texttt{docstrip} option |<subpack>| should only be called if the
505 % coding is to be included as part of another package, in which case the
506 % announcement text and \LaTeXe{} options are suppressed.
507 %
508 % An alternative version of this coding is provided for running as a
509 % style file under \LaTeX~2.09. Code lines belonging to this are
510 % indicated with guard |<209>|; those for LaTeXe{} only with |<!209>|.
511 %
512 % \begin{macrocode}
513 %<*package>
514 % \end{macrocode}
515 %
516 % \subsection{Basic Idea}
517 %
518 % In the standard \LaTeX\ classes, the authors and their affiliations are
519 % input through the |\author| command, which simply stores the argument in
520 % |\@author|. The text is then output by the |\maketitle| macro within a
521 % |tabular| environment, as
522 % \begin{quote}\begin{verbatim}
523 % \begin{tabular}[t]{c}%
524 % \@author
525 % \end{tabular}
526 % \end{verbatim}
527 % \end{quote}
528 % Different blocks within the |\author| text are separated by the |\and|
529 % command, defined as
530 % \begin{quote}\begin{verbatim}
531 % \def\and{%
532 % \end{tabular}%
533 % \hskip 1em \@plus.17fil%
534 % \begin{tabular}[t]{c}}%
535 % \end{verbatim}
536 % \end{quote}
537 % Clearly, the definition of |\and| must be compatible with the environment
538 % in which |\@author| is output.
539 %
540 % The \texttt{\filename} package provides a new way to enter the author and
541 % affiliation data, but puts the results into |\@author|, which means it can
542 % be used with the standard classes or with any class that has the author
543 % information in |\@author|. Since \texttt{\filename} controls all the font
544 % formatting for author and affiliation lines, |\maketitle| should not do
545 % this.
546 %
547 % \subsection{Configurable Commands}
548 %
549 % All internal commands are designated with |\AB@..| to avoid name conflicts
550 % with other packages. Commands that may be redefined for local configuration
551 % contain no |@| and begin with an uppercase letter, like |\Authfont|.
552 %
553 % The following allow the author and affiliation blocks to be formatted.
554 % These may be changed in the document or in packages that input (include)
555 % \texttt{\filename}.
556 %
557 % \begin{macro}{\Authfont}
558 % \begin{macro}{\Affilfont}
559 % Declarations that are to be issued for the authors and affiliations are
560 % defined here. Redefine these, for example, as
561 % \begin{quote}\begin{verbatim}
562 % \renewcommand\Authfont{\scshape}
563 % \renewcommand\Affilfont{\itshape\small}
564 % \end{verbatim}
565 % \end{quote}
566 % By default, they are the |\normalfont|.
567 % \begin{macrocode}
568 \newcommand\Authfont{\normalfont}
569 \newcommand\Affilfont{\normalfont}
570 %<209>\@ifundefined{normalfont}{\let\normalfont\rm}{}
571 % \end{macrocode}
572 % \end{macro}\end{macro}
573 %
574 % \begin{macro}{\Authsep}
575 % \begin{macro}{\Authand}
576 % \begin{macro}{\Authands}
577 % Three macros determine what comes between author names,
578 % \begin{macrocode}
579 \newcommand\Authsep{, }
580 % \end{macrocode}
581 % what comes between the last and second last names for more than two authors,
582 % \begin{macrocode}
583 \newcommand\Authands{, and }
584 % \end{macrocode}
585 % and for exactly two authors.
586 % \begin{macrocode}
587 \newcommand\Authand{ and }
588 % \end{macrocode}
589 % These could be language dependent.
590 % \end{macro}\end{macro}\end{macro}
591 %
592 % \begin{macro}{\affilsep}
593 % The vertical spacing between an author and affiliation line. The length
594 % |\@affilsep| comes between affiliation lines and switches between
595 % |\affilsep| and 0~pt as needed.
596 % \begin{macrocode}
597 \newlength{\affilsep}\setlength{\affilsep}{1em}
598 \newlength{\@affilsep}
599 % \end{macrocode}
600 % \end{macro}
601 % Also part of the local configuration is the maximum number of affiliations
602 % before switching to footnote mode. Redefine this with |\setcounter|.
603 % \begin{macrocode}
604 \newcounter{Maxaffil}
605 \setcounter{Maxaffil}{2}
606 % \end{macrocode}
607 %
608 % \subsection{Package Options}
609 %
610 % Options are provided to select some author and affiliation fonts, and
611 % certain values of |Maxaffil|, including 0 (always footnote mode) and
612 % infinity (always block mode).
613 % \begin{macrocode}
614 %<*!subpack&!209>
615 \DeclareOption{blocks}{\setcounter{Maxaffil}{\maxdimen}}
616 \DeclareOption{noblocks}{\setcounter{Maxaffil}{0}}
617 \DeclareOption{max2}{\setcounter{Maxaffil}{2}}
618 \DeclareOption{max3}{\setcounter{Maxaffil}{3}}
619 \DeclareOption{max4}{\setcounter{Maxaffil}{4}}
620 \DeclareOption{max5}{\setcounter{Maxaffil}{5}}
621 \DeclareOption{max6}{\setcounter{Maxaffil}{6}}
622 \DeclareOption{auth-sc}{\renewcommand\Authfont{\scshape}}
623 \DeclareOption{auth-sc-lg}{\renewcommand\Authfont{\large\scshape}}
624 \DeclareOption{auth-lg}{\renewcommand\Authfont{\large}}
625 \DeclareOption{affil-sl}{\renewcommand\Affilfont{\slshape}}
626 \DeclareOption{affil-it}{\renewcommand\Affilfont{\itshape}}
627 \DeclareOption{german}{\renewcommand\Authand{, und }%
628 \renewcommand\Authands{, und }}
629 \ProcessOptions
630 %</!subpack&!209>
631 % \end{macrocode}
632 %
633 % \subsection{Supporting Macros}
634 %
635 % First declare some counters and flags. The number of authors, affiliations,
636 % and a flag to mark a new affiliation.
637 % \begin{macrocode}
638 \newcounter{authors}
639 \newcounter{affil}
640 \newif\ifnewaffil \newaffiltrue
641 % \end{macrocode}
642 %
643 % \begin{macro}{\AB@authnote}
644 % \begin{macro}{\AB@affilnote}
645 % The formatting of the footnote markers in the author and affiliation lines.
646 % The |\textsuperscript| command must be defined for 2.09 and provided for
647 % earlier version of \LaTeXe\ (before 1995/06/01).
648 % \begin{macrocode}
649 \newcommand\AB@authnote[1]{\textsuperscript{\normalfont#1}}
650 \newcommand\AB@affilnote[1]{\textsuperscript{\normalfont#1}}
651 %<209>\@ifundefined{textsuperscript}{\newcommand\textsuperscript[1]{$^{#1}$}}{}
652 %<!209>\providecommand\textsuperscript[1]{$^{#1}$}
653 % \end{macrocode}
654 % \end{macro}\end{macro}
655 %
656 % \begin{macro}{\AB@blk@and}
657 % The macro that comes between author blocks. Initially this is nothing other
658 % than setting the author font, but will be set to |\and| after the first
659 % invocation. Again, everything in this definition must be robust, either
660 % intrinsically or with |\protect| commands. The macro |\AB@setsep|
661 % sets |\@affilsep| to the author-affiliation separation.
662 % \begin{macrocode}
663 \newcommand\AB@blk@and{\protect\Authfont\protect\AB@setsep}
664 % \end{macrocode}
665 % \end{macro}
666 %
667 % \begin{macro}{\AB@pand}
668 % The `protected' version of |\and| that is inserted in |\AB@authors| between
669 % authors and affiliations; since it begins a new author block, it sets the
670 % font to the author font, and the interline spacing to the
671 % author\brsl{}affiliation spacing.
672 % \begin{macrocode}
673 \newcommand\AB@pand{\protect\and \protect\Authfont \protect\AB@setsep}
674 % \end{macrocode}
675 % \end{macro}
676 %
677 % \begin{macro}{\@sep1}\begin{macro}{\@sep2}
678 % The $n$th author in |\AB@authlist| is preceeded by
679 % |\@sep|$n$; this is defined as empty for $n$=1 and the as the
680 % two-author separation for $n$=2, to be altered later.
681 % \begin{macrocode}
682 \@namedef{@sep1}{}
683 \@namedef{@sep2}{\Authand}
684 % \end{macrocode}
685 % \end{macro}\end{macro}
686 %
687 % \begin{macro}{\AB@affilsep}
688 % \begin{macro}{\AB@affilsepx}
689 % What comes before the very first footnote affiliation, and before all
690 % successive affiliations. These should be separate lines within some
691 % tabular environment, so reset the font every time to the affiliation one.
692 % (Note: |\\| is robust in \LaTeXe, but not in 2.09; adding the |\protect|
693 % before |\\| does not hurt, though.)
694 % \begin{macrocode}
695 \newcommand\AB@affilsep{\protect\Affilfont}
696 \newcommand\AB@affilsepx{\protect\\\protect\Affilfont}
697 % \end{macrocode}
698 % \end{macro}\end{macro}
699 %
700 % \begin{macro}{\AB@setsep}
701 % \begin{macro}{\AB@resetsep}
702 % The current interline spacing within affiliations is |\@affilsep|; the
703 % initial spacing (between authors and first affiliation line) is
704 % |\affilsep|; switching |\@affilsep| between 0~pt and |\affilsep| is done
705 % with these macros.
706 % \begin{macrocode}
707 \newcommand\AB@setsep{\setlength{\@affilsep}{\affilsep}}
708 \newcommand\AB@resetsep{\setlength{\@affilsep}{\z@}}
709 % \end{macrocode}
710 % \end{macro}\end{macro}
711 %
712 % \begin{macro}{\AB@authlist}
713 % \begin{macro}{\AB@affillist}
714 % \begin{macro}{\AB@authors}
715 % There are three `lists' that are filled up with various commands:
716 % \begin{itemize}
717 % \item |\AB@authlist| containing all the authors;
718 %
719 % \item |\AB@affillist| containing all the affiliations;
720 %
721 % \item |\AB@authors| ($\equiv$|\@author|) containing the input of the
722 % standard \LaTeX\ |\author| command, a mixture of authors and
723 % affiliations, with blocks separated by |\and| commands.
724 % \end{itemize}
725 % |\AB@empty| is provided for testing the emptiness of |\AB@affillist|
726 % later. (Do not use |\@empty|, because that is not a `long' macro.)
727 %
728 % Here these lists are initialized.
729 % \begin{macrocode}
730 \newcommand\AB@authlist{}
731 \newcommand\AB@affillist{}
732 \newcommand\AB@authors{}
733 \newcommand\AB@empty{}
734 % \end{macrocode}
735 % \end{macro}\end{macro}\end{macro}
736 %
737 % \begin{macro}{\AB@author}
738 % \changes{1.1}{1997 Aug 28}{Initialize to existing \cs{@author}}
739 % \changes{1.1a}{1998 Jul 14}{Define \cs{@author} for 2.09}
740 % The |\AB@author| macro holds the argument of the last issued |\author|
741 % command, normally stored in |\@author|. Equate these now in case
742 % |\author| was issued before the class and/or packages were loaded,
743 % something that is allowed in standard \LaTeX. Of course, the new
744 % features with |\affil| and multiple |\author| commands will not
745 % function before this package is loaded.
746 %
747 % For \LaTeX~2.09, must provisionally define |\@author|.
748 % \begin{macrocode}
749 %<209>\@ifundefined{@author}{\def\@author}{}
750 \xdef\AB@author{\noexpand\AB@blk@and\@author}
751 % \end{macrocode}
752 % \end{macro}
753 %
754 % \subsection{User Interfacing Commands}
755 %
756 % \begin{macro}{\author}
757 % Three lists are maintained for authors and affiliations. In |\AB@authors|,
758 % the text for the author block is stored; both |\author| and |\affil| add
759 % their arguments to this list, with |\\| between author and affiliation, and
760 % |\and| between the affiliation and the next author text. If one only uses
761 % the |\author| command (standard \LaTeX) one must add these separators
762 % explicitly in the argument.
763 %
764 % In addition, both |\author| and |\affil| store their arguments in
765 % |\AB@authlist| and |\AB@affillist|, adding footnote marks determined either
766 % automatically, or by the optional arguments.
767 %
768 % Finally, |\@author| will be made up either by |AB@author|, |\AB@authors|, or
769 % |\AB@authlist| plus |\AB@affillist|.
770 %
771 % Consequently, |\author| and |\affil| are fairly complex.
772 % \begin{macrocode}
773 %<209>\renewcommand\author{\@ifnextchar[%]
774 %<209> {\@Xauthor}{\@Xauthor[]}}
775 %<209>\def\@Xauthor[#1]#2%
776 %<!209>\renewcommand\author[2][]%
777 % \end{macrocode}
778 % The flag |\ifnewaffil| is set by |\affil| to tell |\author| that a new
779 % author block is beginning. This flag is set to \meta{false} at the end
780 % if this macro.
781 % \begin{macrocode}
782 {\ifnewaffil\addtocounter{affil}{1}%
783 \edef\AB@thenote{\arabic{affil}}\fi
784 % \end{macrocode}
785 % Argument |#1| is the optional footnote marker; if it is present, force the
786 % footnote mode by setting |Maxaffil| counter to zero.
787 % \begin{macrocode}
788 \if\relax#1\relax\def\AB@note{\AB@thenote}\else\def\AB@note{#1}%
789 \setcounter{Maxaffil}{0}\fi
790 % \end{macrocode}
791 % The author list in |\AB@authlist| is to have commas (|\Authsep|) between
792 % the names, nothing before the first one, and `and' (|\Authands|) before the
793 % last one. If only two names are present, they are separated by |\Authand|.
794 % To accomplish this, place |@sep|$n$ before author $n$ which
795 % is defined to be |\Authands|; at the same time, define the previous one to
796 % be |\Authsep|, taking care that |\@sep1| (empty) is never redefined, and
797 % that |\@sep2| (|\Authand|) is only redefined after the third author. Note
798 % that at this point in the coding, the |authors| counter is not yet
799 % incremented, so its value is $n-1$.
800 % \begin{macrocode}
801 \ifnum\value{authors}>1\relax
802 \@namedef{@sep\number\c@authors}{\Authsep}\fi
803 \addtocounter{authors}{1}%
804 % \end{macrocode}
805 % Put the new author text in |#2| into the lists |\AB@authors| and
806 % |\AB@authlist|. Because of the expansion method of getting the existing
807 % contents of these lists, all commands in the arguments must be robust. For
808 % this reason, make |\thanks| and |\footnote| robust (they normally are
809 % fragile).
810 %
811 % Note that every new line inserted into |\AB@authors| must contain
812 % formatting declarations, like |\Authfont| and |\Affilfont|.
813 % The newline command |\\| switches to affiliation, with extra interline
814 % spacing and a different font. The extra spacing is in |\@affilsep| which is
815 % either zero or |\affilsep|, as set by commands |\AB@resetsep| and
816 % |\AB@setsep|. The extra spacing is meant only to come between author and
817 % first affiliation lines.
818 %
819 % The newline command should behave differently in |\AB@authlist|; the
820 % |\authorcr| macro is adequate for this (new line and |\Authfont|).
821 %
822 % Reminder: the font declarations must be made on each new line since
823 % |\@author| is normally placed within a |tabular| environment where each
824 % line has local scope so all declarations and definitions apply only within
825 % it.
826 % \begin{macrocode}
827 \begingroup
828 \let\protect\@unexpandable@protect \let\and\AB@pand
829 \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}%
830 \@temptokena=\expandafter{\AB@authors}%
831 {\def\\{\protect\\[\@affilsep]\protect\Affilfont
832 \protect\AB@resetsep}%
833 % \end{macrocode}
834 % To allow for the standard \LaTeX\ syntax with only one |\author| command
835 % for everything, put the argument |#2| into |\AB@author| with the
836 % appropriate preamble |\AB@blk@and|. If |\affil| is never called, this
837 % will be the final content of |\@author|. Otherwise it will become
838 % |\AB@authors|. Here the previous author is |\AB@au@str| is put into
839 % |\AB@authors|, and then |#2| is stored for the next |\author| or |\affil|
840 % call. |\AB@as| is the separator between authors in one sub-block; |\AB@las|
841 % is the separator before the last author in a sub-block; this is entered by
842 % |\affil| which signals the end of a sub-block of authors.
843 % (This delayed entry method cannot be used for |\AB@authlist| because there
844 % one needs to know the very last author, but one never knows if another
845 % |\affil| command might come along.)
846 % \begin{macrocode}
847 \xdef\AB@author{\AB@blk@and#2}%
848 \ifnewaffil\gdef\AB@las{}\gdef\AB@lasx{\protect\Authand}\gdef\AB@as{}%
849 \xdef\AB@authors{\the\@temptokena\AB@blk@and}%
850 \else
851 \xdef\AB@authors{\the\@temptokena\AB@as\AB@au@str}%
852 \global\let\AB@las\AB@lasx\gdef\AB@lasx{\protect\Authands}%
853 \gdef\AB@as{\Authsep}%
854 \fi
855 \gdef\AB@au@str{#2}}%
856 \@temptokena=\expandafter{\AB@authlist}%
857 \let\\=\authorcr
858 \xdef\AB@authlist{\the\@temptokena
859 \protect\@nameuse{@sep\number\c@authors}%
860 \protect\Authfont#2\AB@authnote{\AB@note}}%
861 \endgroup
862 % \end{macrocode}
863 % Define |\@sep|$n$ preceeding the current author to be |\Authands|, in case
864 % this should turn out to be the last author. If another author comes, he
865 % will redefine this (see above).
866 % \begin{macrocode}
867 \ifnum\value{authors}>2\relax
868 \@namedef{@sep\number\c@authors}{\Authands}\fi
869 \newaffilfalse
870 }
871 % \end{macrocode}
872 %
873 % For \LaTeX~2.09, we must define this \LaTeXe\ macro.
874 % \begin{macrocode}
875 %<209>\def\@unexpandable@protect{\noexpand \protect \noexpand}
876 % \end{macrocode}
877 % \end{macro}
878 %
879 % \begin{macro}{\authorcr}
880 % In the author blocks made up with the |\author| command alone, the |\\|
881 % command is used to start a new line and to switch to affiliation formatting.
882 % In order to force a new line within the author line, use |\authorcr|.
883 % \begin{macrocode}
884 \newcommand\authorcr{\protect\\ \protect\Authfont \protect\AB@setsep}%
885 % \end{macrocode}
886 % \end{macro}
887 %
888 % \begin{macro}{\affil}
889 % The affiliation information is also written into |\AB@authors| and
890 % |\AB@affillist|. The |\ifnewaffil| flag is set to inform |\author|, the
891 % `blank-or-and' macro |\AB@blk@and| is set to (protected) `and', and if
892 % there is an optional argument, the counter |Maxaffil| is set to zero to
893 % force footnote mode.
894 % \begin{macrocode}
895 %<209>\newcommand\affil{\@ifnextchar[%]
896 %<209> {\@Xaffil}{\@Xaffil[]}}
897 %<209>\def\@Xaffil[#1]#2%
898 %<!209>\newcommand\affil[2][]%
899 {\newaffiltrue\let\AB@blk@and\AB@pand
900 \if\relax#1\relax\def\AB@note{\AB@thenote}\else\def\AB@note{#1}%
901 \setcounter{Maxaffil}{0}\fi
902 % \end{macrocode}
903 % As for |\author|, the newline command must be highjacked and altered. For
904 % |\AB@authors|, it issues a new line and declares the affiliation font. For
905 % |\AB@authlist|, where each affiliation is to appear on a single line, it is
906 % converted into a comma.
907 % \begin{macrocode}
908 \begingroup
909 \let\protect\@unexpandable@protect
910 \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}%
911 \@temptokena=\expandafter{\AB@authors}%
912 {\def\\{\protect\\\protect\Affilfont}\xdef\AB@temp{#2}}%
913 \xdef\AB@authors{\the\@temptokena\AB@las\AB@au@str
914 \protect\\[\affilsep]\protect\Affilfont\AB@temp}%
915 \gdef\AB@las{}\gdef\AB@au@str{}%
916 {\def\\{, \ignorespaces}\xdef\AB@temp{#2}}%
917 \@temptokena=\expandafter{\AB@affillist}%
918 \xdef\AB@affillist{\the\@temptokena \AB@affilsep
919 \AB@affilnote{\AB@note}\protect\Affilfont\AB@temp}%
920 \endgroup
921 % \end{macrocode}
922 % The item before each affiliation is |\AB@affilsep|, which changes from its
923 % initial definition to |\AB@affilsepx| after the first call.
924 % \begin{macrocode}
925 \let\AB@affilsep\AB@affilsepx
926 }
927 % \end{macrocode}
928 % \end{macro}
929 %
930 % \begin{macro}{\@author}
931 % Define |\@author| to be the last |\author| call if |\affil| was
932 % never used (standard \LaTeX), or define it to be either |\AB@authors| or a
933 % combination of |\AB@authlist| and |\AB@authlist| depending on number of
934 % affiliations.
935 %
936 % The standard classes put any footnote markers (with |\thanks| or
937 % |\footnote|) into |\rlap| so they overlap with punctuation. Unfortunately,
938 % they also overlap any other affiliation footnote markers. Thus turn off
939 % |\rlap| for footnote style. Since |\@author| is normally called within
940 % some environment, this change is local.
941 % \begin{macrocode}
942 \def\@author{}
943 \renewcommand\@author{\ifx\AB@affillist\AB@empty\AB@author\else
944 \ifnum\value{affil}>\value{Maxaffil}\def\rlap##1{##1}%
945 \AB@authlist\\[\affilsep]\AB@affillist
946 \else \AB@authors\fi\fi}
947 % \end{macrocode}
948 % \end{macro}
949 %
950 % \begin{macro}{\maketitle}
951 % \changes{1.3}{2001 Feb 27}{Modify standard macro}
952 % The standard definitions of |\maketitle| place the |\@author| text in a
953 % |tabular| environment, which is not appropriate for the long author list
954 % possible with \texttt{\filename}. Instead, use the |center| environment.
955 % Other packages that call \texttt{\filename} such as \texttt{mpaehead} redefine
956 % |\maketitle| accordingly. But if \texttt{\filename} is used on its own, this
957 % will not be done. Thus highjack the |\maketitle| command and redefine
958 % |tabular| to be |center|.
959 % \begin{macrocode}
960 \let\AB@maketitle=\maketitle
961 \def\maketitle
962 {{\renewenvironment{tabular}[2][]{\begin{center}}
963 {\end{center}}
964 \AB@maketitle}}
965 %</package>
966 % \end{macrocode}
967 % \end{macro}
968 %
969 % \Finale