Debian Codegraph @

texmf-dist/source/latex/revtex/revtex4-2.dtx

raw
1 % \iffalse meta-comment balanced on line 122
2 % revtex4-2.dtx: package to typeset APS, AIP, SOR, ASA, etc. journal articles
3 % Copyright (c) 2019 American Physical Society.
4 % https://journals.aps.org/revtex/
5 % mailto:[email protected]
6 %
7 % Disclaimer
8 % This file is distributed WITHOUT ANY WARRANTY;
9 % without even the implied warranty of
10 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 % License
12 % You may distribute this file under the conditions of the
13 % LaTeX Project Public License 1.3c or later
14 % (http://www.latex-project.org/lppl.txt).
15 % ReadMe
16 % For the documentation and more detailed instructions for
17 % installation, typeset this document with \LaTeX.
18 % Maintenance Status
19 % This work has the LPPL maintenance status "maintained";
20 % Current Maintainer of this work is Arthur Ogawa.
21 %
22 % This work consists of the main source file revtex4-2.dtx
23 % and the derived files
24 % revtex4-2.cls, revtex4-2.pdf
25 % Distribution:
26 % CTAN:macros/latex/contrib/revtex/
27 %
28 % Unpacking:
29 % tex revtex4-2.dtx
30 %
31 % Documentation:
32 % latex revtex4-2.dtx; ...
33 %
34 % Programm calls to get the documentation (example):
35 % pdflatex revtex4-2.dtx
36 % makeindex -s gind.ist revtex4-2.idx
37 % makeindex -s gglo.ist -o revtex4-2.gls revtex4-2.glo
38 % pdflatex revtex4-2.dtx
39 % makeindex -s gind.ist revtex4-2.idx
40 % pdflatex revtex4-2.dtx
41 %
42 % Installation:
43 % TDS:bibtex/bst/revtex/
44 % TDS:doc/latex/revtex/
45 % TDS:tex/latex/revtex/
46 % TDS:source/latex/revtex/
47 %
48 % Thanks, Heiko!
49 % This method of letting a single .dtx file serve as both
50 % documentation (via latex) and installer (via tex) follows
51 % the example of Heiko Oberdiek. Thanks!
52 %<*ignore>
53 \begingroup
54 \def\x{LaTeX2e}%
55 \expandafter\endgroup
56 \ifcase
57 0\expandafter\ifx\csname processbatchFile\endcsname\relax\else1\fi\ifx\fmtname\x\else 1\fi
58 \relax
59 \else
60 \csname fi\endcsname
61 %</ignore>
62 %<*install>
63 %% This file will generate documentation and runtime files
64 %% from revtex4-2.dtx when run through TeX.
65 \input docstrip
66 \preamble
67
68 This file is part of the APS files in the REVTeX 4 distribution.
69 For the version number, search on the string %FileInfo
70
71 Original version by David Carlisle
72 Modified by Arthur Ogawa (mailto:arthur_ogawa at sbcglobal dot net)
73
74 Version (4.2a, unreleased)
75 Modified by Aptara on behalf of American Physical Society and American Institute of Physics
76
77 Version (4.2b,4.2c)
78 Modified by Mark Doyle, American Physical Society (mailto:revtex at aps.org)
79
80 Version (4.2d--4.2f)
81 Modified by Phelype Oleinik for the American Physical Society (mailto:phelype.oleinik at latex-project.org)
82
83 Copyright (c) 2019--2022 American Physical Society.
84 https://journals.aps.org/revtex/
85 mailto:[email protected]
86
87 See the REVTeX 4.2 README-REVTEX file for restrictions and more information.
88
89 \endpreamble
90 \askforoverwritefalse
91 \keepsilent
92 \generate{%
93 \file{revtex4-2.cls}{%
94 \from{revtex4-2.dtx}{kernel}%
95 \from{ltxutil.dtx}{kernel}%
96 \from{ltxfront.dtx}{kernel}%
97 \from{ltxgrid.dtx}{kernel}%
98 \from{revtex4-2.dtx}{options}%
99 \from{ltxutil.dtx}{options}%
100 \from{ltxfront.dtx}{options}%
101 \from{ltxgrid.dtx}{options}%
102 \from{revtex4-2.dtx}{package}%
103 }%
104 \file{aps4-2.rtx}{\from{revtex4-2.dtx}{aps}}%
105 \file{apsrmp4-2.rtx}{\from{revtex4-2.dtx}{rmp}}%
106 \file{aps10pt4-2.rtx}{\from{revtex4-2.dtx}{10pt}}%
107 \file{aps11pt4-2.rtx}{\from{revtex4-2.dtx}{11pt}}%
108 \file{aps12pt4-2.rtx}{\from{revtex4-2.dtx}{12pt}}%
109 \file{revsymb4-2.sty}{\from{revtex4-2.dtx}{revsymb}}%
110 }%
111 \ifToplevel{
112 \Msg{***********************************************************}
113 \Msg{*}
114 \Msg{* To finish the installation, please move}
115 \Msg{* *.cls, *.rtx, and *.sty }
116 \Msg{* into a directory searched by TeX;}
117 \Msg{* in a TDS-compliant installation:}
118 \Msg{* texmf/tex/macros/latex/revtex/.}
119 \Msg{*}
120 \Msg{* To produce the documentation,
121 run revtex4-2.dtx through LaTeX.}
122 \Msg{*}
123 \Msg{* Happy TeXing}
124 \Msg{***********************************************************}
125 }
126 \endbatchfile
127 %</install>
128 %<*ignore>
129 \fi
130 %</ignore>
131 % \fi
132 %
133 % \GetFileInfo{revtex4-2.dtx}
134 %
135 % \StopEventually{}
136 % \iffalse ltxdoc klootch
137 %<*package>
138 %%% @LaTeX-file{
139 %%% filename = "revtex4-2.dtx",
140 %%% version = "4.2f",
141 %%% date = "2022/06/05",
142 %%% author = "Mark Doyle (mailto: revtex at aps.org), Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net),
143 %%% commissioned by the American Physical Society.
144 %%% ",
145 %%% copyright = "Copyright (C) 1999, 2009 Arthur Ogawa, Version 4.2 Copyright (C) 2019 American Physical Society
146 %%% distributed under the terms of the
147 %%% LaTeX Project Public License 1.3c, see
148 %%% ftp://ctan.tug.org/macros/latex/base/lppl.txt
149 %%% ",
150 %%% address = "Mark Doyle,
151 %%% USA",
152 %%% telephone = "",
153 %%% FAX = "",
154 %%% email = "mailto colon revtex at aps.org",
155 %%% codetable = "ISO/ASCII",
156 %%% keywords = "",
157 %%% supported = "yes",
158 %%% abstract = "",
159 %%% }
160 %</package>
161 % \fi
162 %
163 % \iffalse ltxdoc klootch
164 % The following references the \file{README-REVTEX.tex} file,
165 % which contains the frontmatter for the programmer's docs.
166 % The contents of this file are generated when
167 % you typeset this file with LaTeX.
168 % Search on "{filecontents*}{README-REVTEX.tex}" to locate it.
169 % \fi\input{README-REVTEX.tex}%
170 %
171 % \subsection{Bill of Materials}
172 %
173 % Following is a list of the files in this distribution arranged
174 % according to provenance.
175 %
176 % \subsubsection{Primary Source}%
177 % One single file generates all.
178 %\begin{verbatim}
179 %revtex4-2.dtx
180 %\end{verbatim}
181 %
182 % \subsubsection{Generated by \texttt{tex revtex4-2.dtx}}%
183 % Typesetting ths file under \TeX\ itself runs the installer,
184 % which generates the package files.
185 %\begin{verbatim}
186 %revtex4-2.cls, revtex4.ins, revtex4.drv, aps4-2.rtx,
187 %aps10pt4-2.rtx, aps11pt4-2.rtx, aps12pt4-2.rtx, revsymp.sty
188 %\end{verbatim}
189 %
190 % \subsubsection{Generated by \texttt{pdflatex revtex4-2.dtx}}%
191 % Typesetting the source file under \LaTeX\
192 % generates the documentation.
193 %\begin{verbatim}
194 %revtex4.pdf,
195 %\end{verbatim}
196 %
197 % \subsubsection{Auxiliary}%
198 % The following are auxiliary files generated
199 % in the course of running \LaTeX:
200 % \begin{verbatim}
201 %revtex4.aux revtex4.idx revtex4.ind revtex4.log revtex4.toc
202 % \end{verbatim}
203 %
204 % \section{Code common to all modules}%
205 %
206 % The following may look a bit klootchy, but we
207 % want to require only one place in this file
208 % where the version number is stated,
209 % and we also want to ensure that the version
210 % number is embedded into every generated file.
211 %
212 % Now we declare that
213 % these files can only be used with \LaTeXe.
214 % An appropriate message is displayed if
215 % a different \TeX{} format is used.
216 % \begin{macrocode}
217 %<*doc|kernel|aps|rmp|revsymb>
218 \NeedsTeXFormat{LaTeX2e}[1996/12/01]%
219 %</doc|kernel|aps|rmp|revsymb>
220 %<kernel>\ProvidesClass{revtex4-2}
221 %<aps>\ProvidesFile{aps4-2}
222 %<rmp>\ProvidesFile{apsrmp4-2}
223 %<10pt>\ProvidesFile{aps10pt4-2}
224 %<11pt>\ProvidesFile{aps11pt4-2}
225 %<12pt>\ProvidesFile{aps12pt4-2}
226 %<revsymb>\ProvidesPackage{revsymb4-2}
227 %<*doc>
228 \ProvidesFile{revtex4-2.dtx}
229 %</doc>
230 %<*!package&!options>
231 %<version>
232 [2022/06/05 4.2f (https://journals.aps.org/revtex/ for documentation)]% \fileversion
233 %</!package&!options>
234 % \end{macrocode}
235 % The current class name is remembered in \cmd\class@name.
236 % This is something of a klootch, relying as it does on knowledge of the implementation of \cmd\ProvidesPackage.
237 % \begin{macrocode}
238 %<kernel>\let\class@name\@gtempa
239 % \end{macrocode}
240 %
241 % \section{The driver module \texttt{driver}}
242 %
243 % This module, consisting of the present section,
244 % typesets the programmer's documentation,
245 % generating the \file{README-REVTEX.txt} and sample document as needed.
246 %
247 % Because the only uncommented-out lines of code at the beginning of
248 % this file constitute the \file{driver} module itself,
249 % we can simply typeset the \file{.dtx} file directly,
250 % and there is thus rarely any need to
251 % generate the ``driver'' {\sc docstrip} module.
252 % Module delimiters are nonetheless required so that
253 % this code does not find its way into the other modules.
254 %
255 % The \enve{document} command concludes the typesetting run.
256 %
257 % \begin{macrocode}
258 %<*doc>
259 % \end{macrocode}
260 % The driver uses packages \file{ltxdoc.sty}, \file{ltxdocext.sty},
261 % \file{hyperref.sty}, and whatever font package has been selected.
262 % \begin{macrocode}
263 \documentclass{ltxdoc}
264 \RequirePackage{ltxdocext}%
265 \let\url\undefined
266 \RequirePackage[colorlinks=true,linkcolor=blue]{hyperref}%
267 % \end{macrocode}
268 % We ask for the usual indices and glossaries.
269 % \begin{macrocode}
270 \CodelineIndex\EnableCrossrefs % makeindex -s gind.ist revtex4
271 \RecordChanges % makeindex -s gglo.ist -o revtex4.gls revtex4.glo
272 % \end{macrocode}
273 %
274 % \subsubsection{Docstrip and info directives}
275 % We use so many {\sc docstrip} modules that we set the
276 % \texttt{StandardModuleDepth} counter to 1.
277 % \begin{macrocode}
278 \setcounter{StandardModuleDepth}{1}
279 % \end{macrocode}
280 % The following command retrieves the date and version information
281 % from this file.
282 % \begin{macrocode}
283 \expandafter\GetFileInfo\expandafter{\jobname.dtx}%
284 % \end{macrocode}
285 %
286 % \subsection{The Frontmatter File}
287 % As promised above, here is the contents of the frontmatter file.
288 % \begin{macrocode}
289 \begin{filecontents*}{README-REVTEX.tex}
290 \title{%
291 The \classname{revtex4-2} document class of the American Physical Society%
292 \protect\thanks{Work under hire to American Physical Society. Version \fileversion\ \copyright\ 2019 American Physical Society}%
293 }%
294 \author{Arthur Ogawa and Mark Doyle%
295 \protect\thanks{First revision of REV\TeX4.0 (unreleased) by David Carlisle, all released versions of 4.0 and 4.1 by Art Ogawa, 4.2a (unreleased) by Aptara, 4.2b,c by Mark Doyle}%
296 }%
297 \date{Version \fileversion, dated \filedate}%
298 \newcommand\revtex{REV\TeX}
299
300 \maketitle
301
302 This file embodies the implementation of the APS \revtex\ 4.2 document class
303 for electronic submissions to journals.
304
305 The distribution point for this work is
306 \url{https://journals.aps.org/revtex/},
307 which contains fully unpacked, prebuilt runtime files and documentation.
308
309 \tableofcontents
310
311 \section{Using \protect\revtex}
312
313 The file \file{README} has retrieval and installation information.
314
315 User documentation is presented separately in \file{auguide.tex}.
316
317 The file \file{template.aps} is a boilerplate file.
318
319 \changes{4.0a}{1998/01/16}{Initial version}
320 \changes{4.0a}{1998/01/31}{Move after process options, so \cs{clearpage} not in scope of twocolumn}
321 \changes{4.0a}{1998/01/31}{Rearrange the ordering so numerical ones come first. AO: David, what does this mean?}
322 \changes{4.0a}{1998/01/31}{use font-dependent spacing}
323 \changes{4.0a}{1998/01/31}{4.0d had twoside option setting twoside switch to false}
324 \changes{4.0a}{1998/01/31}{Move after process options, so the following test works}
325 \changes{4.0a}{1998/01/31}{print homepage}
326 \changes{4.0a}{1998/01/31}{protect against hyperref revtex kludges which are not needed now}
327 \changes{4.0a}{1998/06/10}{multiple preprint commands}
328 \changes{4.0a}{1998/06/10}{comma not space between email and homepage}
329 \changes{4.0a}{1998/06/10}{single space footnotes}
330 \changes{4.0b}{1999/06/20}{First modifications by Arthur Ogawa (mailto:arthur\_ogawa at sbcglobal dot net)}
331 \changes{4.0b}{1999/06/20}{Added localization of \cs{figuresname}}
332 \changes{4.0b}{1999/06/20}{Added localization of \cs{tablesname}}
333 \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{10pt} is in this module.}
334 \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{11pt} is in this module.}
335 \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{12pt} is in this module.}
336 \changes{4.0b}{1999/06/20}{AO: made aps.rtx part of revtex4.dtx}
337 \changes{4.0b}{1999/06/20}{AO: remove duplicates}
338 \changes{4.0b}{1999/06/20}{call \cs{print@floats}}
339 \changes{4.0b}{1999/06/20}{Defer assignment until \cs{AtBeginDocument} time.}
340 \changes{4.0b}{1999/06/20}{Defer decision until \cs{AtBeginDocument} time}
341 \changes{4.0b}{1999/06/20}{Define three separate environments, defer assignment to \cs{AtBeginDocument} time.}
342 \changes{4.0b}{1999/06/20}{Frank Mittelbach, has stated in \protect\classname{multicol}: ``The kernel command \cs{@footnotetext} should not be modified.'' Thus, I have removed David Carlisle's redefinition of that command. Note, however, that later versions of \protect\classname{multicol} do not require this workaround. Belt and suspenders.}%
343 \changes{4.0b}{1999/06/20}{Move this ``complex'' option to the front, where it can be overridden by ``simple'' options.}
344 \changes{4.0b}{1999/06/20}{New option}
345 \changes{4.0b}{1999/06/20}{One-line caption sets flush left.}
346 \changes{4.0b}{1999/06/20}{only execute if appropriate}
347 \changes{4.0b}{1999/06/20}{Processing delayed to \cs{AtBeginDocument} time}
348 \changes{4.0b}{1999/06/20}{Removed invocation of nonexistent class option \protect\classoption{groupauthors} and all other class options that should only be invoked by the document. (Otherwise precedence of class options does not work.)}
349 \changes{4.0b}{1999/06/20}{Restore all media size class option of \protect\file{classes.dtx}}
350 \changes{4.0b}{1999/06/20}{Stack \cs{preprint} args flush right at right margin.}
351 \changes{4.0c}{1999/11/13}{(AO, 115) If three or more preprints specified, set on single line, with commas.}
352 \changes{4.0c}{1999/11/13}{(AO, 129) section* within appendix was producing appendixname}
353 \changes{4.0c}{1999/11/13}{*-form mandates pagebreak}
354 \changes{4.0c}{1999/11/13}{also spelled ``acknowledgements''.}
355 \changes{4.0c}{1999/11/13}{Do not put by REVTeX in every page foot}
356 \changes{4.0c}{1999/11/13}{grid changes via ltxgrid procedures}
357 \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
358 \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
359 \changes{4.0c}{1999/11/13}{Lose compatability mode.}
360 \changes{4.0c}{1999/11/13}{New ltxgrid-based code, other bug fixes}
361 \changes{4.0c}{1999/11/13}{New option ``checkin''}
362 \changes{4.0c}{1999/11/13}{Prevent an inner footnote from performing twice}
363 \changes{4.0d}{2000/04/10}{Also alter how lists get indented.}
364 \changes{4.0d}{2000/04/10}{eprint takes an optional argument, syntactical only in this case.}
365 \changes{4.0d}{2000/04/10}{New option}
366 \changes{4.0d}{2000/05/10}{More features and bug fixes: compatability with longtable and array packages. Now certainly incompatible with multicol.}
367 \changes{4.0d}{2000/05/17}{make longtable trigger the head, too}
368 \changes{4.0d}{2000/05/18}{But alternative spelling is deprecated.}
369 \changes{4.0e}{2000/09/20}{New option showkeys}
370 \changes{4.0e}{2000/11/14}{Bug fixes and minor new features: title block affiliations can have ancillary data, just like authors; clearpage processing revamped, with floats staying in order; widetext ornaments.}
371 \changes{4.0e}{2000/11/21}{adornments above and below.}
372 \changes{4.0f}{2001/02/13}{Last bug fixes before release.}
373 \changes{4.0rc1}{2001/06/17}{Running headers always as if two-sided}
374 \changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
375 \changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
376 \changes{4.0rc4}{2001/07/23}{hyperref is no longer loaded via class option: use a usepackage statement instead}
377 \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
378 \changes{4.1a}{2008/01/18}{(AO, 451) ``Cannot have more than 256 cites in a document''}%
379 \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
380 \changes{4.1a}{2008/01/18}{(AO, 460) ``Proper style is "FIG. 1. ..." (no colon)''}%
381 \changes{4.1a}{2008/01/18}{(AO, 478) \cs{ds@letterpaper}, so that ``letterpaper really is the default''}%
382 \changes{4.1a}{2008/01/18}{(AO, 488) Change processing of options to allow an unused option to specify society and journal}%
383 \changes{4.1a}{2008/01/19}{(AO, 461) Change the csname revtex uses from @dotsep to ltxu@dotsep. The former is understood in mu. (What we wanted was a dimension.)}%
384 \changes{4.1a}{2008/01/19}{For natbib versions before 8.21, \cs{NAT@sort} was consulted only as natbib was being read in. Now it is fully dynamic.}
385 \changes{4.1b}{2008/05/29}{The csname substyle@ext is now defined without a dot (.), to be compatible with \LaTeX usage (see @clsextension and @pkgextension).}
386 \changes{4.1b}{2008/06/01}{(AO) Implement bibnotes through \cs{frontmatter@footnote@produce} instead of \cs{bibnotes@sw}}%
387 \changes{4.1b}{2008/06/01}{Add option reprint, opposite of preprint, and preferred alternative to twocolumn}
388 \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
389 \changes{4.1b}{2008/06/30}{(AO) Structure the Abstract using the \texttt{bibliography} environment}
390 \changes{4.1b}{2008/07/01}{(AO) coordinate \cs{if@twoside} with \cs{twoside@sw}}
391 \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
392 \changes{4.1b}{2008/07/01}{(AO) No longer need to test \cs{chapter} as of \texttt{natbib} version 8.2}
393 \changes{4.1b}{2008/07/01}{(AO) No longer use \cs{secnumarabic@sw}, instead use \cs{setup@secnums}}
394 \changes{4.1b}{2008/07/01}{(AO) Provide more diagnostics when \cs{@society} is assigned.}
395 \changes{4.1b}{2008/07/01}{(AO) provide option longbibliography}
396 \changes{4.1b}{2008/07/01}{Add \cs{@hangfroms@section}}
397 \changes{4.1b}{2008/07/01}{Break out \cs{@caption@fignum@sep}}
398 \changes{4.1b}{2008/07/01}{Class option galley sets \cs{preprintsty@sw} to false}
399 \changes{4.1b}{2008/07/01}{Code relating to new syntax for frontmatter has been placed in \file{ltxfront.dtx}}
400 \changes{4.1b}{2008/07/01}{Package textcase is now simply a required package}
401 \changes{4.1b}{2008/07/01}{Procedures \cs{@parse@class@options@society} and \cs{@parse@class@options@journal} and friends}
402 \changes{4.1b}{2008/07/01}{Read in all required packages together}
403 \changes{4.1b}{2008/07/01}{Remove options newabstract and oldabstract}
404 \changes{4.1b}{2008/08/01}{Section numbering via procedures \cs{secnums@rtx} and \cs{secnums@arabic}.}
405 \changes{4.1b}{2008/08/04}{As with author formatting, rag the right more, and assign \cs{@totalleftmargin}. Also neutralize \cs{def@after@address}.}%
406 \changes{4.1b}{2008/08/04}{Rag the right even more: .8\cs{hsize}. Also, assign \cs{@totalleftmargin}.}%
407 \changes{4.1b}{2008/08/04}{The \texttt{rmp} journal substyle selects \texttt{groupedaddress} by default.}%
408 \changes{4.1b}{2008/08/04}{Use \cs{setup@hook} to initialize all.}
409 \changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}}
410 \changes{4.1d}{2009/03/27}{Definition of \cs{ @fnsymbol} follows fixltx2e.sty}
411 \changes{4.1e}{2008/06/29}{(AO, 455) be nice to a list within the abstract}
412 \changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}}
413 \changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon}
414 \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
415 \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}%
416 \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}%
417 \changes{4.1f}{2009/07/15}{(AO, 523) Add class option nomerge, to turn off new natbib 8.3 syntax}
418 \changes{4.1f}{2009/07/20}{(AO, 524) Makes no sense if citations are superscript numbers and so are footnotes}
419 \changes{4.1f}{2009/10/05}{(AO, 530) \cs{@fnsymbol}: Failed to import fixltx2e.sty technology. Return to LaTeX core.}
420 \changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}%
421 \changes{4.1g}{2009/10/07}{(AO, 538) \cs{MakeTextUppercase} inappropriately expands the double backslash}
422 \changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}%
423 \changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads}
424 \changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}}
425 \changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}}
426 \changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}}
427 \changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package}
428 \changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: invoking class option preprint implies class option preprintnumbers}
429 \changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms}
430 \changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}%
431 \changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}%
432 \changes{4.1n}{2010/01/02}{(AO, 571) Interface \cs{set@footnotewidth} for determining the set width of footnotes}%
433 \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
434 \changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}%
435 \changes{4.1n}{2010/01/04}{(AO, 575) the default for journal prstper is longbibliography}%
436 \changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}%
437 \changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}%
438 \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
439 \changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}%
440 \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}%
441 \changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a}
442 \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.}
443 \changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.}
444 \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.}
445 \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
446 \changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.}
447 \changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}}
448 \changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl}
449 \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}%
450 \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
451 \changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}%
452 \changes{4.2a}{2014/12/31}{(Aptara, MD) Added initial support for SOR and AAPM journals, additional journals for APS, and additional journals and proceedings for AIP, unreleased.}%
453 \changes{4.2a}{2014/12/31}{(Aptara) Make prb style to follow other Phys. Rev. journals.}%
454 \changes{4.2a}{2014/12/31}{(Aptara) Corrected indentation for tableofcontents appearing along with listoffigure/listoftable.}%
455 \changes{4.2a}{2017/11/21}{(MD) Make long bibliography style the default now.}%
456 \changes{4.2a}{2017/11/28}{(MD) Add call to normalsize to be a good citizen and allow booktabs.sty to work properly}.%
457 \changes{4.2b}{2018/12/26}{(MD) Make titles in bibliography default, prb style to follow other Phys. Rev. journals, add a unified physrev option as well as prx and prapplied options. Corrected indentation for tableofcontents appearing along with listoffigure/listoftable.}%
458 \changes{4.2b}{2017/11/21}{(MD) Update options for new titles without "Special Topics" and make prper match style of other journal options}%
459 \changes{4.2b}{2017/11/21}{(MD) Add options for new APS journals and a generic physrev option for future-proofing}%
460 \changes{4.2b}{2017/11/22}{(MD) Change default to not use a title page - it seems antiquated}%
461 \changes{4.2b}{2017/11/22}{(MD) MD - not sure why these parameters were different previously. Made them match except for title.}%
462 \changes{4.2b}{2017/11/22}{(MD) PACS are obsolete altogether now}%
463 \changes{4.2b}{2018/12/26}{(MD) Improve control over display of e-print ids in bibliography.}%
464
465 \end{filecontents*}
466 % \end{macrocode}
467 %
468 % \subsection{The Document Body}
469 %
470 % Here is the document body, containing only a
471 % \cmd\DocInput\ directive---referring to this very file.
472 % This very cute self-reference is a common \classname{ltxdoc} idiom.
473 % \begin{macrocode}
474 %%\newcommand\revtex{REV\TeX}% TeXSupport
475 \begin{document}%
476 \expandafter\DocInput\expandafter{\jobname.dtx}%
477 \PrintChanges
478 \end{document}
479 % \end{macrocode}
480 % And that is the end of the driver for the programmer's documentation.
481 % \begin{macrocode}
482 %</doc>
483 % \end{macrocode}
484 %
485 % \section{Overview}%
486 % \revtex\ is a \LaTeXe\ document class, somewhat like a hybrid of
487 % the standard \LaTeX\ \classname{book} and \classname{article} classes.
488 %
489 % Certain packages are (should be) loaded by this class in any case:
490 % \classname{amssymb}, \classname{amsmath}, \classname{bm}, \classname{natbib}.
491 %
492 % Certain packages are automatically loaded by this class
493 % when a corresponding class option has been invoked:
494 %
495 % \begin{tabular}{ll}
496 % \textbf{\revtex\ option}&\textbf{package}\\
497 % \classoption{amsfonts}&\classname{amsfonts}\\
498 % \classoption{amssymb}&\classname{amssymb}\\
499 % \classoption{aps}&\classname{overcite}\\
500 % \end{tabular}
501 %
502 % Certain other packages are to be loaded by the
503 % document through explicit use of \cmd\usepackage.
504 % Some mentioned in the user documentation are
505 % \classname{graphicx}, \classname{longtable}, \classname{hyperref},
506 % and \classname{bm}.
507 %
508 % Certain commonly used packages are known to be incompatible with
509 % \revtex, among them \classname{multicol} and \classname{cite}.
510 % If such a package is found to be loaded, \revtex\ issues an error message
511 % and halts the job.
512 % Halting might be considered severe punishment for loading an incompatible
513 % package, but if we were to proceed, an even weirder error might be encountered
514 % further down the road.
515 %
516 % This document class implements the substyle: a set of mutually
517 % exclusive class options that, in this case, allow the
518 % document class to address multiple societies.
519 % It also implements a sub-substyle, giving the
520 % journal of the given society.
521 % Any society may create a substyle;
522 % this file generates one for \classoption{aps}.
523 %
524 % FIXME: should always load the \classname{graphicx} package. No, allow user to load whichever graphics package is desired.
525 %
526 % QUERY: since \classname{amsfonts} and \classname{amssymb} extend
527 % syntax, why not load them in any case?
528 %
529 % Certain processing occurs at the endgame for reading in \revtex, thereby establishing
530 % precedence for assignments to \LaTeX's (and \revtex's) parameters:
531 % \begin{enumerate}
532 % \item
533 % Figure out which society is operative and read in the indicated \file{.rtx} file.
534 % \item
535 % Figure out which journal option is operative and execute the indicated journal command. This may lead to reading in a journal substyle \file{.rtx} file.
536 % \item
537 % Figure out which pointsize is operative and execute the indicateded pointsize command. This may lead to reading in a pointsize \file{.rtx} file.
538 % \item
539 % Execute all of the document's options, in the order declared within the document.
540 % \item
541 % Read in all required packages (like \classname{natbib}, \classname{amsfonts}, \classname{amssymb}), that were determined by class, society, and journal.
542 % \item
543 % The last required package, if existing, is the document's style file, the \file{.rty} file.
544 % Note that the \file{.rty} file can override the assignments of \revtex, society, journal, and required packages, and even load its own packages.
545 % It can also, via appendations to \cmd\setup@hook, override the setup code itself.
546 % \item
547 % Execute all of the setup code accumulated. Such code can be queued by \revtex\ itself, by the society, by the journal, or by the pointsize.
548 % \item
549 % At this point, \revtex\ has completed the process of inputting itself,
550 % and \LaTeX\ will now execute the \cmd\AtEndOfClass\ procedures.
551 % \end{enumerate}
552 %
553 % \revtex\ will have enqueued code to execute at \cmd\AtBeginDocument\ time,
554 % in two different queues.
555 % \cmd\document@inithook\ executes immediately upon encountering the \cmd\begin\env{document} statement,
556 % \cmd\class@documenthook\ at the end of all the code enqueued via \cmd\AtBeginDocument.
557 % \begin{enumerate}
558 % \item
559 % Install procedures to execute at the very end of the class's
560 % \cmd\AtBeginDocument\ processing, such as
561 % \begin{enumerate}
562 % \item
563 % closing out the page grid
564 % \item
565 % putting out the LastPage label.
566 % \item
567 % issuing a \cmd\bibliographystyle\ command, based on the value set
568 % by the society substyle.
569 % \item
570 % setting default values for parameters used in the document.
571 %FIXME: differentiate between class's parameters that can wait until
572 % they are used in the document, and parameters that are used at \cmd\AtBeginDocument\ time.
573 % \end{enumerate}
574 % \item
575 % Install procedures to execute the very last at \cmd\AtEndDocument\ time,
576 % such as the \cmd\clearpage\ processing.
577 % \end{enumerate}
578 %
579 % Certain events are optionally scheduled for \cmd\AtBeginDocument\ time:
580 % \begin{enumerate}
581 % \item
582 % Setting default values for the Booleans and for other procedures used in formatting.
583 % \item
584 % In response to class options options, adjusting parameters and procedures used in formatting.
585 % \item
586 % Implementing the \classoption{eqsecnum} option, if required.
587 % \item
588 % Setting the state engine for data commands.
589 % \item
590 % Memorizing procedures for later use.
591 % \item
592 % Setting type size and area, for use by later calculations.
593 % \end{enumerate}
594 %
595 % Certain events are scheduled for \cmd\class@enddocumenthook\ time:
596 % \begin{enumerate}
597 % \item
598 % Print out the migrated floats or the end notes, if needed.
599 % \item
600 % Close out the page grid.
601 % \item
602 % Label the last page of the document
603 % \item
604 % (\classname{natbib}) prepare to read in the \file{.aux} file.
605 % \end{enumerate}
606 %
607 % \section{Writing journal-specifc extensions to \revtex}
608 %
609 % With this version of \revtex, we introduce a somewhat different
610 % scheme for adapting \revtex\ to the needs of a specific journal.
611 %
612 % To create a journal substyle, you create new class options in
613 % \revtex\ for the society, say \classoption{osa}, and any of that society's journals,
614 % one of which is, say, \classoption{josaa},
615 % using the code for the APS as a guide.
616 % In particular, each of your new options should separately define \cmd\@society\
617 % and \cmd\@journal. That for the former will be the same for
618 % all options relating to a particular society.
619 %
620 % Then, for the society, you create a corresponding \file{.rtx}
621 % file, in our case \file{osa.rtx}.
622 % Within that file, you override procedures and parameter assignments as you see fit.
623 % Ideally they will be generally applicable to all of that society's
624 % journals (see the file \file{aps.rtx} for a realization of this scheme).
625 % Also within that file, you include a
626 % section of code for each journal, that for josaa looks like:
627 % \begin{verbatim}
628 % \@ifx{\@journal\journal@josaa}{%
629 % <code specific to the josaa>
630 % }{}%
631 % \end{verbatim}
632 %
633 % Thus far, the scheme is similar to that used in \revtex\ 3.1.
634 % However, the new scheme does differ from the old in that
635 % the \file{.rtx} file should define no syntactical extensions
636 % to \revtex.
637 %
638 % \section{The \classname{revtex4} Document Class}
639 % Above, we took
640 % advantage of 1) the \LaTeX\ definition of \cmd\ProvidesPackage\ and
641 % 2) that the line of code immediately afterwards follows the \cmd\ProvidesClass\ statement above.
642 % \begin{macrocode}
643 %<*kernel>
644 % \end{macrocode}
645 %
646 % Print a banner in the log:
647 % \begin{macrocode}
648 \GenericInfo{}{\space
649 Copyright (c) 2019 American Physical Society.^^J
650 mailto:[email protected]^^J
651 Licensed under the LPPL:^^Jhttp://www.ctan.org/tex-archive/macros/latex/base/lppl.txt^^J
652 Arthur Ogawa <arthur_ogawa at sbcglobal dot net>^^J
653 Based on work by David Carlisle <david at dcarlisle.demon.co.uk>^^J
654 Version (4.2d--4.2f): Modified by Mark Doyle and Phelype Oleinik^^J
655 \@gobble
656 }%
657 % \end{macrocode}
658 %
659 % \subsection{Compatibility Processing}
660 %
661 % If the document has \cmd\documentstyle|{revtex4}|,
662 % then, instead of attempting to run in compatability mode,
663 % just complain and exit.
664 % \changes{4.0c}{1999/11/13}{Lose compatability mode.}
665 % \begin{macrocode}
666 \if@compatibility
667 \edef\reserved@a{\errhelp{%
668 Change your \string\documentstyle\space statement to
669 \string\documentclass\space and rerun.
670 }}\reserved@a
671 \errmessage{You cannot run \class@name\space in compatability mode}%
672 \expandafter\@@end
673 \fi
674 % \end{macrocode}
675 %
676 %
677 % \section{Extensions to the \LaTeX\ Kernel}
678 %
679 % \begin{macrocode}
680 %</kernel>
681 % \end{macrocode}
682 %
683 % Here, we incorporate the utility, frontmatter, and page grid packages.
684 % The \classname{ltxutil}, \classname{ltxfront}, and \classname{ltxgrid} source are distributed with
685 % \revtex.
686 %
687 % Here begins the \file{options} \textsc{docstrip} module.
688 % \begin{macrocode}
689 %<*options>
690 % \end{macrocode}
691 %
692 % \subsection{Hooks}
693 %
694 % \begin{macro}{\setup@hook}
695 % The procedure
696 % \cmd\setup@hook\
697 % serves as the vehicle for all code that
698 % gives values to the class's parameters once all the
699 % society, journal, options, and packages have been processed.
700 %
701 % Arrange for journal substyles to set their own default values.
702 % \begin{macrocode}
703 \let\setup@hook\@empty
704 % \end{macrocode}
705 % \end{macro}
706 %
707 % After preamble processing is complete,
708 % detect whether package \classname{longtable} has been loaded and patch it.
709 % \begin{macrocode}
710 \appdef\document@inithook{%
711 \switch@longtable
712 \let\LT@makecaption\LT@makecaption@rtx
713 }%
714 % \end{macrocode}
715 %
716 % \begin{macro}{\LT@makecaption}
717 % We override the caption processing method of the \classname{longtable} package:
718 % space below the caption is created via strut instead of whitespace.
719 % \begin{macrocode}
720 \def\LT@makecaption@rtx#1#2#3{%
721 \LT@mcol\LT@cols c{%
722 \hbox to\z@{%
723 \hss
724 \parbox[t]\LTcapwidth{%
725 \sbox\@tempboxa{#1{#2: }#3\unskip\nobreak\vrule\@width\z@\@height\z@\@depth .5\baselineskip}%
726 \ifdim\wd\@tempboxa>\hsize
727 #1{#2: }#3\unskip\nobreak\vrule\@width\z@\@height\z@\@depth .5\baselineskip
728 \else
729 \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
730 \fi
731 \endgraf
732 }%
733 \hss
734 }%
735 }%
736 }%
737 % \end{macrocode}
738 % \end{macro}
739 %
740 % \begin{macro}{\robust@boldmath}
741 % Robustify the \cmd\boldmath command.
742 % If Team \LaTeX\ (or any package) ever gets around to fixing this problem,
743 % we will bow out. (This fix relates to bug \#394.)
744 % \begin{macrocode}
745 \def\protectdef@boldmath{%
746 \expandafter\@ifnotrelax\csname boldmath \endcsname{}{%
747 \class@info{Robustifying \string\LaTeX's \string\boldmath\space command}%
748 \expandafter\let\csname boldmath \endcsname\boldmath
749 \expandafter\def\expandafter\boldmath\expandafter{\expandafter\protect\csname boldmath \endcsname}%
750 }%
751 }%
752 \appdef\document@inithook{%
753 \protectdef@boldmath
754 }%
755 % \end{macrocode}
756 % \end{macro}
757 %
758 % \section{Compatability with the geometry package}
759 %
760 % The \classname{geometry} package of Hideo Umeki provides a way to
761 % specify the metrics of the media and page layout.
762 % We want to ensure that \revtex\ does not foreclose on the use of
763 % this or any other such package, nor to interfere with
764 % explicit assignments of such metric parameters within the
765 % document preamble.
766 %
767 % The \LaTeX\ parameters (resp. \TeX\ primitives) set by \classname{geometry} are:
768 % \cmd\paperwidth, \cmd\paperheight,
769 % \cmd\textwidth, \cmd\textheight,
770 % \cmd\topmargin, \cmd\headheight, \cmd\headsep,
771 % \cmd\footskip, \cmd\skip\cmd\footins,
772 % \cmd\marginparwidth, \cmd\marginparsep,
773 % \cmd\oddsidemargin, \cmd\evensidemargin,
774 % \cmd\columnsep,
775 % \cmd\hoffset, \cmd\voffset, \cmd\mag,
776 % \cmd\if@twocolumn, \cmd\if@twoside, \cmd\if@mparswitch, \cmd\if@reversemargin,
777 %
778 % \revtex's assignments can be overridden by
779 % any package or other statement in the document preamble,
780 % so it should be compatible.
781 %
782 %FIXME: one parameter is rendered semantically void (by \file{ltxgrid.dtx}):
783 % \cmd\if@twocolumn.
784 %
785 % \section{Options}\label{sec:options}%
786 %
787 % \subsection{Define Booleans Used in Options}%
788 % The following Booleans are used within the document class to
789 % allow the document or the substyle to make selections
790 % of formatting.
791 % An explicit document class option overrides an assignment made by a substyle.
792 %
793 % \subsection{Declare Options}%
794 %
795 % \subsubsection{Checkin: for Editorial Use}%
796 % A document class option declaring that the document is being processed by the
797 % editorial staff.
798 %
799 % This option should:
800 % \begin{itemize}
801 % \item
802 % put date in footer along with folio
803 % \item
804 % Have the effect of selecting the \classoption{preprint} class option.
805 % \item
806 % Have the effect of selecting the \classoption{showpacs} class option.
807 % \item
808 % specify that when a float is placed h or H, it will be allowed to break over pages.
809 % (Note: be sure that if the enclosed \env{tabular} has an optional argument, you change it to [v], or remove it entirely.)
810 % \end{itemize}
811 % \changes{4.0c}{1999/11/13}{New option ``checkin''}
812 % \begin{macrocode}
813 \DeclareOption{checkin}{%
814 \@booleantrue\dateinRH@sw
815 \@booleantrue\preprintsty@sw
816 \def\@pointsize{12}%
817 \@booleantrue\showPACS@sw
818 \@booleantrue\showKEYS@sw
819 \def\fp@proc@h{\allow@breaking@tables}%
820 \def\fp@proc@H{\allow@breaking@tables}%
821 }%
822 \@booleanfalse\dateinRH@sw
823 \def\checkindate{\dateinRH@sw{{\tiny(\today)}}{}}%
824 \def\allow@breaking@tables{%
825 \def\array@default{v}% tabular can break over pages
826 \@booleanfalse\floats@sw % table can break over pages
827 }%
828 % \end{macrocode}
829 %
830 % \subsubsection{Preprint Style}%
831 %
832 % \begin{macro}{\preprintsty@sw}
833 % The boolean \cmd\preprintsty@sw\ signifies that
834 % the document is to be formatted in preprint style.
835 % \changes{4.0a}{1998/01/31}{Rearrange the ordering so numerical ones come first. AO: David, what does this mean?}
836 % \changes{4.0a}{1998/06/10}{comma not space between email and homepage}
837 % \changes{4.0b}{1999/06/20}{Move this ``complex'' option to the front, where it can be overridden by ``simple'' options.}
838 % \changes{4.1b}{2008/06/01}{Add option reprint, opposite of preprint, and preferred alternative to twocolumn}
839 % \begin{macrocode}
840 \DeclareOption{preprint}{%
841 \@booleantrue\preprintsty@sw
842 \ExecuteOptions{12pt}%
843 }%
844 \DeclareOption{reprint}{%
845 \@booleanfalse\preprintsty@sw
846 \@booleantrue\twocolumn@sw
847 \ExecuteOptions{10pt}%
848 }%
849 \DeclareOption{manuscript}{%
850 \class@warn{Document class option manuscript is obsolete; use preprint instead}%
851 \ExecuteOptions{preprint}%
852 }%
853 \@booleanfalse\preprintsty@sw
854 % \end{macrocode}
855 % \end{macro}
856 %
857 % \begin{macro}{\showPACS@sw}
858 % \begin{macro}{\showKEYS@sw}
859 % If \cmd\showPACS@sw\ is true, print the PACS information in the title block,
860 % otherwise not.
861 % Similarly for \cmd\showKEYS@sw\ and the keywords.
862 % \subsubsection{Showing PACS and keywords}%
863 % \changes{4.0b}{1999/06/20}{New option}
864 % \changes{4.0e}{2000/09/20}{New option showkeys}
865 % \begin{macrocode}
866 \DeclareOption{showpacs}{%
867 \@booleantrue\showPACS@sw
868 }%
869 \DeclareOption{noshowpacs}{%
870 \@booleanfalse\showPACS@sw
871 }%
872 \DeclareOption{showkeys}{%
873 \@booleantrue\showKEYS@sw
874 }%
875 \DeclareOption{noshowkeys}{%
876 \@booleanfalse\showKEYS@sw
877 }%
878 \@booleanfalse\showPACS@sw
879 \@booleanfalse\showKEYS@sw
880 % \end{macrocode}
881 % \end{macro}
882 % \end{macro}
883 %
884 % \subsubsection{Balance the last page when in two-column page grid}%
885 %
886 % \begin{macro}{\balancelastpage@sw}
887 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
888 % If we are in a two-column page grid, we may wish to balance the columns
889 % of the last page. This will be done automatically if the
890 % \classoption{twocolumn} document class option is chosen.
891 % This action will be turned off by the \classoption{nobalancelastpage}.
892 % A complementary class option, \classoption{balancelastpage} is also provided.
893 % \begin{macrocode}
894 \DeclareOption{balancelastpage}{%
895 \@booleantrue\balancelastpage@sw
896 }%
897 \DeclareOption{nobalancelastpage}{%
898 \@booleanfalse\balancelastpage@sw
899 }%
900 \@booleantrue\balancelastpage@sw
901 % \end{macrocode}
902 % \end{macro}
903 %
904 % \subsubsection{Showing preprint numbers}%
905 %
906 % \begin{macro}{\preprint@sw}
907 % \changes{4.0d}{2000/04/10}{New option}
908 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
909 % \changes{4.1n}{2009/11/06}{(AO, 565) restore 4.0 behavior: default value of \cs{preprint@sw} follows \cs{preprintsty@sw}}
910 % The boolean \cmd\preprint@sw\ signifies that
911 % the preprints (cf. \cmd\preprint) are to be formatted (usually on the title page).
912 % The option \classoption{preprintnumbers} declares to do so,
913 % \classoption{nopreprintnumbers} declares not to;
914 % the default is to follow \cmd\preprintsty@sw.
915 % \begin{macrocode}
916 \DeclareOption{nopreprintnumbers}{\@booleanfalse\preprint@sw}%
917 \DeclareOption{preprintnumbers}{\@booleantrue\preprint@sw}%
918 \appdef\setup@hook{%
919 \@ifxundefined\preprint@sw{\let\preprint@sw\preprintsty@sw}{}%
920 }%
921 % \end{macrocode}
922 % \end{macro}
923 %
924 % \subsubsection{Hypertext Option}%
925 %
926 % \changes{4.0a}{1998/01/31}{protect against hyperref revtex kludges which are not needed now}
927 % \changes{4.0b}{1999/06/20}{Move this ``complex'' option to the front, where it can be overridden by ``simple'' options.}
928 % \changes{4.0rc4}{2001/07/23}{hyperref is no longer loaded via class option: use a usepackage statement instead}
929 % \begin{macrocode}
930 \DeclareOption{hyperref}{%
931 % \end{macrocode}
932 % The following code had been commented out, it is now truly a comment:
933 % \begin{verbatim}
934 %\AtEndOfClass{%
935 % \begingroup
936 % \edef\@tempa{%
937 % \let
938 % \noexpand\@clsextension
939 % \noexpand\@empty
940 % \noexpand\RequirePackage{hyperref}%
941 % \def\noexpand
942 % \@clsextension{\@clsextension}%
943 % }%
944 % \expandafter
945 % \endgroup
946 % \@tempa
947 %}%
948 % \def\@pointsize{10}%
949 % \end{verbatim}
950 %
951 % If you have a hyper-foo enabled browser you may prefer this format
952 % which does not print the URL for the home page, but just makes the
953 % name a link, but by default print it so it works on paper.
954 % \changes{4.0a}{1998/01/31}{print homepage}
955 %
956 % \begin{macrocode}
957 \class@warn{Class option "hyperref" is no longer supported.^^JEmploy \string\usepackage{hyperref} instead}%
958 }%
959 % \end{macrocode}
960 %
961 % \subsubsection{Type Size}%
962 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
963 % Use \cmd\@pointsize|=10| rather than \cmd\@ptsize|=0| to allow easy extensions
964 % to 9pt or whatever.
965 % Note: the three alternatives are mutually exclusive.
966 %
967 % At this point, the parameter \cmd\@pointsize\ is set to \cmd\undefined:
968 % a society \emph{must} give it a definition.
969 % \begin{macrocode}
970 \DeclareOption{10pt}{\def\@pointsize{10}}%
971 \DeclareOption{11pt}{\def\@pointsize{11}}%
972 \DeclareOption{12pt}{\def\@pointsize{12}}%
973 \let\@pointsize\@undefined
974 % \end{macrocode}
975 %
976 % \subsubsection{Media Size}%
977 %
978 % \begin{macro}{\paperheight}
979 % \begin{macro}{\paperwidth}
980 % \changes{4.0b}{1999/06/20}{Restore all media size class option of \protect\file{classes.dtx}}
981 % \begin{macrocode}
982 \DeclareOption{a4paper}{%
983 \setlength\paperheight {297mm}%
984 \setlength\paperwidth {210mm}%
985 }%
986 \DeclareOption{a5paper}{%
987 \setlength\paperheight {210mm}%
988 \setlength\paperwidth {148mm}%
989 }%
990 \DeclareOption{b5paper}{%
991 \setlength\paperheight {250mm}%
992 \setlength\paperwidth {176mm}%
993 }%
994 \DeclareOption{letterpaper}{%
995 \setlength\paperheight {11in}%
996 \setlength\paperwidth {8.5in}%
997 }%
998 \DeclareOption{legalpaper}{%
999 \setlength\paperheight {14in}%
1000 \setlength\paperwidth {8.5in}%
1001 }%
1002 \DeclareOption{executivepaper}{%
1003 \setlength\paperheight {10.5in}%
1004 \setlength\paperwidth {7.25in}%
1005 }%
1006 \DeclareOption{landscape}{%
1007 \setlength\@tempdima {\paperheight}%
1008 \setlength\paperheight {\paperwidth}%
1009 \setlength\paperwidth {\@tempdima}%
1010 }%
1011 % \end{macrocode}
1012 %
1013 % \changes{4.1a}{2008/01/18}{(AO, 478) \cs{ds@letterpaper}, so that ``letterpaper really is the default''}%
1014 % Effectively select \classoption{letterpaper}.
1015 % \begin{macrocode}
1016 \ds@letterpaper
1017 % \end{macrocode}
1018 % \end{macro}
1019 % \end{macro}
1020 %
1021 % \subsubsection{Bibnotes}%
1022 %
1023 % \begin{macro}{\frontmatter@footnote@produce}
1024 % Frontmatter footnotes result from frontmatter commands like
1025 % \cmd\email, \cmd\homepage, \cmd\altaffiliation, and \cmd\thanks.
1026 % The default for \cmd\frontmatter@footnote@produce\ is
1027 % \cmd\frontmatter@footnote@produce@footnote, which formats the frontmatter footnotes
1028 % at the foot of the title page. The \classoption{bibnotes} class option
1029 % defers them to the bibliography.
1030 % \changes{4.1b}{2008/06/01}{(AO) Implement bibnotes through \cs{frontmatter@footnote@produce} instead of \cs{bibnotes@sw}}%
1031 % \begin{macrocode}
1032 \DeclareOption{bibnotes}{\let\frontmatter@footnote@produce\frontmatter@footnote@produce@endnote}%
1033 \DeclareOption{nobibnotes}{\let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote}%
1034 \let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote
1035 \appdef\class@enddocumenthook{\auto@bib}%
1036 % \end{macrocode}
1037 % \end{macro}
1038 %
1039 % \subsubsection{Footinbib}%
1040 %
1041 % \begin{macro}{\footinbib@sw}
1042 % The boolean \cmd\footinbib@sw\ signifies that
1043 % text footnotes are to be set in the bibliography, as endnotes.
1044 %
1045 % The document may set the value one way or the other via
1046 % the following two class options.
1047 % \begin{macrocode}
1048 \DeclareOption{footinbib}{\@booleantrue\footinbib@sw}
1049 \DeclareOption{nofootinbib}{\@booleanfalse\footinbib@sw}
1050 % \end{macrocode}
1051 % The default value is \cmd\false@sw, and the society or journal
1052 % may override the default.
1053 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1054 % \begin{macrocode}
1055 \@booleanfalse\footinbib@sw
1056 % \end{macrocode}
1057 % \end{macro}
1058 %
1059 % \subsubsection{altaffilletter}%
1060 %
1061 % \begin{macro}{\altaffilletter@sw}
1062 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1063 % Determine the procedure \cmd\thefootnote\ used in frontmatter:
1064 % the footnote symbol used in titlepage footnotes.
1065 % \begin{macrocode}
1066 \DeclareOption{altaffilletter}{\@booleantrue\altaffilletter@sw}%
1067 \DeclareOption{altaffilsymbol}{\@booleanfalse\altaffilletter@sw}%
1068 \@booleanfalse\altaffilletter@sw
1069 % \end{macrocode}
1070 % \end{macro}
1071 %
1072 % \subsubsection{superbib}%
1073 %
1074 % \begin{macro}{\place@bibnumber}
1075 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1076 % The procedure \cmd\place@bibnumber\ produces the number
1077 % at the head of the \cmd\bibitem, in the bibliography.
1078 % By default, it has the \cmd\bibnumfmt\ meaning assigned by the \classname{natbib} package.
1079 % It may be overridden by society, journal, or by the document options.
1080 %
1081 % \begin{macrocode}
1082 \DeclareOption{superbib}{%
1083 \let\place@bibnumber\place@bibnumber@sup
1084 }%
1085 \def\place@bibnumber{\NATx@bibnumfmt}%
1086 % \end{macrocode}
1087 % \end{macro}
1088 %
1089 % \begin{macro}{\place@bibnumber@sup}
1090 % \begin{macro}{\place@bibnumber@inl}
1091 % For producing the \cmd\bibitem\ device,
1092 % we define two procedures to select from.
1093 %
1094 % Note that we could have used \classname{natbib}'s \cmd\ifNAT@super\
1095 % switch, but it does not allow for altering the meaning of \cmd\bibnumfmt.
1096 % \begin{macrocode}
1097 \def\place@bibnumber@sup#1{\textsuperscript{#1}}%
1098 \def\place@bibnumber@inl#1{[#1]}%
1099 % \end{macrocode}
1100 % \end{macro}
1101 % \end{macro}
1102 %
1103 % \subsubsection{citeautoscript}%
1104 % \begin{macro}{\citeautoscript@sw}
1105 % This class option allows you to automatically accomodate a change from non-superscripted, numbered references
1106 % to superscripted, bunmbered references.
1107 %
1108 % Note: you should always mark up your document with the assumption that references are \emph{not} going to be superscripted.
1109 % Otherwise this option has no hope of working properly.
1110 %
1111 % \begin{macrocode}
1112 \DeclareOption{citeautoscript}{\@booleantrue\citeautoscript@sw}%
1113 \@booleanfalse\citeautoscript@sw
1114 % \end{macrocode}
1115 % \end{macro}
1116 %
1117 % \subsubsection{Variants on the Bibliography Style}%
1118 % \changes{4.1b}{2008/07/01}{(AO) provide option longbibliography}
1119 %
1120 % \revtex\ anticipates that a society or journal will provide two related Bib\TeX bibliography style variants,
1121 % designating one as the default.
1122 % A pair of document class options \classoption{longbibliography} and \classoption{nolongbibliography}
1123 % allows the user to explicitly select between them.
1124 % \begin{macro}{\longbibliography@sw}
1125 %
1126 %\changes{4.2a}{2017/11/21}{(MD) Make long bibliography style the default now.}
1127 % \revtex's default for \cmd\longbibliography@sw\ is \cmd\true@sw.
1128 %
1129 % \begin{macrocode}
1130 \DeclareOption{longbibliography}{\@booleantrue\longbibliography@sw}%
1131 \DeclareOption{nolongbibliography}{\@booleanfalse\longbibliography@sw}%
1132 \@booleantrue\longbibliography@sw
1133 % \end{macrocode}
1134 % \end{macro}
1135 %
1136 % \begin{macro}{\eprint@enable@sw}
1137 % \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.}
1138 %
1139 % The document class options \classoption{eprint} and \classoption{noeprint}
1140 % give the user the ability to turn off production of the \texttt{eprint} field in the bibliography.
1141 % \begin{macrocode}
1142 \DeclareOption{eprint}{\@booleantrue\eprint@enable@sw}%
1143 \DeclareOption{noeprint}{\@booleanfalse\eprint@enable@sw}%
1144 \@booleantrue\eprint@enable@sw
1145 % \end{macrocode}
1146 % \end{macro}
1147 %
1148 % \subsubsection{Simplex/Duplex Pages}%
1149 %
1150 % \begin{macro}{\twoside@sw}
1151 % \changes{4.1b}{2008/07/01}{(AO) coordinate \cs{if@twoside} with \cs{twoside@sw}}
1152 % The flag \cmd\twoside@sw\ signifies that the document is to be
1153 % formatted for duplex printing.
1154 % After the preamble is processed, we align the value
1155 % of the kernel \cmd\newif\ switch \cmd\if@twoside\
1156 % to that of \cmd\twoside@sw.
1157 % \cmd\if@twoside\ itself is used in the kernel's
1158 % \cmd\cleardoublepage\ and \cmd\@outputpage\ procedures.
1159 % \begin{macrocode}
1160 \@booleanfalse\twoside@sw
1161 \appdef\document@inithook{%
1162 \twoside@sw{\@twosidetrue}{\@twosidefalse}%
1163 }%
1164 % \end{macrocode}
1165 % \changes{4.0a}{1998/01/31}{4.d had twoside option setting twoside switch to false}
1166 % The complementary options \classoption{twoside} and \classoption{oneside}
1167 % assert formatting for duplex or simplex printing, respectively.
1168 % At the same time, we arrange for the selection of the page grid
1169 % with respect to the marginal column:
1170 % Because \cmd\if@reversemargin\ remains default (false),
1171 % if duplex printing, this column will always be on the (right),
1172 % if simplex printing, it will always be on the (outside).
1173 % QUERY: correct choice?
1174 %FIXME: assign \cmd\if@mparswitch\ later (and protect the assignment, too).
1175 % \begin{macrocode}
1176 \DeclareOption{twoside}{\@booleantrue \twoside@sw\@mparswitchfalse}%
1177 \DeclareOption{oneside}{\@booleanfalse\twoside@sw\@mparswitchtrue}%
1178 % \end{macrocode}
1179 % \end{macro}
1180 %
1181 % \subsubsection{Two-Column Page Grid}%
1182 %
1183 % \begin{macro}{\twocolumn@sw}
1184 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1185 % \changes{4.1p}{2010/02/24}{(AO, 583) Provide interface to \classname{ltxgrid} \cs{onecolumn@grid@setup} and \cs{twocolumn@grid@setup}}
1186 % The flag \cmd\twocolumn@sw\ signifies that the document is to be
1187 % formatted in the two-column page grid.
1188 %
1189 % If no options relating to page grid are invoked by
1190 % \cmd\AtBeginDcoument\ time, we set default values.
1191 % Up to that point, the class can check if \cmd\twocolumn@sw\
1192 % is \cmd\undefined\ to see if any related options have been invoked.
1193 %
1194 % \classoption{onecolumn} specifies one-column page grid.
1195 % The \classoption{twocolumn} class option employs the standard mechanism for
1196 % changing the column grid: the \classname{ltxgrid} package.
1197 % \begin{macrocode}
1198 \DeclareOption{onecolumn}{\@booleanfalse\twocolumn@sw}%
1199 \DeclareOption{twocolumn}{\@booleantrue\twocolumn@sw}%
1200 \@booleanfalse\twocolumn@sw
1201 % \end{macrocode}
1202 % The column grid is determined by the state of the switch \cmd\twocolumn@sw
1203 % and is effected at \cmd\class@documenthook\ time.
1204 % The society or journal file may re-define \cmd\select@column@grid\
1205 % to accomodate, e.g., more than two choices for the page grid.
1206 %
1207 % Note that \cmd\open@column@two\ adds items to the Main Vertical List,
1208 % so constitutes the true beginning of the document.
1209 %
1210 % Note also that if the selected column grid is a one-column grid,
1211 % there is nothing to do, because \classname{ltxgrid} has already
1212 % set that up via \cmd\@begindocumenthook.
1213 % \begin{macrocode}
1214 \def\select@column@grid{%
1215 \twocolumn@sw{%
1216 \twocolumn@grid@setup
1217 \open@twocolumn
1218 }{%
1219 \onecolumn@grid@setup
1220 % \end{macrocode}
1221 % \begin{verbatim}
1222 % \open@onecolumn
1223 % \end{verbatim}
1224 % \begin{macrocode}
1225 }%
1226 }%
1227 \appdef\class@documenthook{%
1228 \select@column@grid
1229 }%
1230 % \end{macrocode}
1231 %
1232 % \end{macro}
1233 %
1234 % \begin{macro}{\clear@document}
1235 % \changes{4.1n}{2009/12/05}{(AO, 569) Use of \classname{hyperref} interferes with column balancing of last page}%
1236 %
1237 % We install into \cmd\class@enddocumenthook\
1238 % a trap for the procedure \cmd\clearpage\ that attempts to end the current page.
1239 % This procedure needs to be headpatched with \cmd\close@column\ to end the current page grid.
1240 %
1241 % This procedure is executed after all typesetting is complete
1242 % i.e., after items like \cmd\printtables, as well as all commands queued up by \cmd\AtEndDocument.
1243 %
1244 % \begin{macrocode}
1245 \appdef\setup@hook{%
1246 \let\clearpage@ltx\clearpage
1247 \prepdef\clear@document{\let\clearpage\clearpage@ltx\let\clear@document\@empty\close@column}%
1248 \appdef\class@documenthook{%
1249 \appdef\class@enddocumenthook{%
1250 \let\clearpage\clear@document
1251 }%
1252 }%
1253 }%
1254 % \end{macrocode}
1255 %
1256 % \end{macro}
1257 %
1258 % \begin{macro}{\authoryear@sw}
1259 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
1260 % The boolean \cmd\authoryear@sw\ signifies that we are to use author-year citations rather than numerical citations.
1261 %
1262 % The \classoption{author-year} class option selects ``'author-year'' citations;
1263 % \classoption{numerical} selectes ``numerical'' citations.
1264 % The former is the default.
1265 % \begin{macrocode}
1266 \DeclareOption{author-year}{\@booleantrue\authoryear@sw}%
1267 \DeclareOption{numerical}{\@booleanfalse\authoryear@sw}%
1268 \@booleanfalse\authoryear@sw
1269 % \end{macrocode}
1270 % \end{macro}
1271 %
1272 % \begin{macro}{\galley@sw}
1273 % The boolean \cmd\galley@sw\ signifies that
1274 % the document is to be formatted in galley style.
1275 %
1276 % Asserting both \cmd\galley@sw\ and \cmd\preprintsty@sw\
1277 % may produce strange formatting results, but it is not illegal.
1278 % However, it \emph{is} illegal to assert galley and any
1279 % twocolumn option.
1280 % \begin{macrocode}
1281 % \end{macrocode}
1282 % \classoption{galley} emulates setting the galleys of
1283 % a two-column journal.
1284 % CHANGED: this option should effectively set \cmd\preprintsty@sw\ false.
1285 % NOTE: it makes no sense to assert both galley and twocolumn.
1286 % \changes{4.1b}{2008/07/01}{Class option galley sets \cs{preprintsty@sw} to false}
1287 %
1288 % \begin{macrocode}
1289 \DeclareOption{galley}{%
1290 \ExecuteOptions{onecolumn}%
1291 \@booleantrue\galley@sw
1292 \@booleanfalse\preprintsty@sw
1293 \appdef\setup@hook{%
1294 \advance\textwidth-\columnsep
1295 \textwidth.5\textwidth
1296 }%
1297 }%
1298 \@booleanfalse\galley@sw
1299 % \end{macrocode}
1300 % \end{macro}
1301 %
1302 % \subsubsection{raggedbottom or flushbottom}%
1303 % \begin{macro}{\raggedcolumn@sw}
1304 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1305 % The class options \classoption{raggedbottom} and \classoption{flushbottom} determine whether the columns (page)
1306 % are ragged bottom or flush bottom.
1307 % Note that we do not select a default here; that is done by the journal substyle.
1308 % \begin{macrocode}
1309 \DeclareOption{raggedbottom}{\@booleantrue\raggedcolumn@sw}
1310 \DeclareOption{flushbottom}{\@booleanfalse\raggedcolumn@sw}
1311 \@booleanfalse\raggedcolumn@sw
1312 \appdef\setup@hook{%
1313 \raggedcolumn@sw{\raggedbottom}{\flushbottom}%
1314 }%
1315 % \end{macrocode}
1316 % \end{macro}
1317 %
1318 % \subsubsection{tightenlines}%
1319 %
1320 % This class option specifies that standard leading
1321 % is to be used to set the type.
1322 % If lacking, the leading will be loose.
1323 %
1324 % \begin{macro}{\tightenlines@sw}
1325 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1326 % The boolean \cmd\tightenlines@sw\ signifies that
1327 % the leading is to be made standard amount.
1328 % If false, it means that the leading is to be set extra open.
1329 % Has no effect on 10pt size option.
1330 %
1331 % \begin{macrocode}
1332 \DeclareOption{tightenlines}{\@booleantrue\tightenlines@sw}
1333 \@booleanfalse\tightenlines@sw
1334 % \end{macrocode}
1335 % \end{macro}
1336 %
1337 % \subsubsection{lengthcheck}%
1338 %
1339 % \begin{macro}{\lengthcheck@sw}
1340 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1341 % The flag \cmd\lengthcheck@sw\ signifies that
1342 % the length checking is in effect.
1343 % It is up to the individual journal substyle
1344 % to alter its formatting accordingly.
1345 % \begin{macrocode}
1346 \@booleanfalse\lengthcheck@sw
1347 % \end{macrocode}
1348 % This class option specifies that the formatted document
1349 % should approach as closely as possible the
1350 % formatting of an actual journal article
1351 % to facilitate the author's performance of a length check.
1352 %
1353 %FIXME: society or journal may have its own definition of this option.
1354 % \begin{macrocode}
1355 \DeclareOption{lengthcheck}{%
1356 \@booleantrue\lengthcheck@sw
1357 \ExecuteOptions{reprint}%
1358 }%
1359 % \end{macrocode}
1360 % In addition, if length checking is in effect, we will enable
1361 % the tally of text length.
1362 % \begin{macrocode}
1363 \appdef\setup@hook{%
1364 \lengthcheck@sw{\@booleantrue\tally@box@size@sw}{}%
1365 }%
1366 % \end{macrocode}
1367 % \end{macro}
1368 %
1369 % \subsubsection{Draft and Final}%
1370 %
1371 % \begin{macro}{\draft@sw}
1372 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1373 % The flag \cmd\draft@sw\ signifies that the document is to be
1374 % formatted in draft mode.
1375 %
1376 % \begin{macrocode}
1377 \appdef\setup@hook{%
1378 \draft@sw{\overfullrule 5\p@}{\overfullrule\z@}%
1379 }%
1380 % \end{macrocode}
1381 %
1382 % Certain packages may pay attention to the
1383 % class option \classoption{draft} that sets this Boolean.
1384 % \begin{macrocode}
1385 \DeclareOption{draft}{\@booleantrue\draft@sw}%
1386 \DeclareOption{final}{\@booleanfalse\draft@sw}%
1387 \@booleanfalse\draft@sw
1388 % \end{macrocode}
1389 %
1390 % \end{macro}
1391 %
1392 % \subsubsection{eqsecnum}%
1393 %
1394 % \begin{macro}{\eqsecnum@sw}
1395 % The flag \cmd\eqsecnum@sw\ signifies that equations are to be
1396 % numbered with the section, e.g., ``Eq. (2.13)''.
1397 % \begin{macrocode}
1398 \appdef\setup@hook{%
1399 \eqsecnum@sw{%
1400 \@addtoreset{equation}{section}%
1401 \def\theequation@prefix{\arabic{section}.}%
1402 }{}%
1403 }%
1404 % \end{macrocode}
1405 %
1406 % The \classoption{eqsecnum} class option signifies that equations are
1407 % to be numbered within sections.
1408 % \begin{macrocode}
1409 \DeclareOption{eqsecnum}{\@booleantrue\eqsecnum@sw}%
1410 \@booleanfalse\eqsecnum@sw
1411 % \end{macrocode}
1412 % \end{macro}
1413 %
1414 % \subsubsection{secnumarabic}%
1415 % \changes{4.1b}{2008/07/01}{(AO) No longer use \cs{secnumarabic@sw}, instead use \cs{setup@secnums}}
1416 % The \classoption{secnumarabic} class option signifies that sectioning commands are
1417 % to be numbered arabic:
1418 % the procedure \cmd\secnums@arabic\ is executed as the default.
1419 % Otherwise, the procedure \cmd\secnums@rtx\ determines things.
1420 % The society or journal may redefine either procedure,
1421 % and may change the definition of \cmd\setup@secnums\ itself,
1422 % thereby establishing a different default.
1423 % \begin{macrocode}
1424 \appdef\setup@hook{%
1425 \setup@secnums
1426 }%
1427 \DeclareOption{secnumarabic}{%
1428 \def\setup@secnums{\secnums@arabic}%
1429 }%
1430 \def\setup@secnums{\secnums@rtx}%
1431 % \end{macrocode}
1432 % The code that defines \cmd\secnums@rtx\ and \cmd\secnums@arabic\ appears
1433 % in Section~\ref{sec:secnumarabic}.
1434 %
1435 % \begin{macro}{fleqn}
1436 % FIXME: model fleqn after amsfonts. I no longer understand why I said this.
1437 % \file{fleqn.clo} is not a package, so it can simply be \cmd\input.
1438 % \begin{macrocode}
1439 \DeclareOption{fleqn}{%
1440 \input{fleqn.clo}%
1441 }%
1442 % \end{macrocode}
1443 % \end{macro}
1444 %
1445 % \subsubsection{floats/endfloats}%
1446 %
1447 % \begin{macro}{\floats@sw}
1448 % \begin{macro}{\floatp@sw}
1449 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1450 % The Boolean \cmd\floats@sw\ signifies that floats are to be floated;
1451 % if false, that floats are to be deferred to the end of the document.
1452 % By default, the former.
1453 % Note that the state of this Boolean is to be changed by
1454 % the document class in response to user-selected options.
1455 %
1456 % This boolean and the assignment of its default value is done by
1457 % the \classname{ltxutil} package.
1458 %
1459 % The Boolean \cmd\floatp@sw\ signifies that endfloats are to be set one per page;
1460 % if false, that endfloats are to be set with multiple floats per page permitted.
1461 % By default, the latter.
1462 % Note that the state of this Boolean is to be changed by
1463 % the document class in response to user-selected options.
1464 % The default is established here.
1465 %
1466 % These options control, via the Boolean \cmd\floats@sw,
1467 % whether floats are to be migrated to the end of the document.
1468 % \begin{macrocode}
1469 \DeclareOption{floats}{\@booleantrue\floats@sw\@booleanfalse\floatp@sw}
1470 \DeclareOption{endfloats}{\@booleanfalse\floats@sw\@booleanfalse\floatp@sw}
1471 \DeclareOption{endfloats*}{\@booleanfalse\floats@sw\@booleantrue\floatp@sw}
1472 \@booleantrue\floats@sw
1473 \@booleantrue\floatp@sw
1474 % \end{macrocode}
1475 % \end{macro}
1476 % \end{macro}
1477 %
1478 % \subsubsection{titlepage/notitlepage}%
1479 % These options control, via \cmd\titlepage@sw,
1480 % whether the title block is to be set on a separate page.
1481 %
1482 % \begin{macro}{\titlepage@sw}
1483 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1484 % The flag \cmd\titlepage@sw\ signifies that a forced
1485 % page break is to follow the title page: the article
1486 % title appears on a page by itself.
1487 %
1488 % \begin{macrocode}
1489 \DeclareOption{titlepage}{\@booleantrue\titlepage@sw}
1490 \DeclareOption{notitlepage}{\@booleanfalse\titlepage@sw}
1491 \@booleanfalse\titlepage@sw
1492 % \end{macrocode}
1493 % \end{macro}
1494 %
1495 % \subsubsection{Substyle and Sub-substyle}%
1496 %
1497 % \begin{macro}{\change@society}
1498 % \begin{macro}{\change@journal}
1499 % \changes{4.1b}{2008/07/01}{(AO) Provide more diagnostics when \cs{@society} is assigned.}
1500 % If the society or, resp., journal has already been assigned,
1501 % notify user whether it is being overridden.
1502 %
1503 % \begin{macrocode}
1504 \def\change@society#1{%
1505 \def\@tempa{#1}%
1506 \@ifxundefined\@society{%
1507 \class@info{Selecting society \@tempa}%
1508 \let\@society\@tempa
1509 }{%
1510 \@ifx{\@tempa\@society}{}{%
1511 \class@warn{Conflicting society \@tempa<>\@society; not selected}%
1512 }%
1513 }%
1514 }%
1515 \def\change@journal#1{%
1516 \def\@tempa{#1}%
1517 \@ifxundefined\@journal{%
1518 \class@info{Selecting journal \@tempa}%
1519 \let\@journal\@tempa
1520 }{%
1521 \@ifx{\@tempa\@journal}{}{%
1522 \class@warn{Conflicting journal \@tempa<>\@journal; not selected}%
1523 }%
1524 }%
1525 }%
1526 % \end{macrocode}
1527 % \end{macro}
1528 % \end{macro}
1529 %
1530 % Here had been the class options relating to the APS.
1531 % Now that all societies are on an equal footing, this code is in the
1532 % respective \file{.rtx} file.
1533 % \begin{macrocode}
1534 % \end{macrocode}
1535 %
1536 % \subsubsection{Optical Society of America}%
1537 % Here are the class options relating to the Optical Society of America.
1538 %
1539 % Note: as of 2008, the only OSA module being distributed by ctan is \file{osajnl.rtx}.
1540 % The class options declared here are, I think, unused.
1541 % \begin{macrocode}
1542 \DeclareOption{osa}{\change@society{osa}\let\@journal\@undefined}%
1543 \DeclareOption{osameet}{\change@society{osa}\def\@journal{osameet}}%
1544 \DeclareOption{opex}{\change@society{osa}\def\@journal{opex}}%
1545 \DeclareOption{tops}{\change@society{osa}\def\@journal{tops}}%
1546 \DeclareOption{josa}{\change@society{osa}\def\@journal{josa}}%
1547 % \end{macrocode}
1548 %
1549 % \begin{macro}{\rtx@require@packages}
1550 % \changes{4.1b}{2008/07/01}{Read in all required packages together}
1551 % The procedure \cmd\rtx@require@packages\ accumulates all \cmd\RequirePackage\ statements
1552 % in the course of loading the document class.
1553 % Carrying out these operations at that time is needed:
1554 % \cmd\ProcessOptions\ must be executed first.
1555 % \begin{macrocode}
1556 \let\rtx@require@packages\@empty
1557 % \end{macrocode}
1558 % \end{macro}
1559 %
1560 % \begin{macro}{\MakeUppercase}
1561 % \begin{macro}{\MakeLowercase}
1562 % \changes{4.1b}{2008/07/01}{Package textcase is now simply a required package}
1563 % \changes{4.1b}{2008/07/01}{Read in all required packages together}
1564 % \changes{4.1g}{2009/10/07}{(AO, 538) \cs{MakeTextUppercase} inappropriately expands the double backslash}
1565 % We load the \classname{textcase} package of David Carlisle.
1566 % Now that its bug of long standing has been repaired, we no longer need to doctor it up.
1567 % And, because its loading has been deferred until \cmd\rtx@require@packages\ time,
1568 % we no longer override \LaTeX\ here. Instead, the \classname{textcase} package
1569 % will be asked to do that.
1570 % \begin{macrocode}
1571 \appdef\rtx@require@packages{%
1572 \RequirePackage[overload]{textcase}%
1573 }%
1574 % \end{macrocode}
1575 % The following code used to
1576 % let the \classname{textcase} commands override those of \LaTeX:
1577 % \begin{verbatim}
1578 %\appdef\setup@hook{%
1579 % \expandafter
1580 % \let\csname MakeUppercase \expandafter\endcsname
1581 % \csname MakeTextUppercase \endcsname
1582 % \expandafter
1583 % \let\csname MakeLowercase \expandafter\endcsname
1584 % \csname MakeTextLowercase \endcsname
1585 % }%
1586 % \end{verbatim}
1587 % \end{macro}
1588 % \end{macro}
1589 %
1590 % \begin{macro}{amsfonts}
1591 % \changes{4.1b}{2008/07/01}{Read in all required packages together}
1592 % The class option \classoption{amsfonts} has the
1593 % same effect as if the document preamble contained
1594 % a \cmd\usepackage\verb${amsfonts}$ statement.
1595 % \begin{macrocode}
1596 \DeclareOption{amsfonts}{%
1597 \def\class@amsfonts{\RequirePackage{amsfonts}}%
1598 }%
1599 \DeclareOption{noamsfonts}{%
1600 \let\class@amsfonts\@empty
1601 }%
1602 \appdef\rtx@require@packages{%
1603 \@ifxundefined\class@amsfonts{}{\class@amsfonts}%
1604 }%
1605 % \end{macrocode}
1606 % \end{macro}
1607 %
1608 % \begin{macro}{amssymb}
1609 % \changes{4.1b}{2008/07/01}{Read in all required packages together}
1610 % The class option \classoption{amssymb} has the
1611 % same effect as if the document preamble contained
1612 % a \cmd\usepackage\verb${amssymb}$ statement.
1613 % \begin{macrocode}
1614 \DeclareOption{amssymb}{%
1615 \def\class@amssymb{\RequirePackage{amssymb}}%
1616 }%
1617 \DeclareOption{noamssymb}{%
1618 \let\class@amssymb\@empty
1619 }%
1620 \appdef\rtx@require@packages{%
1621 \@ifxundefined\class@amssymb{}{\class@amssymb}%
1622 }%
1623 % \end{macrocode}
1624 % \end{macro}
1625 %
1626 % \begin{macro}{amsmath}
1627 % \changes{4.1b}{2008/07/01}{Read in all required packages together}
1628 % The class option \classoption{amsmath} has the
1629 % same effect as if the document preamble contained
1630 % a \cmd\usepackage\verb${amsmath}$ statement.
1631 %
1632 % We require version 1.2 (datestamped 1997/03/20) or later.
1633 % The \expandafter\cmd\csname [email protected]\endcsname, will
1634 %
1635 % \LaTeX\ note:
1636 % Certain \LaTeX\ procedures have an arbitrary and pointless restriction that they may be used only within the preamble.
1637 % We get around this by preserving the procedures in private \cmd\csname s.
1638 %
1639 % FIXME note: it is difficult to ensure that an error summary will be printed on the console at the very end,
1640 % but \classname{ltxgrid} allows accomplishing this via an interrupt, put down at \cmd\AtEndDocument\ time.
1641 %
1642 % \begin{macrocode}
1643 \DeclareOption{amsmath}{%
1644 \def\class@amsmath{\RequirePackage{amsmath}[\ver@amsmath@prefer]}%
1645 }%
1646 \DeclareOption{noamsmath}{%
1647 \let\class@amsmath\@empty
1648 }%
1649 \appdef\rtx@require@packages{%
1650 \preserve@LaTeX
1651 \@ifxundefined\class@amsmath{}{\class@amsmath}%
1652 \appdef\class@enddocumenthook{\test@amsmath@ver}%
1653 }%
1654 \appdef\preserve@LaTeX{%
1655 \let\@ifl@aded@LaTeX\@ifl@aded
1656 \let\@ifpackageloaded@LaTeX\@ifpackageloaded
1657 \let\@pkgextension@LaTeX\@pkgextension
1658 \let\@ifpackagelater@LaTeX\@ifpackagelater
1659 \let\@ifl@ter@LaTeX\@ifl@ter
1660 \let\@ifl@t@r@LaTeX\@ifl@t@r
1661 \let\@parse@version@LaTeX\@parse@version
1662 }%
1663 \appdef\restore@LaTeX{%
1664 \let\@ifl@aded\@ifl@aded@LaTeX
1665 \let\@ifpackageloaded\@ifpackageloaded@LaTeX
1666 \let\@pkgextension\@pkgextension@LaTeX
1667 \let\@ifpackagelater\@ifpackagelater@LaTeX
1668 \let\@ifl@ter\@ifl@ter@LaTeX
1669 \let\@ifl@t@r\@ifl@t@r@LaTeX
1670 \let\@parse@version\@parse@version@LaTeX
1671 }%
1672 \def\test@amsmath@ver{%
1673 \begingroup
1674 \restore@LaTeX
1675 \@ifpackageloaded{amsmath}{%
1676 \@ifpackagelater{amsmath}{\ver@amsmath@prefer}{}{%
1677 \class@warn{%
1678 You have loaded amsmath, version "\csname [email protected]\endcsname",\MessageBreak
1679 but this class requires version "\ver@amsmath@prefer", or later.\MessageBreak
1680 Please update your LaTeX installation.
1681 }%
1682 }%
1683 }{%
1684 }%
1685 \endgroup
1686 }%
1687 \def\ver@amsmath@prefer{2000/01/15 v2.05 AMS math features}%
1688 % \end{macrocode}
1689 % \end{macro}
1690 %
1691 % \subsubsection{Presenting Authors and Their Affiliations}%
1692 % \changes{4.1b}{2008/07/01}{Code relating to new syntax for frontmatter has been placed in \file{ltxfront.dtx}}
1693 % Class options for presenting authors and their affiliations are now defined in
1694 % \file{ltxfront.dtx}.
1695 %
1696 % \begin{macrocode}
1697 % \end{macrocode}
1698 %
1699 % \subsubsection{Typeset by \revtex}%
1700 %
1701 % \begin{macro}{\byrevtex@sw}
1702 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1703 % The flag \cmd\byrevtex@sw\ signifies that the document should
1704 % bear an imprint to the effect that it was formatted by this document class.
1705 %
1706 % The class option \classoption{byrevtex} signifies that you want the
1707 % ``Typeset by \revtex'' byline to appear on your formatted output.
1708 % By default, no such byline appears.
1709 % \begin{macrocode}
1710 \DeclareOption{byrevtex}{\@booleantrue\byrevtex@sw}%
1711 \@booleanfalse\byrevtex@sw
1712 % \end{macrocode}
1713 % \end{macro}
1714 %
1715 % \subsection{Attempt to fix float placement failure}%
1716 %
1717 % \begin{macro}{\force@deferlist@sw}
1718 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
1719 % \revtex\ uses the \classname{ltxgrid} package, which provides the ability to attempt repairs when
1720 % \LaTeX's float placement mechanism is about to fail, but that facility is turned off by default.
1721 % Users should invoke the \classoption{floatfix} document class option to enable this \LaTeX\ extension.
1722 % If not, a helpful message is printed in the log, indicating how to work around the difficulty.
1723 % \begin{macrocode}
1724 \DeclareOption{floatfix}{\@booleantrue\force@deferlist@sw}%
1725 \DeclareOption{nofloatfix}{\@booleanfalse\force@deferlist@sw}%
1726 \@booleanfalse\force@deferlist@sw
1727 % \end{macrocode}
1728 % \end{macro}
1729 %
1730 % \begin{macro}{\@fltovf}
1731 % \begin{macro}{\@fltstk}
1732 % The \LaTeX\ kernel error message \cmd\@fltovf\ may now be a bit more helpful to the user;
1733 % likewise for the \cmd\@fltstk\ message of \classname{ltxgrid}.
1734 % \begin{macrocode}
1735 \gdef\@fltovf{%
1736 \@latex@error{%
1737 Too many unprocessed floats%
1738 \force@deferlist@sw{}{; try class option [floatfix]}%
1739 }\@ehb
1740 }%
1741 \def\@fltstk{%
1742 \@latex@warning{%
1743 A float is stuck (cannot be placed)%
1744 \force@deferlist@sw{}{; try class option [floatfix]}%
1745 }%
1746 }%
1747 % \end{macrocode}
1748 % \end{macro}
1749 % \end{macro}
1750 %
1751 % \begin{macro}{\ltxgrid@info@sw}
1752 % \begin{macro}{\outputdebug@sw}
1753 % The two options \classoption{ltxgridinfo} and \classoption{outputdebug} turn on informative diagnostics within the
1754 % package \classname{ltxgrid}. Only people who really want to see this output will select these class options.
1755 % Consult documentation for the \classname{ltxgrid} package to see what output the related switches enable.
1756 % \begin{macrocode}
1757 \DeclareOption{ltxgridinfo}{%
1758 \@booleantrue\ltxgrid@info@sw
1759 %\@booleantrue\ltxgrid@foot@info@sw
1760 }%
1761 \DeclareOption{outputdebug}{%
1762 \@booleantrue\outputdebug@sw
1763 \@booleantrue\ltxgrid@info@sw
1764 \@booleantrue\ltxgrid@foot@info@sw
1765 \traceoutput
1766 }%
1767 % \end{macrocode}
1768 % \end{macro}
1769 % \end{macro}
1770 %
1771 % \subsection{Option to relax page height}%
1772 %
1773 % \begin{macro}{\textheight@sw}
1774 % The \classname{ltxgrid} package can set text pages to their natural height or force them to the full
1775 % text height; the latter is the default.
1776 % If setting the pages with a variable length,
1777 % the running foot will move up or down with the natural length of the text column.
1778 % While I recommend against doing so, this option will turn that switch to the latter setting.
1779 % \begin{macrocode}
1780 \DeclareOption{raggedfooter}{\@booleanfalse\textheight@sw}%
1781 \DeclareOption{noraggedfooter}{\@booleantrue\textheight@sw}%
1782 % \end{macrocode}
1783 % \end{macro}
1784 %
1785 % \subsection{Selecting procedure for processing abstract}%
1786 % \changes{4.1b}{2008/07/01}{Remove options newabstract and oldabstract}
1787 % Code defining options \classoption{newabstract} and \classoption{oldabstract} has been removed.
1788 %
1789 % \subsection{Option to turn on diagnostics in the frontmatter}%
1790 %
1791 % \begin{macro}{\frontmatterverbose@sw}
1792 % \changes{4.1b}{2008/07/01}{Code relating to new syntax for frontmatter has been placed in \file{ltxfront.dtx}}
1793 % A diagnostic option, not for the average enduser, which reveals
1794 % the workings of the frontmatter.
1795 % This code interfaces to that of \file{ltxfront.dtx}.
1796 % \begin{macrocode}
1797 \DeclareOption{frontmatterverbose}{\@booleantrue\frontmatterverbose@sw}%
1798 \@booleanfalse\frontmatterverbose@sw
1799 % \end{macrocode}
1800 % \end{macro}
1801 %
1802 % \begin{macro}{\linenumbers@sw}
1803 % \changes{4.1f}{2009/07/07}{(AO, 513) Add class option linenumbers: number the lines a la \classname{lineno}}
1804 % \changes{4.1n}{2009/12/13}{(AO, 573) arrange to load \classname{lineno} after any other packages.}%
1805 % An option to number the lines of type in the output in the manner of \classname{lineno}.
1806 %
1807 % At present, we use that very package to implement this functionality.
1808 % This means that users may modify the workings of that package per its documentation (which see).
1809 %
1810 % However, compatibility with \classname{amsmath} requires that \classname{lineno} be loaded afterwards.
1811 % Therefore, we defer loading of this package until after the preamble is completed.
1812 % \begin{macrocode}
1813 \DeclareOption{linenumbers}{%
1814 \appdef
1815 \class@documenthook{%
1816 \RequirePackage{lineno}[2005/11/02 v4.41]%
1817 \linenumbersep4pt\relax
1818 \linenumbers\relax
1819 }%
1820 }%
1821 % \end{macrocode}
1822 % By default, line numbering is off.
1823 % \end{macro}
1824 %
1825 % \begin{macro}{\NAT@merge}
1826 % \changes{4.1f}{2009/07/15}{(AO, 523) Add class option nomerge, to turn off new natbib 8.3 syntax}
1827 % Add class option nomerge, to turn off natbib 8.3 syntax for citation key.
1828 % The default value of REVTeX 4.1 for \cmd\NAT@merge is \cmd\thr@@, which turns on
1829 % the new syntax along with its semantics.
1830 % Legacy documents that would be incompatible with the new syntax can be successfully processed
1831 % with class option \classoption{nomerge}.
1832 % \begin{macrocode}
1833 \DeclareOption{nomerge}{%
1834 \appdef\setup@hook{%
1835 \@ifnum{\NAT@merge>\z@}{\let\NAT@merge\z@}{}%
1836 }%
1837 }%
1838 % \end{macrocode}
1839 % \end{macro}
1840 %
1841 % \subsection{Default Option, Society, Journal, and pointsize}%
1842 %
1843 % \changes{4.1a}{2008/01/18}{(AO, 488) Change processing of options to allow an unused option to specify society and journal}%
1844 % This change will not break OSA documents because that society is still built in to revtex4.
1845 %
1846 % \begin{macro}{\@parse@class@options@society}
1847 % \begin{macro}{\@parse@class@options@}
1848 % \changes{4.1b}{2008/07/01}{Procedures \cs{@parse@class@options@society} and \cs{@parse@class@options@journal} and friends}
1849 % The procedure \cmd\@parse@class@options@society\ parses the options passed to this document class
1850 % for the \cmd\@society.
1851 % It is like \cmd\ProcessOptions*\ in that it accesses
1852 % \cmd\@ptionlist\{\cmd\@currname.\cmd\@currext\}.
1853 % Any undefined option is considered: if there is a corresponding \file{.rtx} file,
1854 % it will change the society accordingly
1855 % and define a placeholder class option for the society thus found
1856 % (thus preventing a spurious "option not found" message).
1857 %
1858 % The procedure \cmd\@parse@class@options@\ parses the document's options
1859 % for any that set the \cmd\csname\ provided.
1860 % \begin{macrocode}
1861 \def\@parse@class@options@society{%
1862 \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
1863 \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
1864 \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{}{%
1865 \IfFileExists{\CurrentOption\substyle@post.\substyle@ext}{%
1866 \expandafter\change@society\expandafter{\CurrentOption}%
1867 \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
1868 }{}%
1869 }%
1870 }%
1871 }%
1872 \def\@parse@class@options@#1{%
1873 \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
1874 \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
1875 \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{%
1876 \begingroup\csname ds@\CurrentOption\endcsname
1877 \@ifxundefined#1{%
1878 \endgroup
1879 }{%
1880 \expandafter\endgroup\expandafter\def\expandafter#1\expandafter{#1}%
1881 }%
1882 }{}%
1883 }%
1884 }%
1885 \def\@parse@class@options@journal{%
1886 \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
1887 \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
1888 \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{%
1889 \begingroup
1890 \csname ds@\CurrentOption\endcsname
1891 \@ifxundefined\@journal{%
1892 \endgroup
1893 }{%
1894 \expandafter\endgroup\expandafter\def\expandafter\@journal\expandafter{\@journal}%
1895 }%
1896 }{}%
1897 }%
1898 }%
1899 \def\@parse@class@options{%
1900 \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
1901 \expandafter\@for\expandafter\CurrentOption\expandafter:\expandafter=\@tempa\do{%
1902 \expandafter\@ifnotrelax\csname ds@\CurrentOption\endcsname{%
1903 \begingroup
1904 \csname ds@\CurrentOption\endcsname
1905 \@ifxundefined\@pointsize{%
1906 \endgroup
1907 }{%
1908 \expandafter\endgroup\expandafter\def\expandafter\@pointsize\expandafter{\@pointsize}%
1909 }%
1910 }{%
1911 \IfFileExists{\CurrentOption\substyle@post.\substyle@ext}{%
1912 \expandafter\change@society\expandafter{\CurrentOption}%
1913 \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
1914 }{}%
1915 }%
1916 }%
1917 }%
1918 % \end{macrocode}
1919 % \end{macro}
1920 % \end{macro}
1921 %
1922 % \changes{4.1j}{2009/10/25}{(AO, 545) hypertext capabilities off by default; enable with \classoption{hypertext}}
1923 % The class option \classoption{hypertext} enables the built-in hypertext capabilities,
1924 % which coincide with those of \classname{custom-bib}-generated BIBTeX styles
1925 % using the guard code \texttt{hypertext}.
1926 %
1927 % Note that APS has these capabilities turned off by default;
1928 % Loading the hyperref package turns them on.
1929 % \begin{macrocode}
1930 \DeclareOption{hypertext}{\hypertext@enable@ltx}%
1931 \appdef\document@inithook{\@ifpackageloaded{hyperref}{\hypertext@enable@ltx}{}}%
1932 % \end{macrocode}
1933 %
1934 % The default handling for a document class option depends upon whether the \cmd\@society\ is
1935 % defined.
1936 %
1937 % If not, then hunt for a \file{.rtx} file with that name.
1938 % If it exists, then we will take this option as the name of the society,
1939 % otherwise, declare the option as not used.
1940 %
1941 % (This behavior is similar to the \LaTeX2.09 handling, where
1942 % one looked for a \file{.sty} file, except that
1943 % in this case, we must provide for journal substyles that may be
1944 % defined in the society file, or have their own journal substyle file.)
1945 %
1946 % At the point where the class file is finished loading,
1947 % we then read in the society file.
1948 % That file can define further class options, such as the journal substyle.
1949 %
1950 % For users, this will mean that they can specify the society and journal simply
1951 % by specifying first the former and then the latter among their document class options.
1952 % The society \emph{must} have a corresponding \file{.rtx}.
1953 %
1954 % \changes{4.1b}{2008/05/29}{The csname substyle@ext is now defined without a dot (.), to be compatible with \LaTeX usage (see @clsextension and @pkgextension).}
1955 %
1956 % \begin{macrocode}
1957 %</options>
1958 % \end{macrocode}
1959 %
1960 % \begin{macrocode}
1961 %<*package>
1962 % \end{macrocode}
1963 %
1964 % \begin{macro}{\@process@society}
1965 % \begin{macro}{\@process@journal}
1966 % \begin{macro}{\@process@pointsize}
1967 % \begin{macrocode}
1968 \def\substyle@post{4-2}%
1969 \def\substyle@ext{rtx}%
1970 \DeclareOption*{\OptionNotUsed}%
1971 % \end{macrocode}
1972 % A society substyle may define its own options, via \cmd\DeclareOption.
1973 %
1974 % At the end of this document class, we process the society file,
1975 % using \file{aps.rtx} if none has been specified in the document.
1976 % \begin{macrocode}
1977 \def\@process@society#1{%
1978 \@ifxundefined\@society{%
1979 \class@warn{No Society specified, using default society #1}%
1980 \def\@society{#1}\let\@journal\@undefined
1981 }{}%
1982 \expandafter\input\expandafter{\@society\substyle@post.\substyle@ext}%
1983 }%
1984 % \end{macrocode}
1985 %
1986 % A society substyle can encompass any number of journal substyles;
1987 % we use the following procedure to invoke the proper one.
1988 % \begin{macrocode}
1989 \def\@process@journal#1{%
1990 \@ifxundefined\@journal{%
1991 \class@warn{No journal specified, using default #1}%
1992 \def\@journal{#1}%
1993 }{}%
1994 \expandafter\expandafter
1995 \expandafter\rtx@do@substyle
1996 \expandafter\expandafter
1997 \expandafter{\expandafter\@society\@journal}%
1998 }%
1999 \def\rtx@do@substyle#1{%
2000 \InputIfFileExists{#1\substyle@post.\substyle@ext}{}{\csname rtx@#1\endcsname}%
2001 }%
2002 % \end{macrocode}
2003 %
2004 % Document class options \classoption{10pt}, \classoption{11pt}, and \classoption{12pt}
2005 % are implemented by \revtex\ itself and determine \cmd\@pointsize.
2006 % These provide formatting settings appropriate to the society's journals.
2007 %
2008 % If not specified by the document, a value \cmd\@pointsize@default\ is used.
2009 % This default can be set by the journal. Here, the society sets its default.
2010 % \begin{macrocode}
2011 \def\@process@pointsize#1{%
2012 \@ifxundefined\@pointsize{%
2013 \def\@pointsize{#1}%
2014 \class@warn{No type size specified, using default \@pointsize}%
2015 }{}%
2016 \expandafter\expandafter
2017 \expandafter\rtx@do@substyle
2018 \expandafter\expandafter
2019 \expandafter{\expandafter\@society\@pointsize pt}%
2020 }%
2021 % \end{macrocode}
2022 % \end{macro}
2023 % \end{macro}
2024 % \end{macro}
2025 %
2026 % \subsection{Class-Asserted Options}%
2027 % \changes{4.0b}{1999/06/20}{Removed invocation of nonexistent class option \protect\classoption{groupauthors} and all other class options that should only be invoked by the document. (Otherwise precedence of class options does not work.)}
2028 % Here we establish the default document class options.
2029 % Those of the document itself will override these.
2030 %
2031 % \section{Procedures Dependent Upon Options}
2032 %
2033 % Here we introduce \classname{classes.dtx} definitions for
2034 % the page styles that people will expect to be able to use.
2035 % \begin{macro}{\ps@headings}
2036 % \begin{macro}{\ps@myheadings}
2037 % \begin{macrocode}
2038 \def\ps@headings{%
2039 \let\@oddfoot\@empty\let\@evenfoot\@empty
2040 \def\@evenhead{\thepage\hfil\slshape\leftmark}%
2041 \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
2042 \let\@mkboth\markboth
2043 \def\sectionmark##1{%
2044 \markboth {\MakeUppercase{%
2045 \ifnum \c@secnumdepth >\z@
2046 \thesection\quad
2047 \fi
2048 ##1}}{}}%
2049 \def\subsectionmark##1{%
2050 \markright {%
2051 \ifnum \c@secnumdepth >\@ne
2052 \thesubsection\quad
2053 \fi
2054 ##1}}}%
2055 \def\ps@myheadings{%
2056 \let\@oddfoot\@empty\let\@evenfoot\@empty
2057 \def\@evenhead{\thepage\hfil\slshape\leftmark}%
2058 \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
2059 \let\@mkboth\@gobbletwo
2060 \let\sectionmark\@gobble
2061 \let\subsectionmark\@gobble
2062 }%
2063 % \end{macrocode}
2064 % \end{macro}
2065 % \end{macro}
2066 %
2067 % \begin{macro}{\ps@article}
2068 % \begin{macro}{\ps@article@final}
2069 % \begin{macro}{\ps@preprint}
2070 % \changes{4.0a}{1998/01/31}{Move after process options, so the following test works}
2071 % \changes{4.0b}{1999/06/20}{Defer decision until \cs{AtBeginDocument} time}
2072 % \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
2073 % \changes{4.0rc1}{2001/06/17}{Running headers always as if two-sided}
2074 % \begin{macrocode}
2075 \def\ps@article{%
2076 \def\@evenhead{\let\\\heading@cr\thepage\quad\checkindate\hfil{\leftmark}}%
2077 \def\@oddhead{\let\\\heading@cr{\rightmark}\hfil\checkindate\quad\thepage}%
2078 \def\@oddfoot{}%
2079 \def\@evenfoot{}%
2080 \let\@mkboth\markboth
2081 \let\sectionmark\@gobble
2082 \let\subsectionmark\@gobble
2083 }%
2084 \def\ps@article@final{%
2085 \def\@evenhead{\let\\\heading@cr\thepage\quad\checkindate\hfil{\leftmark}}%
2086 \def\@oddhead{\let\\\heading@cr{\rightmark}\hfil\checkindate\quad\thepage}%
2087 \def\@oddfoot{}%
2088 \def\@evenfoot{}%
2089 \let\@mkboth\markboth
2090 \def\sectionmark##1{%
2091 \markboth{%
2092 \MakeTextUppercase{%
2093 \@ifnum{\c@secnumdepth >\z@}{\thesection\hskip 1em\relax}{}%
2094 ##1%
2095 }%
2096 }{}%
2097 }%
2098 \def\subsectionmark##1{%
2099 \markright {%
2100 \@ifnum{\c@secnumdepth >\@ne}{\thesubsection\hskip 1em\relax}{}%
2101 ##1%
2102 }%
2103 }%
2104 }%
2105 % \end{macrocode}
2106 %
2107 % \begin{macrocode}
2108 \def\heading@cr{\unskip\space\ignorespaces}%
2109 % \end{macrocode}
2110 %
2111 % \changes{4.0c}{1999/11/13}{Do not put by REVTeX in every page foot}
2112 % \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
2113 % \begin{macrocode}
2114 \def\ps@preprint{%
2115 \def\@oddfoot{\hfil\thepage\quad\checkindate\hfil}%
2116 \def\@evenfoot{\hfil\thepage\quad\checkindate\hfil}%
2117 \def\@oddhead{}%
2118 \def\@evenhead{}%
2119 \let\@mkboth\@gobbletwo
2120 \let\sectionmark\@gobble
2121 \let\subsectionmark\@gobble
2122 }%
2123 % \end{macrocode}
2124 %
2125 % \begin{macrocode}
2126 \let\@oddhead\@empty
2127 \let\@evenhead\@empty
2128 \let\@oddfoot\@empty
2129 \let\@evenfoot\@empty
2130 % \end{macrocode}
2131 % \end{macro}
2132 % \end{macro}
2133 % \end{macro}
2134 %
2135 % \begin{macro}{\lastpage@putlabel}
2136 % Support the default meaning of \cmd\@endpage.
2137 % \changes{4.0a}{1998/01/31}{Move after process options, so \cs{clearpage} not in scope of twocolumn}
2138 % \changes{4.1k}{2009/11/06}{(AO, 554) give the \cs{newlabel} command syntax appropriate to the hyperref package}
2139 % Name of this macro (and the \cmd\label\ key) taken from
2140 % \url{CTAN:/macros/latex/contrib/other/lastpage}%
2141 % with code optimised slightly.
2142 % \begin{macrocode}
2143 \def\lastpage@putlabel{%
2144 \if@filesw
2145 \begingroup
2146 \advance\c@page\m@ne
2147 \immediate\write\@auxout{\string\newlabel{LastPage}{{}{\thepage}{}{}{}}}%
2148 \endgroup
2149 \fi
2150 }%
2151 % \end{macrocode}
2152 % Install a procedure into document endgame processing that
2153 % labels the last page of the document.
2154 % This is done just before the \file{.aux} file
2155 % is closed, and does not require a \cmd\shipout, because it writes
2156 % directly to the \file{.aux} file.
2157 % Note that we assume no further \cmd\shipout s will be done past this point.
2158 % \changes{4.1n}{2009/12/09}{(AO, 569) execute the after-last-shipout procedures from within the safety of the output routine}%
2159 % \begin{macrocode}
2160 \appdef\clear@document{%
2161 \do@output@cclv{%
2162 \lastpage@putlabel
2163 \tally@box@size@sw{\total@text}{}%
2164 }%
2165 }%
2166 \providecommand\write@column@totals{}%
2167 % \end{macrocode}
2168 % \end{macro}
2169 %
2170 %
2171 % \section{Required Packages}
2172 % \url{CTAN:macros/latex/contrib/other/misc/url.sty}%
2173 % \begin{macrocode}
2174 \appdef\rtx@require@packages{%
2175 \RequirePackage{url}%
2176 }%
2177 % \end{macrocode}
2178 %
2179 % \section{Incompatible Packages}
2180 %
2181 % We wait until after the preamble is processed, then check for any packages
2182 % that might have been loaded which we know to be incompatible with \revtex.
2183 %
2184 % The \classname{multicol} package is incompatible with \classname{ltxgrid}, which replaces it.
2185 % The \classname{cite} package is incompatible with \classname{natbib}, which replaces its functionality.
2186 % The functionality of the \classname{mcite} package is provided by \classname{natbib}.
2187 % \begin{macrocode}
2188 \appdef\document@inithook{%
2189 \incompatible@package{cite}%
2190 \incompatible@package{mcite}%
2191 \incompatible@package{multicol}%
2192 }%
2193 % \end{macrocode}
2194 %
2195 % \section{Society- and Journal-Specific Code}
2196 %
2197 % \begin{macro}{\@journal}
2198 % Journal test helper, used as
2199 % \begin{verbatim}
2200 %\@ifx{\@journal\journal@pra}{%
2201 % <journal-specific setup>
2202 %\fi
2203 % \end{verbatim}
2204 % Journal code might like to further specify (if as yet undefined) or distinguish on
2205 % the following Booleans.
2206 %
2207 % Note: the journal substyle code should only alter the value of one of these Booleans if
2208 % the Boolean is \cmd\undefined. This convention is what makes the document's
2209 % options take precedence over the values set by the journal.
2210 %
2211 % FIXME: make this table an exhaustive listing of all the parameters set by
2212 % the class options.
2213 %
2214 % \begin{tabular}{ll}
2215 % \cmd\@pointsize &(10|11|12), depending on the type size\\
2216 % \cmd\footinbib@sw &true if footnotes are to be formatted in the bibliography\\
2217 % \cmd\preprintsty@sw &true for preprint and hyperpreprint\\
2218 % \cmd\eqsecnum@sw &true means that equations are numbered within sections\\
2219 % \cmd\groupauthors@sw &true means authors listed separately for each address\\
2220 % \cmd\preprint@sw &true means to produce the preprint numbers as part of the title block\\
2221 % \cmd\showPACS@sw &true means to produce the PACS as part of the title block\\
2222 % \cmd\showKEYS@sw &true means to produce the keywords as part of the title block\\
2223 % \cmd\@affils@sw &true means each affiliation is printed, for each author\\
2224 % \cmd\runinaddress@sw &true means author addresses are printed run-in\\
2225 % \cmd\draft@sw &true implies that PACS will be printed\\
2226 % \cmd\tightenlines@sw &true if preprint single spaced\\
2227 % \cmd\lengthcheck@sw &true if length checking is in effect\\
2228 % \cmd\byrevtex@sw &true means to announce ``typeset by \revtex''\\
2229 % \cmd\titlepage@sw &true for title is to be set on a separate page\\
2230 % \cmd\twocolumn@sw &true if two-column page grid\\
2231 % \cmd\twocolumn@sw &true if we are to automatically balance the columns of the last page\\
2232 % \cmd\twoside@sw &true means to format pages for duplex printing\\
2233 % \cmd\floats@sw &false means floats are migrated to end of document\\
2234 % \cmd\floatp@sw &true means endfloats are set one to a page\\
2235 % \cmd\class@amsfonts &if \cmd\@empty, means that \classname{amsfonts} will \emph{not} be loaded\\
2236 % \cmd\class@amssymb &if \cmd\@empty, means that \classname{amssymb} will \emph{not} be loaded\\
2237 % \cmd\frontmatter@footnote &if \cmd\undefined, means that the default (\cmd\footnote) will be used\\
2238 % \cmd\place@bibnumber &if \cmd\undefined, means that the default (inline) will be used\\
2239 % \end{tabular}
2240 %
2241 % Note: if \cmd\twocolumn@sw\ and \cmd\preprintsty@sw\ are both false,
2242 % then `galley' style is in effect. The \classoption{galley} option invokes
2243 % \classoption{onecolumn}, but does not affect the \cmd\preprintsty@sw.
2244 %
2245 % Note: \cmd\paperwidth\ and \cmd\paperheight\ are not integrated into this scheme,
2246 % and should be selected by the document alone.
2247 % \end{macro}
2248 %
2249 % \section{Body}
2250 %
2251 % \subsection{counters}
2252 % The following definitions are probably identical to those in
2253 % \file{classes.dtx}%
2254 % \begin{macrocode}
2255 \def\labelenumi{\theenumi.}
2256 \def\theenumi{\arabic{enumi}}
2257 % \end{macrocode}
2258 %
2259 % \begin{macrocode}
2260 \def\labelenumii{(\theenumii)}
2261 \def\theenumii{\alph{enumii}}
2262 \def\p@enumii{\theenumi}
2263 % \end{macrocode}
2264 %
2265 % \begin{macrocode}
2266 \def\labelenumiii{\theenumiii.}
2267 \def\theenumiii{\roman{enumiii}}
2268 \def\p@enumiii{\theenumi(\theenumii)}
2269 % \end{macrocode}
2270 %
2271 % \begin{macrocode}
2272 \def\labelenumiv{\theenumiv.}
2273 \def\theenumiv{\Alph{enumiv}}
2274 \def\p@enumiv{\p@enumiii\theenumiii}
2275 % \end{macrocode}
2276 %
2277 % \begin{macrocode}
2278 \def\labelitemi{\textbullet}
2279 \def\labelitemii{\normalfont\bfseries\textendash}
2280 \def\labelitemiii{\textasteriskcentered}
2281 \def\labelitemiv{\textperiodcentered}
2282 % \end{macrocode}
2283 %
2284 % \begin{macrocode}
2285 \pagenumbering{arabic}
2286 % \end{macrocode}
2287 %
2288 % \subsection{float parameters}
2289 %
2290 % from the old aps.sty. (DPC: same as article I think)
2291 % AO: here, \LaTeX's standard classes fail very poorly
2292 % (the price of backward compatability): the values for
2293 % \cmd\floatpagefraction\ and \cmd\dblfloatpagefraction\
2294 % need to be raised to avoid creating extremely short
2295 % float pages.
2296 % \begin{macrocode}
2297 \setcounter{topnumber}{2}
2298 \def\topfraction{.9}
2299 \setcounter{bottomnumber}{1}
2300 \def\bottomfraction{.9}
2301 \setcounter{totalnumber}{3}
2302 \def\textfraction{.1}
2303 \def\floatpagefraction{.9}
2304 \setcounter{dbltopnumber}{2}
2305 \def\dbltopfraction{.9}
2306 \def\dblfloatpagefraction{.9}
2307 % \end{macrocode}
2308 %
2309 % \subsection{List Environments}
2310 %
2311 % \begin{macrocode}
2312 \newenvironment{verse}{%
2313 \let\\=\@centercr
2314 \list{}{%
2315 \itemsep\z@ \itemindent -1.5em\listparindent \itemindent
2316 \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]%
2317 }{%
2318 \endlist
2319 }%
2320 % \end{macrocode}
2321 %
2322 % \begin{macrocode}
2323 \newenvironment{quotation}{%
2324 \list{}{%
2325 \listparindent 1.5em
2326 \itemindent\listparindent
2327 \rightmargin\leftmargin \parsep \z@ \@plus\p@}\item[]%
2328 }{%
2329 \endlist
2330 }%
2331 % \end{macrocode}
2332 %
2333 % \begin{macrocode}
2334 \newenvironment{quote}{%
2335 \list{}{%
2336 \rightmargin\leftmargin}\item[]%
2337 }{%
2338 \endlist
2339 }%
2340 % \end{macrocode}
2341 %
2342 % \changes{4.1b}{2008/06/30}{(AO) Structure the Abstract using the \texttt{bibliography} environment}
2343 % \begin{macrocode}
2344 \def\descriptionlabel#1{%
2345 \hspace\labelsep \normalfont\bfseries #1\unskip:%
2346 }%
2347 % \end{macrocode}
2348 %
2349 % \begin{macrocode}
2350 \newenvironment{description}{%
2351 \list{}{%
2352 \labelwidth\z@ \itemindent-\leftmargin
2353 \let\makelabel\descriptionlabel
2354 }%
2355 }{%
2356 \endlist
2357 }%
2358 % \end{macrocode}
2359 %
2360 % \subsection{Sectioning Commands\label{sec:secnumarabic}}
2361 %
2362 % \subsubsection{Sectioning Commands and Their Productions}%
2363 % The following counters are defined by LaTeX's standard document classes.
2364 % We do likewise, then assign flag values to the productions, awaiting
2365 % overrides.
2366 % \begin{macrocode}
2367 \newcounter{part}%
2368 \let\thepart\@undefined
2369 \newcounter{section}%
2370 \let\thesection\@undefined
2371 \newcounter{subsection}[section]%
2372 \let\thesubsection\@undefined
2373 \newcounter{subsubsection}[subsection]%
2374 \let\thesubsubsection\@undefined
2375 \newcounter{paragraph}[subsubsection]%
2376 \let\theparagraph\@undefined
2377 \newcounter{subparagraph}[paragraph]%
2378 \let\thesubparagraph\@undefined
2379 % \end{macrocode}
2380 % The procedure invoked by \cmd\setup@secnums\ provides meanings for these productions.
2381 %
2382 % \begin{macro}{\secnums@rtx}
2383 % \begin{macro}{\secnums@arabic}
2384 % These two procedures define the meanings of each of the productions
2385 % of the counters of the sectioning commands,
2386 % but only if nothing else has defined it.
2387 % \begin{macrocode}
2388 \def\secnums@rtx{%
2389 \@ifxundefined\thepart{%
2390 \def\thepart{\Roman{part}}%
2391 }{}%
2392 \@ifxundefined\thesection{%
2393 \def\thesection {\Roman{section}}%
2394 \def\p@section {}%
2395 }{}%
2396 \@ifxundefined\thesubsection{%
2397 \def\thesubsection {\Alph{subsection}}%
2398 \def\p@subsection {\thesection\,}%
2399 }{}%
2400 \@ifxundefined\thesubsubsection{%
2401 \def\thesubsubsection {\arabic{subsubsection}}%
2402 \def\p@subsubsection {\thesection\,\thesubsection\,}%
2403 }{}%
2404 \@ifxundefined\theparagraph{%
2405 \def\theparagraph {\alph{paragraph}}%
2406 \def\p@paragraph {\thesection\,\thesubsection\,\thesubsubsection\,}%
2407 }{}%
2408 \@ifxundefined\thesubparagraph{%
2409 \def\thesubparagraph {\arabic{subparagraph}}%
2410 \def\p@subparagraph {\thesection\,\thesubsection\,\thesubsubsection\,\theparagraph\,}%
2411 }{}%
2412 }%
2413 \def\secnums@arabic{%
2414 \@ifxundefined\thepart{%
2415 \def\thepart {\Roman{part}}%
2416 }{}%
2417 \@ifxundefined\thesection{%
2418 \def\thesection {\Roman{section}}%
2419 \def\p@section {}%
2420 }{}%
2421 \@ifxundefined\thesubsection{%
2422 \def\thesubsection {\thesection.\arabic{subsection}}%
2423 \def\p@subsection {}%
2424 }{}%
2425 \@ifxundefined\thesubsubsection{%
2426 \def\thesubsubsection {\thesubsection.\arabic{subsubsection}}%
2427 \def\p@subsubsection {}%
2428 }{}%
2429 \@ifxundefined\theparagraph{%
2430 \def\theparagraph {\thesubsubsection.\arabic{paragraph}}%
2431 \def\p@paragraph {}%
2432 }{}%
2433 \@ifxundefined\thesubparagraph{%
2434 \def\thesubparagraph {\theparagraph.\arabic{subparagraph}}%
2435 \def\p@subparagraph {}%
2436 }{}%
2437 }%
2438 % \end{macrocode}
2439 % \end{macro}
2440 % \end{macro}
2441 %
2442 % \subsubsection{The Acknowledgments Environment}%
2443 % This user-level markup produces a head introducing
2444 % the acknowledgments, and acts as a wrapper for the text.
2445 % In this implementation, it is an unnumbered section,
2446 % but appears within the toc.
2447 %
2448 % For compatiability's sake, we implement it under the alternative
2449 % spelling \env{acknowledgements}.
2450 % \changes{4.0c}{1999/11/13}{also spelled ``acknowledgements''.}
2451 % \changes{4.0d}{2000/05/18}{But alternative spelling is deprecated.}
2452 % \begin{macrocode}
2453 \newenvironment{acknowledgments}{%
2454 \acknowledgments@sw{%
2455 \expandafter\section\expandafter*\expandafter{\acknowledgmentsname}%
2456 }{%
2457 \par
2458 \phantomsection
2459 \addcontentsline{toc}{section}{\protect\numberline{}\acknowledgmentsname}%
2460 }%
2461 }{%
2462 \par
2463 }%
2464 \@booleantrue\acknowledgments@sw
2465 \newenvironment{acknowledgements}{%
2466 \replace@environment{acknowledgements}{acknowledgments}%
2467 }{%
2468 \endacknowledgments
2469 }%
2470 % \end{macrocode}
2471 %
2472 % \subsubsection{Part Opener}%
2473 % section setup copied verbatim from revtex3 aps/osa.
2474 % Does not explicitly depend on pointsize options.
2475 % \begin{macrocode}
2476 \def\part{\par
2477 \addvspace{4ex}%
2478 \@afterindentfalse
2479 \secdef\@part\@spart}%
2480 % \end{macrocode}
2481 %
2482 % \begin{macrocode}
2483 \def\@part[#1]#2{%
2484 \@ifnum{\c@secnumdepth >\m@ne}{%
2485 \refstepcounter{part}%
2486 \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
2487 }{%
2488 \addcontentsline{toc}{part}{#1}%
2489 }%
2490 \begingroup
2491 \parindent \z@ \raggedright
2492 \interlinepenalty\@M
2493 \@ifnum{\c@secnumdepth >\m@ne}{%
2494 \Large \bf \partname~\thepart%
2495 \par\nobreak
2496 }{}%
2497 \huge \bf
2498 #2%
2499 \markboth{}{}\par
2500 \endgroup
2501 \nobreak
2502 \vskip 3ex
2503 \@afterheading
2504 }%
2505 % \end{macrocode}
2506 %
2507 % \begin{macrocode}
2508 \def\@spart#1{{\parindent \z@ \raggedright
2509 \interlinepenalty\@M
2510 \huge \bf
2511 #1\par}
2512 \nobreak
2513 \vskip 3ex
2514 \@afterheading}
2515 % \end{macrocode}
2516 %
2517 % \subsubsection{Stacked Heads}%
2518 % Here are the class default definitions for sectioning commands.
2519 % A society or a journal substyle will likely override these definitions.
2520 %
2521 % In doing so, you can customize the formatting for a particular level by defining,
2522 % e.g., \cmd\@hangfrom@section\ or \cmd\@subsectioncntformat.
2523 % \begin{macrocode}
2524 \def\section{%
2525 \@startsection
2526 {section}%
2527 {1}%
2528 {\z@}%
2529 {0.8cm \@plus1ex \@minus .2ex}%
2530 {0.5cm}%
2531 {\normalfont\small\bfseries}%
2532 }%
2533 % \end{macrocode}
2534 %
2535 % \begin{macrocode}
2536 \def\subsection{%
2537 \@startsection
2538 {subsection}%
2539 {2}%
2540 {\z@}%
2541 {.8cm \@plus1ex \@minus .2ex}%
2542 {.5cm}%
2543 {\normalfont\small\bfseries}%
2544 }%
2545 % \end{macrocode}
2546 %
2547 % \begin{macrocode}
2548 \def\subsubsection{%
2549 \@startsection
2550 {subsubsection}%
2551 {3}%
2552 {\z@}%
2553 {.8cm \@plus1ex \@minus .2ex}%
2554 {.5cm}%
2555 {\normalfont\small\itshape}%
2556 }%
2557 % \end{macrocode}
2558 %
2559 % \subsubsection{Runin Heads}%
2560 % \begin{macrocode}
2561 \def\paragraph{%
2562 \@startsection
2563 {paragraph}%
2564 {4}%
2565 {\parindent}%
2566 {\z@}%
2567 {-1em}%
2568 {\normalfont\normalsize\itshape}%
2569 }%
2570 % \end{macrocode}
2571 %
2572 % \begin{macrocode}
2573 \def\subparagraph{%
2574 \@startsection
2575 {subparagraph}%
2576 {5}%
2577 {\parindent}%
2578 {3.25ex \@plus1ex \@minus .2ex}%
2579 {-1em}%
2580 {\normalfont\normalsize\bfseries}%
2581 }%
2582 % \end{macrocode}
2583 %
2584 %
2585 % \subsection{Math}
2586 %
2587 % \begin{macro}{\theequation}
2588 % We change the production of the equation counter so that
2589 % we can accomodate the \classoption{eqsecnum} option.
2590 % \begin{macrocode}
2591 \def\theequation{%
2592 \theequation@prefix\arabic{equation}%
2593 }%
2594 \def\theequation@prefix{}%
2595 % \end{macrocode}
2596 % \end{macro}
2597 %
2598 %
2599 % \subsection{Type Size-Dependent Settings}
2600 %
2601 % \subsection{All Point Sizes}
2602 % \begin{macrocode}
2603 \setcounter{secnumdepth}{4}
2604 % \end{macrocode}
2605 %
2606 % \begin{macrocode}
2607 \lineskip 1pt
2608 \normallineskip 1pt
2609 \def\baselinestretch{1}%
2610 % \end{macrocode}
2611 %
2612 % \begin{macrocode}
2613 \@lowpenalty 51
2614 \@medpenalty 151
2615 \@highpenalty 301
2616 % \end{macrocode}
2617 %
2618 % \begin{macrocode}
2619 \@beginparpenalty -\@lowpenalty
2620 \@endparpenalty -\@lowpenalty
2621 \@itempenalty -\@lowpenalty
2622 % \end{macrocode}
2623 %
2624 % \begin{macrocode}
2625 \arraycolsep 3pt
2626 \tabcolsep 2pt
2627 \arrayrulewidth .4pt
2628 \doublerulesep 2pt
2629 % \end{macrocode}
2630 %
2631 % \begin{macrocode}
2632 \skip\@mpfootins = 0pt
2633 % \end{macrocode}
2634 %
2635 % \begin{macrocode}
2636 \fboxsep = 3.0pt
2637 \fboxrule = 0.4pt
2638 % \end{macrocode}
2639 %
2640 % \subsection{Figures}
2641 % \changes{4.0b}{1999/06/20}{Processing delayed to \cs{AtBeginDocument} time}
2642 %
2643 % \begin{environment}{figure}
2644 % We define the \env{figure} environment.
2645 % Later, we will horse around with its meaning
2646 % in order to accomodate \cmd\floats@sw.
2647 % \begin{macrocode}
2648 \newenvironment{figure}
2649 {\@float{figure}}
2650 {\end@float}
2651 \newenvironment{figure*}
2652 {\@dblfloat{figure}}
2653 {\end@dblfloat}
2654 % \end{macrocode}
2655 % \end{environment}
2656 %
2657 % \begin{macrocode}
2658 \def\listoffigures{\print@toc{lof}}%
2659 \def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}%
2660 % \end{macrocode}
2661 %
2662 % \begin{macro}{\@makecaption}
2663 % If caption is one line long, to be centered; if lines turn, then set justified.
2664 % \begin{macrocode}
2665 \newlength\abovecaptionskip
2666 \newlength\belowcaptionskip
2667 \setlength\abovecaptionskip{10\p@}
2668 \setlength\belowcaptionskip{2\p@}
2669 % \end{macrocode}
2670 %
2671 % \changes{4.0b}{1999/06/20}{One-line caption sets flush left.}
2672 % \changes{4.0c}{1999/11/13}{Prevent an inner footnote from performing twice}
2673 % \changes{4.1a}{2008/01/18}{(AO, 460) ``Proper style is "FIG. 1. ..." (no colon)''}%
2674 % There is a hook \cmd\@caption@fignum@sep\ for determining
2675 % the separator following the float number, e.g., ``Fig.1''.
2676 % Formerly, we had defined it to be ``: '', now the colon has been replace by a period (full stop).
2677 % \begin{macrocode}
2678 \long\def\@makecaption#1#2{%
2679 \par
2680 % \nobreak
2681 \vskip\abovecaptionskip
2682 \begingroup
2683 \small\rmfamily
2684 \sbox\@tempboxa{%
2685 \let\\\heading@cr
2686 \@make@capt@title{#1}{#2}%
2687 }%
2688 \@ifdim{\wd\@tempboxa >\hsize}{%
2689 \begingroup
2690 \samepage
2691 \flushing
2692 \let\footnote\@footnotemark@gobble
2693 \@make@capt@title{#1}{#2}\par
2694 \endgroup
2695 }{%
2696 \global \@minipagefalse
2697 \hb@xt@\hsize{\hfil\unhbox\@tempboxa\hfil}%
2698 }%
2699 \endgroup
2700 \vskip\belowcaptionskip
2701 }%
2702 \def\@make@capt@title#1#2{%
2703 \@ifx@empty\float@link{\@firstofone}{\expandafter\href\expandafter{\float@link}}%
2704 {#1}\@caption@fignum@sep#2%
2705 }%
2706 \def\@footnotemark@gobble{%
2707 \@footnotemark
2708 \@ifnextchar[{\@gobble@opt@i}{\@gobble}%
2709 }%
2710 \def\@gobble@opt@i[#1]#2{}%
2711 \def\@mpmakefntext#1{%
2712 \flushing
2713 \parindent=1em
2714 \noindent
2715 \hb@xt@1em{\hss\@makefnmark}%
2716 #1%
2717 }%
2718 \def\@caption@fignum@sep{. }%
2719 \def\setfloatlink{\def\float@link}%
2720 \let\float@link\@empty
2721 % \end{macrocode}
2722 % \end{macro}
2723 %
2724 % \begin{macro}{\thefigure}
2725 % The figure counter and float placement defaults.
2726 % \begin{macrocode}
2727 \newcounter{figure}
2728 \renewcommand \thefigure {\@arabic\c@figure}
2729 % \end{macrocode}
2730 % Note that we give the `!' modifier by default.
2731 % This is an effort to avoid the syndrome wherein
2732 % a deferred float finds itself unqualified for
2733 % placement, thereby getting carried until \cmd\clearpage.
2734 % \begin{macrocode}
2735 \def\fps@figure{tbp}
2736 \def\ftype@figure{1}
2737 \def\ext@figure{lof}
2738 \def\fnum@figure{\figurename~\thefigure}
2739 % \end{macrocode}
2740 % We allocate a box register for use in tallying the column inches of floats of this type.
2741 % \begin{macrocode}
2742 \expandafter\newbox\csname fbox@\ftype@figure\endcsname
2743 \expandafter\setbox\csname fbox@\ftype@figure\endcsname\hbox{}%
2744 % \end{macrocode}
2745 % \end{macro}
2746 %
2747 % \subsubsection{Deferring \env{figure} Floats}%
2748 %
2749 % We determine if figures are to float or be deferred until \cmd\printfigures\ time.
2750 % If so, we open the stream that will receive the deferred document portions.
2751 % \begin{macrocode}
2752 \appdef\class@documenthook{%
2753 \do@if@floats{figure}{.fgx}%
2754 }%
2755 \appdef\class@enddocumenthook{%
2756 \printfigures\relax
2757 }%
2758 % \end{macrocode}
2759 %
2760 % \begin{macro}{\printfigures}
2761 % The user-level command \cmd\printfigures\ determines
2762 % where the figures are to appear in a document in which
2763 % \cmd\floats@sw\ is false.
2764 % If the user invokes the \classoption{endfloats} class option and fails to
2765 % insert a \cmd\printfigures\ command,
2766 % the figures will be printed at the end of the document.
2767 % If the command is given, but floats are not being deferred,
2768 % it amounts to a no-op.
2769 % \changes{4.0b}{1999/06/20}{call \cs{print@floats}}
2770 % \changes{4.0c}{1999/11/13}{*-form mandates pagebreak}
2771 % \begin{macrocode}
2772 \newcommand\printfigures{%
2773 \@ifstar{\true@sw}{\floatp@sw{\true@sw}{\false@sw}}%
2774 {%
2775 \print@float{figure}{\oneapage}%
2776 }{%
2777 \print@float{figure}{}%
2778 }%
2779 }%
2780 % \end{macrocode}
2781 % \end{macro}
2782 %
2783 %
2784 % \begin{macro}{\@xfloat@prep}
2785 % We patch into the procedure \cmd\@xfloat@prep.
2786 % This patch applies to all floats (not \env{figure} alone)
2787 % and makes the type center.
2788 % \begin{macrocode}
2789 \appdef\@xfloat@prep{%
2790 \appdef\@parboxrestore{\centering}%
2791 %\let\@makefnmark\@makefnmark@latex
2792 }%
2793 % \end{macrocode}
2794 % \end{macro}
2795 %
2796 %
2797 % \subsection{Tables}
2798 % \changes{4.0b}{1999/06/20}{Processing delayed to \cs{AtBeginDocument} time}
2799 %
2800 % DPC: More or less taken from \file{revtex2} \file{aps.sty},
2801 % but using dcolumn for decimal alignment.
2802 % \begin{environment}{table}
2803 % We define the \env{table} environment.
2804 % Later, we will horse around with its meaning
2805 % in order to accomodate \cmd\floats@sw.
2806 % \begin{macrocode}
2807 \newenvironment{table}
2808 {\@float{table}}
2809 {\end@float}
2810 \newenvironment{table*}
2811 {\@dblfloat{table}}
2812 {\end@dblfloat}
2813 % \end{macrocode}
2814 % \end{environment}
2815 %
2816 % \begin{macro}{\thetable}
2817 % Table counter and default float placement declarations.
2818 % \begin{macrocode}
2819 \newcounter{table}
2820 \renewcommand\thetable{\@Roman\c@table}
2821 % \end{macrocode}
2822 % Note that we give the `!' modifier by default.
2823 % This is an effort to avoid the syndrome wherein
2824 % a deferred float finds itself unqualified for
2825 % placement, thereby getting carried until \cmd\clearpage.
2826 % \begin{macrocode}
2827 \def\fps@table{tbp}
2828 \def\ftype@table{2}
2829 \def\ext@table{lot}
2830 \def\fnum@table{\tablename~\thetable}
2831 % \end{macrocode}
2832 % We allocate a box register for use in tallying the column inches of floats of this type.
2833 % \begin{macrocode}
2834 \expandafter\newbox\csname fbox@\ftype@table\endcsname
2835 \expandafter\setbox\csname fbox@\ftype@table\endcsname\hbox{}%
2836 % \end{macrocode}
2837 % \end{macro}
2838 %
2839 % \begin{macrocode}
2840 \def\listoftables{\print@toc{lot}}%
2841 \let\l@table\l@figure
2842 % \end{macrocode}
2843 %
2844 % \begin{macro}{\table@hook}
2845 % \begin{macro}{\squeezetable}
2846 % Assign a meaning to the hook installed into float processing.
2847 %
2848 % By default floats are \cmd\small. The \cmd\squeezetable\ declaration
2849 % makes them smaller (\cmd\scriptsize). In general you can locally
2850 % redefine \cmd\table@hook\ to be whatever you like.
2851 % (DPC: |\Huge\color{magenta}|\ldots?)
2852 % \begin{macrocode}
2853 \def\table@hook{\small}%
2854 \def\squeezetable{\def\table@hook{\scriptsize}}%
2855 \appdef\@floatboxreset{\table@hook}%
2856 % \end{macrocode}
2857 % \end{macro}
2858 % \end{macro}
2859 %
2860 % \subsubsection{Deferring \env{table} Floats}%
2861 %
2862 % After all packages are loaded, we decide
2863 % if tables will float or will be deferred until \cmd\printtables\ time.
2864 %
2865 % We also deal with the possibility of \env{longtable} environments.
2866 %
2867 % \begin{macrocode}
2868 \def\set@table@environments{%
2869 \floats@sw{}{%
2870 \let@environment{longtable@float}{longtable}%
2871 \let@environment{longtable}{longtable@write}%
2872 \let@environment{longtable*@float}{longtable*}%
2873 \let@environment{longtable*}{longtable*@write}%
2874 \let@environment{turnpage@float}{turnpage}%
2875 \let@environment{turnpage}{turnpage@write}%
2876 }%
2877 \do@if@floats{table}{.tbx}%
2878 }%
2879 \appdef\document@inithook{%
2880 \set@table@environments
2881 }%
2882 \appdef\class@enddocumenthook{%
2883 \printtables\relax
2884 }%
2885 \newenvironment{longtable@write}{%
2886 \write@@float{longtable}{table}%
2887 }{%
2888 \endwrite@float
2889 }%
2890 \newenvironment{longtable*@write}{%
2891 \write@@float{longtable*}{table}%
2892 }{%
2893 \endwrite@float
2894 }%
2895 \newenvironment{turnpage@write}{%
2896 \immediate\write\tablewrite{\string\begin{turnpage}}%
2897 }{%
2898 \immediate\write\tablewrite{\string\end{turnpage}}%
2899 }%
2900 % \end{macrocode}
2901 %
2902 % \begin{macro}{\printtables}
2903 % The user-level command \cmd\printtables\ determines
2904 % where the tables are to appear in a document in which
2905 % \cmd\floats@sw\ is false.
2906 % If the user invokes the \classoption{nofloats} and fails to
2907 % insert a \cmd\printtables\ command,
2908 % the tables will be printed at the end of the document.
2909 % If the command is given, but floats are not being deferred,
2910 % it amounts to a no-op.
2911 % \changes{4.0b}{1999/06/20}{only execute if appropriate}
2912 % \changes{4.0c}{1999/11/13}{*-form mandates pagebreak}
2913 % \changes{4.0d}{2000/05/17}{make longtable trigger the head, too}
2914 % \begin{macrocode}
2915 \newcommand\printtables{%
2916 \begingroup
2917 \let@environment{longtable}{longtable@float}%
2918 \let@environment{longtable*}{longtable*@float}%
2919 \let@environment{turnpage}{turnpage@anchored}%
2920 \prepdef\longtable{\trigger@float@par}%
2921 \expandafter\prepdef\csname longtable*\endcsname{\trigger@float@par}%
2922 \expandafter\prepdef\csname table@floats\endcsname{%
2923 \onecolumngrid@push
2924 }%
2925 \expandafter\appdef\csname endtable@floats\endcsname{%
2926 \onecolumngrid@pop
2927 }%
2928 \@ifstar{\true@sw}{\floatp@sw{\true@sw}{\false@sw}}%
2929 {%
2930 \print@float{table}{\oneapage}%
2931 }{%
2932 \print@float{table}{}%
2933 }%
2934 \endgroup
2935 }%
2936 \newenvironment{turnpage@anchored}{%
2937 \onecolumngrid@push
2938 \setbox\z@\vbox to\textwidth\bgroup
2939 \columnwidth\textheight
2940 }{%
2941 \vfil
2942 \egroup
2943 \rotatebox{90}{\box\z@}%
2944 \onecolumngrid@pop
2945 }%
2946 % \end{macrocode}
2947 % \end{macro}
2948 %
2949 %
2950 % \subsection{Videos}
2951 %\changes{4.1r}{2010/06/22}{(AO, 595) Provide \cs{lovname} along with other List of Videos definitions.}%
2952 %
2953 % \begin{environment}{video}
2954 % We define the \env{video} environment analogously to the
2955 % \env{figure} and \env{table} environments; it is intended to contain a video.
2956 %
2957 % \begin{macrocode}
2958 \newenvironment{video}
2959 {\@float{video}}
2960 {\end@float}%
2961 \newenvironment{video*}
2962 {\@dblfloat{video}}
2963 {\end@dblfloat}%
2964 % \end{macrocode}
2965 % \end{environment}
2966 %
2967 % \begin{macro}{\thevideo}
2968 % The video counter, float placement defaults, strings.
2969 % \begin{macrocode}
2970 \newcounter{video}
2971 \renewcommand \thevideo {\@arabic\c@video}
2972 % \end{macrocode}
2973 %
2974 % File extension and localizable strings.
2975 % \begin{macrocode}
2976 \def\ext@video{lov}%
2977 \def\fname@video{Video}%
2978 \def\lovname{List of Videos}%
2979 % \end{macrocode}
2980 %
2981 % Float type and default placement.
2982 % \begin{macrocode}
2983 \def\fps@video{tbp}%
2984 \def\ftype@video{4}%
2985 \def\fnum@video{\fname@video~\thevideo}%
2986 \appdef\document@inithook{%
2987 \@ifxundefined\c@float@type{}{%
2988 \global\setcounter{float@type}{8}%
2989 }%
2990 }%
2991 % \end{macrocode}
2992 % We allocate a box register for use in tallying the column inches of floats of this type.
2993 % \begin{macrocode}
2994 \expandafter\newbox\csname fbox@\ftype@video\endcsname
2995 \expandafter\setbox\csname fbox@\ftype@video\endcsname\hbox{}%
2996 % \end{macrocode}
2997 % The documentation for the \classname{hyperref} package, \file{hyperref.dtx} states:
2998 % ``classes or package which introduce new elements need to define
2999 % an equivalent \verb+\theH<name>+ for every \verb+\the<name>+''
3000 % We do accordingly here.
3001 % \begin{macrocode}
3002 \let\theHvideo\thevideo
3003 % \end{macrocode}
3004 % But \file{hyperref.dtx} goes on to say,
3005 % ``We do make a trap to make \verb+\theH<name>+ be the same as \verb+\arabic{<name>}+,
3006 % if \verb+\theH<name>+ is not defined\ldots''
3007 % However, it's not doing that right now (as of 6.77u),
3008 % and I cannot find any such code in there anymore.
3009 % \end{macro}
3010 %
3011 % \begin{macrocode}
3012 \def\listofvideos{\print@toc{lov}}%
3013 \let\l@video\l@figure
3014 % \end{macrocode}
3015 %
3016 % \subsubsection{Deferring \env{video} Floats}%
3017 %
3018 % We determine if videos are to float or be deferred until \cmd\printvideos\ time.
3019 % If so, we open the stream that will receive the deferred document portions.
3020 % \begin{macrocode}
3021 \appdef\class@documenthook{%
3022 \do@if@floats{video}{.vdx}%
3023 }%
3024 \appdef\class@enddocumenthook{%
3025 \printvideos\relax
3026 }%
3027 % \end{macrocode}
3028 %
3029 % \begin{macro}{\printvideos}
3030 % The user-level command \cmd\printvideos\ determines
3031 % where the videos are to appear in a document in which
3032 % \cmd\floats@sw\ is false.
3033 % If the user invokes the \classoption{endfloats} class option and fails to
3034 % insert a \cmd\printvideos\ command,
3035 % the videos will be printed at the end of the document.
3036 % If the command is given, but floats are not being deferred,
3037 % it amounts to a no-op.
3038 % \begin{macrocode}
3039 \newcommand\printvideos{%
3040 \@ifstar{\true@sw}{\floatp@sw{\true@sw}{\false@sw}}%
3041 {%
3042 \print@float{video}{\oneapage}%
3043 }{%
3044 \print@float{video}{}%
3045 }%
3046 }%
3047 % \end{macrocode}
3048 % \end{macro}
3049 %
3050 %
3051 % \section{Tabular}
3052 % Every APS tabular has a double (Scotch) rule above and below.
3053 % The column specifier ``d'' is implemented using the \classname{dcolumn}
3054 % package, if available.
3055 % FIXME: always load dcolumn!
3056 % \begin{macro}{\tabular@hook}
3057 % \begin{macro}{\endtabular@hook}
3058 % \begin{environment}{ruledtabular}
3059 % \begin{macrocode}
3060 \def\endtabular@hook{}%
3061 % \end{macrocode}
3062 % \begin{verbatim}
3063 %\RequirePackage{dcolumn}%
3064 % \end{verbatim}
3065 % \begin{macrocode}
3066 \appdef\document@inithook{%
3067 \@ifpackageloaded{dcolumn}{%
3068 \expandafter\@ifnotrelax\csname NC@find@d\endcsname{}{%
3069 \newcolumntype{d}{D{.}{.}{-1}}%
3070 }%
3071 }{}%
3072 }%
3073 \def\toprule{\hline\hline}%
3074 \def\colrule{\hline}%
3075 \def\botrule{\hline\hline}%
3076 \newenvironment{ruledtabular}{%
3077 \def\array@default{v}%
3078 \appdef\tabular@hook{\def\@halignto{to\hsize}}%
3079 \let\tableft@skip@default\tableft@skip
3080 \let\tableft@skip\tableft@skip@float
3081 \let\tabmid@skip@default\tabmid@skip
3082 \let\tabmid@skip\tabmid@skip@float
3083 \let\tabright@skip@default\tabright@skip
3084 \let\tabright@skip\tabright@skip@float
3085 \let\array@row@pre@default\array@row@pre
3086 \let\array@row@pre\array@row@pre@float
3087 \let\array@row@pst@default\array@row@pst
3088 \let\array@row@pst\array@row@pst@float
3089 \appdef\array@row@rst{%
3090 \let\array@row@pre\array@row@pre@default
3091 \let\array@row@pst\array@row@pst@default
3092 \let\tableft@skip\tableft@skip@default
3093 \let\tabmid@skip\tabmid@skip@default
3094 \let\tabright@skip\tabright@skip@default
3095 \appdef\tabular@hook{\let\@halignto\@empty}%
3096 }%
3097 }{%
3098 }%
3099 % \end{macrocode}
3100 % \end{environment}
3101 % \end{macro}
3102 % \end{macro}
3103 %
3104 % \section{Footnote Text}
3105 %
3106 % \changes{4.0a}{1998/06/10}{single space footnotes}
3107 % \changes{4.0b}{1999/06/20}{Frank Mittelbach, has stated in \protect\classname{multicol}: ``The kernel command \cs{@footnotetext} should not be modified.'' Thus, I have removed David Carlisle's redefinition of that command. Note, however, that later versions of \protect\classname{multicol} do not require this workaround. Belt and suspenders.}%
3108 %
3109 % \begin{macro}{\@makefntext}
3110 % \begin{macro}{\@makefnmark}
3111 % We customize the presentation of the footnote mark: it will not be italic.
3112 % \begin{macrocode}
3113 \def\@makefntext#1{%
3114 \def\baselinestretch{1}%
3115 \parindent1em%
3116 \noindent
3117 \hb@[email protected]{%
3118 \hss\@makefnmark
3119 }%
3120 #1%
3121 \par
3122 }%
3123 \def\@makefnmark{%
3124 \hbox{%
3125 \@textsuperscript{%
3126 \normalfont\@thefnmark
3127 }%
3128 }%
3129 }%
3130 % \end{macrocode}
3131 % \end{macro}
3132 % \end{macro}
3133 %
3134 %
3135 % \subsection{Citations, Bibliography, Endnotes}
3136 %
3137 % \subsubsection{Bibliography}
3138 %
3139 % Load Patrick Daly's \classname{natbib} package,
3140 % \url{ftp://ctan.tug.org/macros/latex/contrib/supported/natbib}
3141 %
3142 % Note that \classname{natbib} assumes that it loads
3143 % over a document class, such as the \classname{article} class,
3144 % that has already defined \env{thebibliography} and \cmd\@listi.
3145 %
3146 % Note also that \classname{natbib} also installs a command
3147 % \cmd\NAT@set@cites\ into \cmd\AtBeginDocument\ which presumes
3148 % that the proper \cmd\bibpunct\ command has been issued.
3149 %
3150 % Note that the macro \cmd\NAT@sort\ controls
3151 % whether citations are left alone (\cmd\NAT@sort=0), sorted (\cmd\NAT@sort=1), or sorted and compressed (\cmd\NAT@sort=2).
3152 % Since we give \classname{natbib} the \classoption{sort\&compress} option,
3153 % if you prefer \classoption{sort}, you need only \cmd\let \cmd\NAT@sort\ to be \cmd\@ne.
3154 % However, if you prefer the effect of having neither \classoption{sort} nor \classoption{sort\&compress},
3155 % you must \cmd\let \cmd\NAT@sort\ to be \cmd\z@ and you must also define
3156 % \cmd\let\cmd\NAT@cmprs\ to be \cmd\z@.
3157 %
3158 % As of version 8.2, \classname{natbib} now no longer binds at the point where it is read in.
3159 % This means that we can freely change \cmd\NAT@sort, \cmd\NAT@cmprs, and the new
3160 % \cmd\NAT@merge. Henceforth, we require that this later version be used.
3161 %
3162 % For other \classname{natbib} customizations, you may proceed as if you were going to use
3163 % the \file{natbib.cfg} file: anything that you can modify by this means is fair game.
3164 % Once \revtex\ is finished loading, you can assert any definitions for \classname{natbib} that you wish.
3165 %
3166 % \begin{macro}{\rev@citet}
3167 % \begin{macro}{\rev@citealp}
3168 % \begin{macro}{\rev@citealpnum}
3169 % We define variants on \classname{natbib}'s commands \cmd\citet, \cmd\citealp, and \cmd\citealpnum.
3170 % \cmd\rev@citealpnum\ uses a numerical citation.
3171 % \cmd\rev@citealp\ and \cmd\rev@citealpnum\ are the aliases of \cmd\onlinecite,
3172 % \cmd\rev@citet\ that of \cmd\textcite.
3173 %
3174 % In each case, we invoke \cmd\rtx@swap@citea\ to effect different productions between
3175 % multiple arguments to the \cmd\cite\ command.
3176 %
3177 % \cmd\rev@citealpnum\ provides textual citations where superscript citations are the default.
3178 % These should be accessible via the \cmd\citet\ command.
3179 %
3180 % Therefore we remember how to do a numerical citation
3181 % even when the superscript citation has been selected.
3182 % \begin{macrocode}
3183 \expandafter\DeclareRobustCommand
3184 \expandafter\rev@citet
3185 \expandafter{%
3186 \expandafter\begingroup
3187 \expandafter\rtx@swap@citea
3188 \expandafter\g@bblefirsttoken
3189 \csname citet \endcsname
3190 }%
3191 \expandafter\DeclareRobustCommand
3192 \expandafter\rev@citealp
3193 \expandafter{%
3194 \expandafter\begingroup
3195 \expandafter\rtx@swap@citea
3196 \expandafter\g@bblefirsttoken
3197 \csname citealp \endcsname
3198 }%
3199 \expandafter\DeclareRobustCommand
3200 \expandafter\rev@citealpnum
3201 \expandafter{%
3202 \expandafter\begingroup
3203 \expandafter\rtx@swap@citenum
3204 \expandafter\g@bblefirsttoken
3205 \csname citealp \endcsname
3206 }%
3207 \def\rtx@swap@citenum{%
3208 \rtx@swap@citea
3209 \let\@cite\NAT@citenum
3210 \let\NAT@mbox\mbox
3211 \let\citeyear\NAT@citeyear
3212 \let\NAT@space\NAT@spacechar
3213 }%
3214 \def\g@bblefirsttoken{%
3215 \expandafter\true@sw
3216 \expandafter\@empty
3217 }%
3218 % \end{macrocode}
3219 % \end{macro}
3220 % \end{macro}
3221 % \end{macro}
3222 %
3223 % \begin{macro}{\rtx@citesuper}
3224 % We prepare to redefine \classname{natbib}'s procedure \cmd\NAT@citesuper,
3225 % which is executed when setting a superscript citation.
3226 % The \cmd\hspace\ is removed: in any case, it
3227 % should really be \cmd\hspace*, to prevent an unwanted pagebreak.
3228 % \begin{macrocode}
3229 \newcommand\rtx@citesuper[3]{%
3230 \ifNAT@swa
3231 \leavevmode
3232 \unskip
3233 % \hspace{1\p@}%
3234 \textsuperscript{\normalfont#1}%
3235 \if*#3*\else\ (#3)\fi
3236 \else
3237 #1%
3238 \fi
3239 \endgroup
3240 }%
3241 % \end{macrocode}
3242 % \end{macro}
3243 %
3244 % \begin{macro}{\@makefnmark@cite}
3245 % We define a procedure that will set a footnote mark the same way that
3246 % a citation is set. If footnotes are put in the bibliography with
3247 % \cmd\footinbib@sw, then the corresponding mark should look the same
3248 % as the result of a \cmd\cite. This is how we do it.
3249 % \begin{macrocode}
3250 \def\@makefnmark@cite{\begingroup\NAT@swatrue\@cite{{\@thefnmark}}{}{}}%
3251 % \end{macrocode}
3252 % \end{macro}
3253 %
3254 % \begin{macro}{\rtx@bibsection}
3255 % Prepare to override \classname{natbib}'s definition of \cmd\bibsection.
3256 % \begin{macrocode}
3257 \def\rtx@bibsection{%
3258 \@ifx@empty\refname{%
3259 \par
3260 }{%
3261 % \let\@hangfroms@section\@hang@froms
3262 \expandafter\section\expandafter*\expandafter{\refname}%
3263 \@nobreaktrue
3264 }%
3265 }%
3266 % \end{macrocode}
3267 % \end{macro}
3268 %
3269 % \begin{macro}{\rtx@swap@citea}
3270 % \begin{macro}{\rtx@def@citea}
3271 % \begin{macro}{\rtx@def@citea@close}
3272 % \begin{macro}{\rtx@def@citea@box}
3273 % The procedures |\rtx@def@citea|, |\rtx@def@citea@close|, and |\rtx@def@citea@box|
3274 % can take over the management of \classname{natbib}'s |\@citea| macro to effect more sophisticated
3275 % behavior of the punctuation between textual citations. The switch is performed by \cmd\rtx@swap@citea.
3276 %
3277 % \changes{4.1j}{2009/10/25}{(AO, 552) Repair spacing in \cs{onlinecite}}
3278 % In these procedures, we use \cmd\count@\ to count the number of arguments of the \cmd\cite\ command,
3279 % and we use \cmd\c@NAT@ctr\ to keep track of which argument we are processing.
3280 % The latter counter is created by \classname{natbib} and used there solely in bibliography processing,
3281 % where it keeps track of the reference number.
3282 % We take over its use in these macros, but only locally; therefore these procedures should work properly, even within the bibliography.
3283 %FIXME: check whether this is true!
3284 %
3285 % Because we are using a scratch counter \cmd\count@, we are vulnerable to other \TeX\ programmers
3286 % who patch in to \classname{natbib}'s processing and who might use that counter at the same time we are doing so.
3287 % This is a potential source of trouble for us.
3288 %FIXME: store the value of \cmd\count@\ in a private \cmd\csname!
3289 %
3290 % Note that \cmd\rtx@def@citea\ begins the same as \cmd\NAT@def@citea, which it replaces,
3291 % then makes further decisions based on the values of the counters.
3292 %
3293 % Note also that, in \classname{natbib}, the replacement part of \cmd\NAT@def@citea@close\ could be rewritten as
3294 % \cmd\NAT@def@citea\cmd\prepdef\cmd\@citea\verb+{+\cmd\NAT@@close\verb+}+, which
3295 % would them obviate the need for us to override its meaning.
3296 %
3297 % Note, too, the effect of \cmd\rtx@def@citea@box, which replaces \cmd\NAT@def@citea@box,
3298 % is almost the same as the latter, except the entire \cmd\@citea\ is given as the argument
3299 % of \cmd\NAT@mbox.
3300 %
3301 % Finally, bear in mind that the English (and some American editors) do not place a comma
3302 % before the ``and''; our procedures do (but they could be rewritten with that convention).
3303 % \begin{macrocode}
3304 \def\rtx@swap@citea{%
3305 \let\NAT@def@citea\rtx@def@citea
3306 \let\NAT@def@citea@close\rtx@def@citea@close
3307 \let\NAT@def@citea@box\rtx@def@citea@box
3308 }%
3309 \def\rtx@def@citea{%
3310 \def\@citea{\NAT@separator\NAT@space}%
3311 \advance\c@NAT@ctr\@ne
3312 \@ifnum{\count@>\tw@}{%
3313 \@ifnum{\c@NAT@ctr=\count@}{\appdef\@citea{\NAT@conj\NAT@space}}{}%
3314 }{%
3315 \def\@citea{\NAT@space\NAT@conj\NAT@space}%
3316 }%
3317 }%
3318 \def\rtx@def@citea@close{%
3319 \rtx@def@citea
3320 \prepdef\@citea{\NAT@@close}%
3321 }%
3322 \def\rtx@def@citea@box{%
3323 \rtx@def@citea@close
3324 \expandafter\def\expandafter\@citea\expandafter{\expandafter\NAT@mbox\expandafter{\@citea}}%
3325 }%
3326 \def\NAT@conj{and}%
3327 % \end{macrocode}
3328 %
3329 % \end{macro}
3330 % \end{macro}
3331 % \end{macro}
3332 % \end{macro}
3333 %
3334 % \begin{macro}{\BibitemShut}
3335 % \begin{macro}{\bibAnnote}
3336 % \changes{4.1j}{2009/10/24}{(AO, 549) Repairing natbib's \cs{BibitemShut} and \cs{bibAnnote}}
3337 % \changes{4.1o}{2010/02/05}{(AO, 549) Remove patch to natbib, which is now at version 8.31a}
3338 % \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.}
3339 % We remember a temporary patch to \classname{natbib}'s definition of \cmd\BibitemShut.
3340 % \begin{macrocode}
3341 \def\NAT@BibitemShut#1{%
3342 \def\@bibstop{#1}%
3343 \let\bibitem@Stop\bibitemStop
3344 \let\bibitem@NoStop\bibitemNoStop
3345 \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{%
3346 \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}%
3347 }%
3348 }%
3349 % \end{macrocode}
3350 % The following is a bug fix to \classname{natbib} version 8.31b.
3351 % \begin{macrocode}
3352 \def\BibitemShut@ltx#1{%
3353 \unskip
3354 \def\@bibstop{#1}%
3355 \let\bibitem@Stop\bibitemStop
3356 \let\bibitem@NoStop\bibitemNoStop
3357 \@ifx{\bibitemShut\relax}{\let\@bibitemShut\@empty}{%
3358 \expandafter\def\expandafter\@bibitemShut\expandafter{\bibitemShut}%
3359 }%
3360 }%
3361 % \end{macrocode}
3362 %
3363 % \begin{verbatim}
3364 %\providecommand{\bibAnnote}[3]{%
3365 % \BibitemShut{#1}%
3366 % \def\@tempa{#3}\@ifx{\@tempa\@empty}{}{%
3367 % \begin{quotation}\noindent
3368 % \textsc{Key:}\ #2\\\textsc{Annotation:}\ \@tempa
3369 % \end{quotation}%
3370 % }%
3371 % \ignorespaces
3372 %}%
3373 %\def\@bibitemShut{}%
3374 % \end{verbatim}
3375 % \end{macro}
3376 % \end{macro}
3377 %
3378 %
3379 % \begin{macrocode}
3380 \newenvironment{thebibliography}{}{}%
3381 \let\@listi\@empty
3382 \appdef\rtx@require@packages{%
3383 \RequirePackage[sort&compress]{natbib}[2009/11/07 8.31a (PWD, AO)]%
3384 \let@environment{NAT@thebibliography}{thebibliography}%
3385 \let@environment{thebibliography}{rtx@thebibliography}%
3386 \let\bibliographystyle@latex\bibliographystyle
3387 \let\NAT@citesuper\rtx@citesuper
3388 % \end{macrocode}
3389 %
3390 % \begin{macro}{\NAT@bibsetnum}
3391 % \begin{macro}{\NAT@bibsetup}
3392 % \begin{macro}{\bibpreamble}
3393 % \begin{macro}{\newblock}
3394 % \begin{macro}{\bibnumfmt}
3395 % \begin{macro}{\NAT@merge}
3396 % We define the sectioning command to use when starting the bibliography
3397 % and gently coax \classname{natbib} into using
3398 % the formatting procedures that \emph{we} want it to use.
3399 %
3400 % This way of setting up \env{thebibliography}
3401 % automatically sets the label width based on
3402 % the largest number used within the bibliography.
3403 % This scheme will not work properly using the
3404 % author/year style of bib entry, though.
3405 %
3406 % We define \cmd\bibnumfmt\ to be \cmd\place@bibnumber, which is a macro
3407 % managed by \revtex. If the document defines \cmd\bibnumfmt, then that
3408 % definition will be used instead, which is what the \classname{natbib}
3409 % package gives as its programming interface.
3410 %
3411 % We set \cmd\NAT@merge\ to \cmd\tw@, which turns on \classname{natbib}'s
3412 % \classname{mcite} capabilities. This is the default setting.
3413 % If numerical citations are not to be used, then \cmd\NAT@merge\
3414 % should be set to \cmd\@ne\ (syntax is still enabled, but semantics are turned off).
3415 % \begin{macrocode}
3416 \let\bibsection\rtx@bibsection
3417 \let\NATx@bibsetnum\NAT@bibsetnum
3418 \def\NAT@bibsetnum#1{%
3419 \setlength{\topsep}{\z@}%
3420 \NATx@bibsetnum{\ref{LastBibItem}}%
3421 }%
3422 \let\NATx@bibsetup\NAT@bibsetup
3423 \def\NAT@bibsetup{%
3424 \setlength{\labelwidth}{\z@}%
3425 \setlength{\labelsep}{\z@}%
3426 \setlength{\itemindent}{\z@}%
3427 \setlength{\listparindent}{\z@}%
3428 \setlength{\topsep}{\z@}%
3429 \setlength{\parsep}{\z@}%
3430 \NATx@bibsetup
3431 }%
3432 \let\bibpreamble\@empty
3433 \def\newblock{\ }%
3434 \let\NATx@bibnumfmt\bibnumfmt
3435 \def\bibnumfmt{\place@bibnumber}%
3436 \let\NAT@merge\thr@@
3437 \let\NAT@citeyear\citeyear
3438 \let\onlinecite\rev@citealp
3439 \let\textcite\rev@citet
3440 % \end{macrocode}
3441 % The following is needed until \classname{natbib} is at 8.31b.
3442 % \begin{macrocode}
3443 \@ifx{\BibitemShut\NAT@BibitemShut}{%
3444 \class@info{Repairing natbib's \string\BibitemShut}%
3445 \let\BibitemShut\BibitemShut@ltx
3446 }{}%
3447 % \end{macrocode}
3448 % \end{macro}
3449 % \end{macro}
3450 % \end{macro}
3451 % \end{macro}
3452 % \end{macro}
3453 % \end{macro}
3454 %
3455 % \begin{macro}{\bibliographystyle}
3456 % \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}%
3457 % \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
3458 % We arrange for the selection of bibliography style
3459 % to occur either due to the document's explicit
3460 % \cmd\bibliographystyle\ statement or
3461 % via the journal substyle.
3462 %
3463 % Note that \revtex\ is incompatible with
3464 % any package that patches \cmd\bibliographystyle.
3465 % Since \classname{natbib} does this, we need a fix.
3466 %
3467 % The Boolean \cmd\bibliographystyle@sw\ signifies that the document contains explicit
3468 % \cmd\bibliographystyle\ markup. If, on the contrary, the bibliography style is set by
3469 % the the society or the journal, then no explicit \cmd\bibliographystyle\ command appears in the document instance.
3470 % In this case \cmd\bibliographystyle@sw\ will be \cmd\false@sw.
3471 % \begin{macrocode}
3472 \let\bibliographystyle@latex\bibliographystyle
3473 \def\bibliographystyle{\@booleantrue\bibliographystyle@sw\def\@bibstyle}%
3474 \@booleanfalse\bibliographystyle@sw
3475 % \end{macrocode}
3476 % \end{macro}
3477 %
3478 % \changes{4.1j}{2009/11/03}{(AO, 551) Punctuation at end of reference when optional arguments to the cite key are given.}
3479 % The following had been bug fixes to \classname{natbib} version 8.31a.
3480 % \begin{verbatim}
3481 %\def\bibitemStop{\@bibitemShut}%
3482 %\def\NAT@bibitem@cont{%
3483 % \let\bibitem@Stop\bibitemContinue
3484 % \let\bibitem@NoStop\bibitemContinue
3485 %}%
3486 % \end{verbatim}
3487 % The following are alterations to \classname{natbib} version 8.31a to
3488 % accommodate the possible space character preceding \cmd\BibitemShut,
3489 % and to handle the case of merged references, where the first ends with a stop character.
3490 % \changes{4.1o}{2010/02/07}{(AO, 578) accommodate the possible space character preceding \cs{BibitemShut}.}
3491 % \changes{4.1o}{2010/02/09}{(AO, 581) Handle case: merged references, with first ending in a stop character.}
3492 % \begin{macrocode}
3493 \def\NAT@bibitem@cont{%
3494 \let\bibitem@Stop\bibitemContinue@Stop
3495 \let\bibitem@NoStop\bibitemContinue
3496 }%
3497 % \end{macrocode}
3498 % \begin{macrocode}
3499 \def\bibitemNoStop{%
3500 \@ifx@empty\@bibitemShut{.\spacefactor\@mmm\space}{\@bibitemShut}%
3501 }%
3502 % \end{macrocode}
3503 % \begin{macrocode}
3504 \def\bibitemContinue{%
3505 \@ifx@empty\@bibitemShut{;\spacefactor\@mmm\space}{\@bibitemShut}%
3506 }%
3507 % \end{macrocode}
3508 % \begin{macrocode}
3509 \def\bibitemContinue@Stop{%
3510 \@ifx@empty\@bibitemShut{\spacefactor\@mmm\space}{\@bibitemShut}%
3511 }%
3512 % \end{macrocode}
3513 %
3514 % \changes{4.1k}{2009/11/11}{(AO, 561) remove dead code relating to \cs{bibitemContinue}}
3515 % We used to customize one of the productions of \classname{natbib}, but no longer.
3516 % \begin{verbatim}
3517 %\let\bibitemContinue\bibitemContinue@rtx
3518 % \end{verbatim}
3519 %
3520 % Here ends the code to be executed at \cmd\rtx@require@packages\ time.
3521 % \begin{macrocode}
3522 }%
3523 % \end{macrocode}
3524 % \changes{4.1f}{2009/07/07}{(AO, 516) Merged references are separated with a semicolon}
3525 % Redefine a macro of \classname{natbib} so that merged references are separated with a semicolon.
3526 % \changes{4.1k}{2009/11/11}{(AO, 561) remove dead code relating to \cs{bibitemContinue}}
3527 % \begin{verbatim}
3528 % \def\bibitemContinue@rtx{;\spacefactor\@mmm\space}%
3529 % \end{verbatim}
3530 %
3531 % \begin{macro}{\onlinecite}
3532 % \begin{macro}{\textcite}
3533 % We extend \classname{natbib}'s syntax with two commands to set a citation
3534 % on the baseline (as opposed to superscripted) and as text (rather than parenthetical), respectively.
3535 % A journal substyle that makes citations be superscripted or parenthetical as the case may be, should ensure
3536 % that the author has continued access to these two styles.
3537 %
3538 % Note that the society or journal substyle override the meanings of \cmd\@onlinecite\ or
3539 % \cmd\@textcite\ given here.
3540 %
3541 % \begin{macrocode}
3542 \DeclareRobustCommand\onlinecite{\@onlinecite}%
3543 \DeclareRobustCommand\textcite{\@textcite}%
3544 % \end{macrocode}
3545 % \end{macro}
3546 % \end{macro}
3547 %
3548 % \begin{macro}{\bibliography}
3549 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
3550 % Provide a hook for supplying Bib\TeX\ a bibliographic database that may contain, say,
3551 % footnotes.
3552 %
3553 % Note that Bib\TeX\ chokes if the argument of the \cmd\bibdata\ command has null fields,
3554 % hence these tests.
3555 % \begin{macrocode}
3556 \let\bibliography@latex\bibliography
3557 \def\bibliography#1{%
3558 \auto@bib@empty
3559 \begingroup
3560 \let\auto@bib@innerbib\@empty
3561 \@ifx@empty{\pre@bibdata}{%
3562 \bibliography@latex{#1}%
3563 }{%
3564 \@if@empty{#1}{%
3565 \expandafter\bibliography@latex\expandafter{\pre@bibdata}%
3566 }{%
3567 \expandafter\bibliography@latex\expandafter{\pre@bibdata,#1}%
3568 }%
3569 }%
3570 \endgroup
3571 }%
3572 \let\pre@bibdata\@empty
3573 % \end{macrocode}
3574 % \end{macro}
3575 %
3576 % \begin{environment}{rtx@thebibliography}%
3577 % \begin{macro}{\present@bibnote}%
3578 % \changes{4.1f}{2009/07/11}{(AO, 521) Lonely bibliography head}%
3579 % \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
3580 % \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}%
3581 % \changes{4.1q}{2010/04/01}{(AO, 586) When .bbl is pasted into the document, prevent automatic bibliography inclusion.}%
3582 % We put a tail patch into \cmd\thebibliogrphy\ and
3583 % a headpatch into \cmd\endthebibliography.
3584 %
3585 % Here we provide a default treatment for frontmatter notes
3586 % deferred to the bibliography; a journal substyle
3587 % might want to override the definition of \cmd\present@bibnote.
3588 %
3589 % We make provisions for the case where there are no \cmd\bibitem s
3590 % for the bibliography: we produce no bibliography head at all.
3591 %
3592 % \begin{macrocode}
3593 \newenvironment{rtx@thebibliography}[1]{%
3594 \NAT@thebibliography{#1}%
3595 \let\@TBN@opr\present@bibnote
3596 \@FMN@list
3597 }{%
3598 % \end{macrocode}
3599 % The following line was commented out:
3600 % \begin{verbatim}
3601 %\@endnotesinbib
3602 % \end{verbatim}
3603 % The \cmd\auto@bib@innerbib\ directive has been moved from the begin processing to the end processing.
3604 % This means that the content of the \env{thebibliography} environment can itself prevent the
3605 % automatic reading in of the .bbl file. This would be needed when the user has pasted in the
3606 % content of the .bbl file into the document itself, something required by APS and AIP editorial direction.
3607 % \begin{macrocode}
3608 \auto@bib@innerbib
3609 \edef\@currentlabel{\arabic{NAT@ctr}}%
3610 \label{LastBibItem}%
3611 \endNAT@thebibliography
3612 \aftergroup\auto@bib@empty
3613 }%
3614 \def\present@bibnote#1#2{%
3615 \item[%
3616 \textsuperscript{%
3617 \normalfont
3618 \Hy@raisedlink{\hyper@anchorstart{frontmatter.#1}\hyper@anchorend}%
3619 \begingroup
3620 \csname c@\@mpfn\endcsname#1\relax
3621 \frontmatter@thefootnote
3622 \endgroup
3623 }%
3624 ]#2\par
3625 % \end{macrocode}
3626 % The following line was commented out:
3627 % \begin{verbatim}
3628 %\global\let\NAT@bibitem@first@sw\@secondoftwo
3629 % \end{verbatim}
3630 % \begin{macrocode}
3631 }%
3632 % \end{macrocode}
3633 % \end{macro}
3634 % \end{environment}
3635 %
3636 % \begin{macro}{write@bibliographystyle}
3637 % \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
3638 % We wish to delay committing the \cmd\bibliographystyle\ until as late as possible.
3639 % The journal substyle will define a default bibliography style, and
3640 % the document's explicit \cmd\bibliographystyle\ command, if any, will override that default.
3641 %
3642 % The \cmd\bibstyle\ command is allowed appear quite late in the \file{.aux} file.
3643 % We now delay the automatic writing of the \cmd\bibstyle\ command to the end of the job.
3644 %
3645 % The procedure \cmd\write@bibliographystyle\ tests whether a \cmd\bibliographystyle\ command has
3646 % already been given.
3647 % If not, it effectively executes the needed \cmd\bibliographystyle\ command, then neutralizes itself
3648 % (we only need to do this once per job).
3649 %
3650 % If the document lacks explicit \cmd\bibliographystyle\ markup, we execute
3651 % \cmd\@bibdataout@rev, a hook for \revtex-aware processing.
3652 % \begin{macrocode}
3653 \def\write@bibliographystyle{%
3654 \@ifxundefined\@bibstyle{}{%
3655 \expandafter\bibliographystyle@latex\expandafter{\@bibstyle}%
3656 \bibliographystyle@sw{}{\@bibdataout@rev}%
3657 }%
3658 \global\let\write@bibliographystyle\relax
3659 }%
3660 \AtEndDocument{\write@bibliographystyle}%
3661 % \end{macrocode}
3662 % \end{macro}
3663 %
3664 % \begin{macro}{\rtx@@citetp}
3665 % \begin{macro}{\rtx@citex}
3666 % \begin{macro}{\super@cite@let}
3667 % \begin{macro}{\super@cite@end}
3668 % \begin{macro}{\super@cite@swap}
3669 % We wish to extend \classname{natbib} to move spaces and citations around
3670 % a superscript-style citation, imitating Donald Arseneau's \classname{cite} package
3671 % with the \classoption{super}.
3672 %
3673 % The \cmd\rtx@@citetp\ procedure is substituted for \cmd\NAT@@citetp;
3674 % it then calls the \cmd\rtx@citex\ procedure and implements the features of the
3675 % \classoption{citeautoscript} class option.
3676 % In the end, \cmd\@citex\ is called with its customary parameters.
3677 %
3678 % The document should be marked up as if citations were \emph{not} superscripted,
3679 % and then if you select a journal substyle that has superscripted citations, \revtex\ will do its best
3680 % to alter the formatting of the \cmd\cite s to accomodate superscript style.
3681 %
3682 % Only citations set as superscript are affected by this procedure,
3683 % because we check \cmd\@cite\ against \cmd\NAT@citesuper.
3684 %
3685 % Here's a subtle point: when is the argument of \cmd\super@cite@swap\ not the same as the token \cmd\@let@token?
3686 % Answer: when the latter is \cmd\@sptoken! This case has to be handled separately.
3687 %
3688 % Note that whether a punctuation is movable is determined by the definition
3689 % of a particular control sequence name.
3690 % A society or journal can alter things: to remove a character from the set,
3691 % do, say, \cmd\expandafter \cmd\let \cmd\csname \texttt{rtx@automove;} \cmd\endcsname \cmd\relax.
3692 % To add a character to the set, do, say, \cmd\expandafter \cmd\let \cmd\csname \texttt{rtx@automove;} \cmd\endcsname \cmd\@empty.
3693 %
3694 % Implementation note: due to a \TeX\ peculiarity, we have to check for the case
3695 % where \cmd\@let@token\ is a space token \emph{before} we parse forward.
3696 % At issue is the corner case where an end of file is at hand. If we
3697 % were to let \cmd\super@cite@swap\ parse forward, we would encounter a \TeX\ end-of-file
3698 % error. Note that the test will be true in many distinct cases:
3699 % the file ends, the next character is a line terminator, the next character is a space.
3700 % \begin{macrocode}
3701 \def\rtx@@citetp[#1]{\@ifnextchar[{\rtx@citex[#1]}{\rtx@citex[][#1]}}%
3702 \def\rtx@citex[#1][#2]#3{%
3703 \begingroup
3704 \def\@tempa{[#1][#2]{#3}}%
3705 \@ifx{\@cite\NAT@citesuper}{%
3706 \leavevmode
3707 \skip@\lastskip
3708 \unskip
3709 \super@cite@let
3710 }{%
3711 \super@cite@end
3712 }%
3713 }%
3714 \def\super@cite@let{%
3715 \futurelet\@let@token\super@cite@check
3716 }%
3717 \def\super@cite@end{%
3718 \aftergroup\@citex\expandafter\endgroup\@tempa
3719 }%
3720 \def\super@cite@check{%
3721 \@ifx{\@let@token\@sptoken}{%
3722 \super@cite@end
3723 }{%
3724 \super@cite@swap
3725 }%
3726 }%
3727 \long\def\super@cite@swap#1{%
3728 \expandafter\@ifx\expandafter{\csname rtx@automove#1\endcsname\@empty}{%
3729 #1%
3730 \super@cite@let
3731 }{%
3732 \super@cite@end
3733 #1%
3734 }%
3735 }%
3736 \expandafter\let\csname rtx@automove.\endcsname\@empty
3737 \expandafter\let\csname rtx@automove,\endcsname\@empty
3738 \expandafter\let\csname rtx@automove:\endcsname\@empty
3739 \expandafter\let\csname rtx@automove;\endcsname\@empty
3740 % \end{macrocode}
3741 % \end{macro}
3742 % \end{macro}
3743 % \end{macro}
3744 % \end{macro}
3745 % \end{macro}
3746 %
3747 % The following must execute only after \classname{natbib} is loaded and has set
3748 % up its parameters (which it does at \cmd\AtBeginDocument\ time).
3749 % If superscript citations have been selected, and
3750 % if the \classoption{citeautoscript} class option has been selected,
3751 % we patch into \classname{natbib}'s mechanism to migrate punctuation around the
3752 % citation, as in class \classname{cite} with the \classoption{superscript} option.
3753 % \begin{macrocode}
3754 \appdef\class@documenthook{%
3755 \citeautoscript@sw{%
3756 \@ifx{\@cite\NAT@citesuper}{%
3757 \let\NAT@@citetp\rtx@@citetp
3758 }{}%
3759 }{}%
3760 }%
3761 % \end{macrocode}
3762 %
3763 % Resolve an incompatability between \classname{natbib} and \classname{listings}.
3764 % The latter package tests \cmd\chapter (which has now been \cmd\let\ to \cmd\relax\ as a side effect \classname{natbib}'s use of \LaTeX's \cmd\@ifundefined).
3765 %
3766 % We couch our fix in such terms that will not be disruptive if \cmd\chapter\ is actually defined at this point.
3767 %
3768 % \changes{4.1b}{2008/07/01}{(AO) No longer need to test \cs{chapter} as of \texttt{natbib} version 8.2}
3769 % \begin{verbatim}
3770 %\@ifx{\chapter\relax}{\let\chapter\@undefined}{}%
3771 % \end{verbatim}
3772 %
3773 %
3774 % \subsubsection{\cs{endnote}s and \cs{rtx@bibnote}s}
3775 %
3776 % \begin{macro}{\mini@note}
3777 % \begin{macro}{\save@note}
3778 % \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
3779 % QUERY: how do footnotes get thrown to the bibliography. \cmd\footinbib@sw\ appears to be irrelevant.
3780 % \begin{macrocode}
3781 \def\mini@note{\save@note\mini@notes}%Implicit #2
3782 \def\save@note#1#2{%
3783 \stepcounter\@mpfn
3784 \protected@xdef\@thefnmark{\thempfn}%
3785 \@footnotemark
3786 \expandafter\g@addto@macro
3787 \expandafter#1%
3788 \expandafter{%
3789 \expandafter \@@footnotetext
3790 \expandafter {\@thefnmark}{#2}%
3791 }%
3792 }%
3793 \long\def\@@footnotetext#1{\def\@thefnmark{#1}\@footnotetext}%
3794 \let\mini@notes\@empty
3795 % \end{macrocode}
3796 % \end{macro}
3797 % \end{macro}
3798 %
3799 % \begin{macro}{\endnote}
3800 % A version of footnote that appears in the bibliography, or where \cmd\printendnotes\ appears.
3801 % \begin{verbatim}
3802 %\def\@endnote{%
3803 % \begingroup
3804 % \aftergroup\@footnotemark
3805 % \aftergroup\@endnotetext
3806 % \@ifnextchar[{%
3807 % \@xendnote
3808 % }{%
3809 % \stepcounter{footnote}%
3810 % \protected@xdef\@tempa{\thefootnote}%
3811 % \expandafter\@xendnote\expandafter[\the\c@footnote]%
3812 % }%
3813 %}%
3814 % \end{verbatim}
3815 % \end{macro}
3816 %
3817 % \begin{macro}{\@xendnote}
3818 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
3819 % \begin{verbatim}
3820 %\def\unused@xendnote[#1]{%
3821 % \begingroup
3822 % \c@footnote#1\relax
3823 % \end{macrocode}
3824 % New for 4.1
3825 % \begin{macrocode}
3826 % \unrestored@protected@xdef\@endnotelabel{Note\thefootnote}%
3827 % \authoryear@sw{%
3828 % \unrestored@protected@xdef\@thefnmark{\noexpand\ref{\@endnotelabel}}%
3829 % }{%
3830 % \unrestored@protected@xdef\@thefnmark{\@endnotelabel}%
3831 % }%
3832 % \end{macrocode}
3833 % Was:
3834 % \unrestored@protected@xdef\@thefnmark{endnote\thefootnote}%
3835 % End 4.1 changes
3836 % \begin{macrocode}
3837 % \endgroup
3838 % \endgroup
3839 %}%
3840 %\def\@endnotemark{%
3841 % \expandafter\cite\expandafter{\@thefnmark}%
3842 %}%
3843 % \end{verbatim}
3844 % \begin{macrocode}
3845 \def\rev@citemark#1{%
3846 \expandafter\cite\expandafter{\@thefnmark}%
3847 }%
3848 \def\rev@endtext#1{%
3849 \let\@endnotelabel\@thefnmark
3850 \@endnotetext
3851 }%
3852 % \end{macrocode}
3853 % \end{macro}
3854 %
3855 % \begin{macro}{\endnote@ext}
3856 % \begin{macro}{\bibdata@app}
3857 % \begin{macro}{\bibdata@ext}
3858 % The macro \cmd\endnote@ext\ is the file extension for the auxiliary file holding footnotes.
3859 % The \cmd\bibdata@app\ and \cmd\bibdata@ext\ macros are used to form the name of a
3860 % Bib\TeX\ database file holding footnotes.
3861 % \begin{macrocode}
3862 \def\endnote@ext{.end}%
3863 \def\bibdata@app{Notes}%
3864 \def\bibdata@ext{bib}%
3865 % \end{macrocode}
3866 % \end{macro}
3867 % \end{macro}
3868 % \end{macro}
3869 %
3870 % \begin{macro}{\@endnotetext}
3871 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
3872 % The procedure \cmd\@endnotetext\ writes a Bib\TeX\ .bib file for the purpose
3873 % of insering a footnote into the (numbered, unsorted) bibliography.
3874 %
3875 % We need to define \cmd\pre@bibdata\ to be
3876 % \cmd\jobname\cmd\endnote@ext, and we probably should define \cmd\endnote@ext\ to
3877 % be something like ``Notes.bib''.
3878 %
3879 % In each case, the material to be written out requires robustification, provided by \cmd\endnote@relax.
3880 % The commands \cmd\label, \cmd\index, and \cmd\glossary,
3881 % which are robustified for \cmd\markright\ and \cmd\addcontentsline,
3882 % are likewise robustified here.
3883 %
3884 % Procedure \cmd\@endnotetext@note\ is the alias for \cmd\@endnotetext\ when the endnotes are to be
3885 % processed separately from the bibliography (generally true when citations are not sorted).
3886 % \begin{verbatim}
3887 %\long\def\unused@endnotetext@note#1{%
3888 % \@ifxundefined\@endnoteout{%
3889 % \newwrite\@endnoteout
3890 % \gdef\endnote@stream{\jobname\endnote@ext}%
3891 % \immediate\openout\@endnoteout\endnote@stream\relax
3892 % }{}%
3893 % \begingroup
3894 % \endnote@relax
3895 % \immediate\write\@endnoteout{\string\@doendnote{\@endnotelabel}{#1}}%
3896 % \endgroup
3897 %}%
3898 % \end{verbatim}
3899 %
3900 % \cmd\@doendnote\ is obsolete.
3901 % \begin{verbatim}
3902 %\def\@doendnote#1#2{\bibitem{#1}#2}%
3903 % \end{verbatim}
3904 %
3905 % \changes{4.1o}{2010/02/05}{(AO, 579) Endnote shall comprise their own Bib\TeX\ entry type: @FOOTNOTE.}
3906 % Procedure \cmd\@endnotetext\ is the operative procedure\ when the endnotes are to be
3907 % collated in with the other references, typically true when numerical citations are being used.
3908 % The technique involves writing a .bib file (\cmd\@bibdataout) with each endnote typed as
3909 % a \texttt{@FOOTNOTE} entry.
3910 %
3911 % Timing note: doing \cmd\openout\ should be deferred until the beginning of the document,
3912 % as is done here. This allows one to make a format (\filename{.fmt}) file out of this class.
3913 % \begin{macrocode}
3914 \long\def\@endnotetext#1{%
3915 \begingroup
3916 \endnote@relax
3917 \immediate\write\@bibdataout{%
3918 @FOOTNOTE{%
3919 \@endnotelabel,%
3920 % \end{macrocode}
3921 % The \texttt{key} field is recommended in cases where there is no author (see \filename{btxdoc}).
3922 % \begin{macrocode}
3923 key="\@endnotelabel",%
3924 % \end{macrocode}
3925 % The \texttt{note} field is simply the content of the footnote.
3926 % \begin{macrocode}
3927 note="#1"%
3928 }%
3929 }%
3930 \endgroup
3931 }%
3932 \newwrite\@bibdataout
3933 % \end{macrocode}
3934 % \end{macro}
3935 %
3936 % \begin{macro}{\endnote@relax}
3937 % At \cmd\AtBeginDocument\ time, we open the job's \filename{.bib} file.
3938 %
3939 % Procedure \cmd\endnote@relax\ robustifies commands that ought not to be expanded when
3940 % the endnote is written out.
3941 % Note the similarity between \cmd\endnote@relax\ and \cmd\protected@write.
3942 % \begin{macrocode}
3943 \def\endnote@relax{%
3944 \let\label\relax \let\index\relax \let\glossary\relax
3945 \let\cite \relax \let\ref \relax \let\pageref \relax
3946 \let\( \relax \let\) \relax \let\\ \relax
3947 \let~\relax
3948 % \end{macrocode}
3949 % \begin{verbatim}
3950 %\let\protect\noexpand
3951 % \end{verbatim}
3952 % \begin{macrocode}
3953 \let \protect \@unexpandable@protect
3954 \newlinechar`\^^M%
3955 % \end{macrocode}
3956 % \begin{verbatim}
3957 %\newlinechar`\ %
3958 % \end{verbatim}
3959 % \begin{macrocode}
3960 \let\begin\relax \let\end\relax
3961 }%
3962 % \end{macrocode}
3963 % \end{macro}
3964 %
3965 % \begin{macro}{\@bibdataout@init}
3966 % \begin{macro}{\@bibdataout@aps}
3967 % \changes{4.1o}{2010/02/10}{(AO, 580) Provide a document class option to turn off production of eprint field in bibliography.}
3968 % \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
3969 % \changes{4.1q}{2010/04/13}{(AO, 588) Only write \revtex-specific BibTeX .bib data if the .bst style is set by REVTeX.}%
3970 %\changes{4.2b}{2018/12/26}{(MD) Improve control over display of e-print ids in bibliography.}%
3971 % At \cmd\AtBeginDocument\ time, we open the job's \filename{.bib} file.
3972 % The hook is available for use by a society to place its own @CONTROL record in the \cmd\@bibdataout\ stream.
3973 % \begin{macrocode}
3974 \appdef\class@documenthook{\@bibdataout@init}%
3975 \def\@bibdataout@init{%
3976 \immediate\openout\@bibdataout\pre@bibdata.\bibdata@ext\relax
3977 }%
3978 \def\@bibdataout@rev{%
3979 \immediate\write\@bibdataout{%
3980 % \end{macrocode}
3981 % The entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
3982 % The citation key (REVTEX42Control) is effectively a version number,
3983 % which the \filename{.bst} can use to interpret the bib entry.
3984 % \begin{macrocode}
3985 @CONTROL{%
3986 REVTEX42Control%
3987 % \end{macrocode}
3988 % Say if we want the \texttt{eprint} field disabled. Otherwise accept the default of the \filename{.bst}.
3989 % \begin{macrocode}
3990 \eprint@enable@sw{}{,eprint="1"}%
3991 }%
3992 }%
3993 % \end{macrocode}
3994 % Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
3995 % \begin{macrocode}
3996 \if@filesw
3997 \immediate\write\@auxout{\string\citation{REVTEX42Control}}%
3998 \fi
3999 }%
4000 % \end{macrocode}
4001 % \end{macro}
4002 % \end{macro}
4003 %
4004 % \begin{macro}{\printendnotes}
4005 % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
4006 % We have removed the endnotes facility from REVTeX, so the \cmd\printendnotes\ command now does nothing.
4007 %
4008 % Moving footnotes to the bibliogrphy is now accomplished through
4009 % the automatic generation of a job BiB\TeX\ database (called \cmd\pre@bibdata) containing the footnotes.
4010 % \begin{macrocode}
4011 \def\printendnotes{%
4012 \class@warn{The \string\printendnotes\space command no longer serves any function. Please remove it from your document.}%
4013 }%
4014 % \end{macrocode}
4015 % \end{macro}
4016 %
4017 % \begin{macro}{\@endnotesinbib}
4018 % \begin{macro}{\@endnotesinbibliography}
4019 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
4020 % We define a function \cmd\@endnotesinbib,
4021 % and a variant \cmd\@endnotesinbibliography.
4022 % The former is invoked at the start of
4023 % the end processing for \enve{thebibliography};
4024 % the latter is a synonym.
4025 %
4026 % The procedure typesets the footnotes that are to
4027 % appear in the bibliography; the default is to
4028 % simply arrange for the footnote counter to be
4029 % reset at the start of the document.
4030 %
4031 % Note that this code make the assumption that
4032 % the counter used in \env{thebibliography} is \cmd\c@NAT@ctr.
4033 % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
4034 %
4035 % Here is the sole place where \cmd\footinbib@sw\ has an effect, other code simple assigning its value.
4036 % If it is false, or \cmd\authoryear@sw\ is true, then footnotes are handled by the default mechanism.
4037 % \begin{macrocode}
4038 \def\make@footnote@endnote{%
4039 \footinbib@sw{%
4040 \authoryear@sw{}{%
4041 \ltx@footnote@push
4042 \def\thempfn{Note\thefootnote}%
4043 \let\ltx@footmark\rev@citemark
4044 \let\ltx@foottext\rev@endtext
4045 % \end{macrocode}
4046 % The endnotes facility has been removed.
4047 % Also, there is no need to queue up \cmd\auto@bib\ here, since it is always queued up elsewhere.
4048 % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
4049 % \begin{verbatim}
4050 % \appdef\class@enddocumenthook{\auto@bib}%
4051 % \let\printendnotes\relax
4052 % \end{verbatim}
4053 % \begin{macrocode}
4054 }%
4055 }{}%
4056 }%
4057 % \end{macrocode}
4058 %
4059 % \begin{macrocode}
4060 \def\ltx@footnote@push{%
4061 \let\ltx@footmark@latex\ltx@footmark
4062 \let\ltx@foottext@latex\ltx@foottext
4063 \let\thempfn@latex\thempfn
4064 \def\ltx@footnote@pop{%
4065 \let\ltx@footmark\ltx@footmark@latex
4066 \let\ltx@foottext\ltx@foottext@latex
4067 \let\thempfn\thempfn@latex
4068 }%
4069 }%
4070 % \end{macrocode}
4071 %
4072 % The switchover to setting footnotes in the bibliography
4073 % changes the meaning of \cmd\footnote\ and
4074 % substitutes the synonym for \cmd\@endnotesinbib.
4075 %
4076 % We arrange for the procedure \cmd\make@footnote@endnote\ to be executed
4077 % at \cmd\class@documenthook\ time (we mustn't do this earlier because
4078 % the meaning of \cmd\@footnotemark\ must not be changed before then,
4079 % for the sake of \file{ltxutil.dtx}).
4080 % \begin{macrocode}
4081 \appdef\class@documenthook{%
4082 \make@footnote@endnote
4083 }%
4084 % \end{macrocode}
4085 % \end{macro}
4086 % \end{macro}
4087 %
4088 % \begin{macro}{\auto@bib}
4089 % \begin{macro}{\auto@bib@empty}
4090 % \begin{macro}{\test@bbl@sw}
4091 % \begin{macro}{\bibitem@set}
4092 % \begin{macro}{\auto@bib@innerbib}
4093 % \begin{macro}{\thebibliography@nogroup}
4094 % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
4095 % \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
4096 % \changes{4.1o}{2010/02/02}{(AO, 575) Automatically incorporate the (Bib\TeX-generated) .bbl into an explicit \env{thebibliography}}%
4097 % Under some circumstances, we must typeset the bibliography automatically.
4098 % If the document requires footnotes to be set in the bibliography (effectively, class option \texttt{footinbib}),
4099 % or that frontmatter footnotes be set in the bibliography (effectively, class option \texttt{bibnotes}),
4100 % but contains no explicit \cmd\bibliography\ statement.
4101 %
4102 % Note that this facility is not able to work more than once per document.
4103 % If multiple bibliographys are required (e.g., per article), it will be the responsibility of the journal style
4104 % to restore \cmd\auto@bib\ to its original meaning so it can be re-invoked.
4105 %
4106 % In procedure \cmd\auto@bib, we first test for the presence of frontmatter footnotes deferred to the bibliography.
4107 % If none, we further test for the presence of \cmd\bibitem\ commands in the job's \filename{.bbl} file.
4108 % If either condition is met, we ask for a bibliography.
4109 % We know that the document itself lacks a \cmd\bibliography\ statement,
4110 % so we know the argument of the \cmd\bibliography\ that we will issue.
4111 % \begin{macrocode}
4112 \def\auto@bib{%
4113 \@ifx@empty\@FMN@list{%
4114 \footinbib@sw{%
4115 \@ifnum{\csname c@\@mpfn\endcsname>\z@}{%
4116 \true@sw
4117 }{%
4118 \test@bbl@sw
4119 }%
4120 }{%
4121 \test@bbl@sw
4122 }%
4123 }{%
4124 \true@sw
4125 }%
4126 {%
4127 \bibliography{}%
4128 }{}%
4129 }%
4130 \def\auto@bib@empty{%
4131 \let\auto@bib\@empty
4132 }%
4133 % \end{macrocode}
4134 % Testing the \filename{.bbl} file involves defanging all expected commands
4135 % and processing that file inside a box register (that will be simply discarded).
4136 % We provide a new meaning for the \cmd\bibitem\ command: it queues a Boolean.
4137 % \begin{macrocode}
4138 \def\test@bbl@sw{%
4139 \setbox\z@\vbox\bgroup
4140 \let\providecommand\providecommand@j@nk
4141 \let\bibfield\@gobbletwo
4142 \let\bibinfo\@gobbletwo
4143 \let\translation\@gobble
4144 \let\BibitemOpen\@empty
4145 \let\bibitemStop\@empty
4146 \let\bibitemNoStop\@empty
4147 \let\EOS\@empty
4148 \let\BibitemShut\@gobble
4149 \let\bibAnnoteFile\@gobbletwo
4150 \let\bibAnnote\@gobblethree
4151 \let\textbf\@gobble
4152 \let\emph\@gobble
4153 \@booleanfalse\bibitem@sw
4154 \let\bibitem\bibitem@set
4155 \auto@bib@innerbib
4156 \bibitem@sw{\aftergroup\true@sw}{\aftergroup\false@sw}%
4157 \egroup
4158 }%
4159 % \end{macrocode}
4160 % The \cmd\bibitem@set\ is an alias for \cmd\bibitem\ for the purpose of detecting a non-trivial bibliography.
4161 % \begin{macrocode}
4162 \newcommand\bibitem@set[1][]{%
4163 \bibitem@sw{}{%
4164 \@booleantrue\bibitem@sw
4165 \aftergroup\@booleantrue\aftergroup\bibitem@sw
4166 }%
4167 }%
4168 % \end{macrocode}
4169 % The \cmd\auto@bib@innerbib\ procedure reads in the \filename{.bbl} file (if it exists)
4170 % within a context where its \env{thebibliography} environment does nothing, not even establishing a group.
4171 % \begin{macrocode}
4172 \def\auto@bib@innerbib{%
4173 \begingroup
4174 \let@environment{thebibliography}{thebibliography@nogroup}%
4175 \bibliography{}%
4176 \endgroup
4177 }%
4178 % \end{macrocode}
4179 % Environment \env{thebibliography@nogroup} is an alias of the \env{thebibliography} environment that cancels itself.
4180 % It assumes that it is called within a \env{thebibliography} environment.
4181 % \begin{macrocode}
4182 \def\thebibliography@nogroup#1{%
4183 \endgroup
4184 \def\@currenvir{thebibliography}%
4185 }%
4186 \def\endthebibliography@nogroup{\begingroup}%
4187 % \end{macrocode}
4188 % The following should be part of \filename{ltxutil}.
4189 % \begin{macrocode}
4190 \long\def \@gobblethree #1#2#3{}%
4191 \def\providecommand@j@nk#1[#2]{%
4192 \@ifnum{#2=\z@}{\def\j@nk}{%
4193 \@ifnum{#2=\@ne}{\def\j@nk##1}{%
4194 \@ifnum{#2=\tw@}{\def\j@nk##1##2}{%
4195 \@ifnum{#2=\thr@@}{\def\j@nk##1##2##3}{%
4196 }%
4197 }%
4198 }%
4199 }%
4200 }%
4201 % \end{macrocode}
4202 % \end{macro}
4203 % \end{macro}
4204 % \end{macro}
4205 % \end{macro}
4206 % \end{macro}
4207 % \end{macro}
4208 %
4209 % \section{Initial setup}
4210 %
4211 % The standard LaTeX document classes execute certain commands
4212 % that are best deferred until \cmd\class@documenthook\ time.
4213 % Here, we effectively split \cmd\pagenumbering\ into two halves,
4214 % with a default definition for \cmd\thepage
4215 % and an initialization of \cmd\c@page\ at \cmd\class@documenthook\ time.
4216 %
4217 % The meaning of \cmd\thepage\ can be overridden by society, journal, or
4218 % anywhere within the document pramble, and the counter itself will be
4219 % preset at the beginning of the document.
4220 % \begin{macrocode}
4221 \def\thepage{\@arabic\c@page}%
4222 % \end{macrocode}
4223 % \changes{4.0b}{1999/06/20}{Defer assignment until \cs{AtBeginDocument} time.}
4224 % Note that this code is executed at \cmd\setup@hook\ time
4225 % to allow for the possibility of overrides by packages like \classname{geometry}.
4226 % \begin{macrocode}
4227 \appdef\setup@hook{%
4228 \tabbingsep \labelsep
4229 \leftmargin\leftmargini
4230 \labelwidth\leftmargin\advance\labelwidth-\labelsep
4231 \let\@listi\@listI
4232 \@listi
4233 }%
4234 % \begin{macrocode}
4235 %
4236 % We ensure that the ``environment'' component mark (implemented by \file{ltxgrid.dtx})
4237 % is initialized properly (via a hook, itself defined via \file{ltxutil.dtx}).
4238 % \begin{macrocode}
4239 \appdef\class@documenthook{%
4240 \global\c@page\@ne
4241 \def\curr@envir{document}%
4242 \mark@envir{\curr@envir}%
4243 }%
4244 % \end{macrocode}
4245 %
4246 % \begin{macro}{\open@onecolumn}%
4247 % \begin{macro}{\open@column@two}%
4248 % \changes{4.0c}{1999/11/13}{Grid changes with ltxgrid}
4249 % \changes{4.0d}{2000/04/10}{Also alter how lists get indented.}
4250 % When setting the column grid, we have to override the procedure
4251 % for formatting lists.
4252 % Because \cmd\twocolumngrid\ requires rebalancing columns at some points,
4253 % typesetting must employ only the manipulation of
4254 % \cmd\leftskip\ and \cmd\rightskip, and must avoid the use of
4255 % \cmd\moveleft, \cmd\moveright, and \cmd\parshape.
4256 %
4257 % It is one of the stranger features of \TeX\ that these two separate
4258 % mechanisms exist. The latter three have the effect of adding things to the
4259 % Main Vertical List that cannot be removed and later added back with all their
4260 % properties intact.
4261 %
4262 % In detail, \cmd\moveleft, say, adds a box to the MVL with
4263 % its reference point shifted horizontally by some amount relative to the
4264 % reference point of the enclosing list. If that box is removed from the
4265 % MVL (via a \cmd\lastbox\ operation in the output routine), and later
4266 % thrown back to the MVL, the shift of the box will have been ``forgotten'' by \TeX.
4267 % This is a bug, but not one ``acceptible to D. E. Knuth'', so it will never be fixed.
4268 %
4269 % \begin{macrocode}
4270 \def\open@onecolumn{%
4271 \open@column@one\@ne
4272 \set@colht
4273 \@floatplacement
4274 \@dblfloatplacement
4275 }%
4276 \def\open@twocolumn{%
4277 \open@column@mlt\tw@
4278 \set@colht
4279 \@floatplacement
4280 \@dblfloatplacement
4281 \sloppy
4282 \let\set@listindent\set@listindent@
4283 }%
4284 % \end{macrocode}
4285 % \end{macro}
4286 % \end{macro}
4287 %
4288 % \section{\cs{appendix}}
4289 %
4290 % \begin{macrocode}
4291 %\newif\ifappendixon
4292 % \end{macrocode}
4293 % Note that, within appendices,
4294 % equations are numbered within sections (appendices).
4295 % \begin{macrocode}
4296 \def\appendix{%
4297 \par
4298 %\appendixontrue
4299 \setcounter{section}\z@
4300 \setcounter{subsection}\z@
4301 \setcounter{subsubsection}\z@
4302 \def\thesubsection{\arabic{subsection}}%
4303 \def\thesubsubsection{\alph{subsubsection}}%
4304 \@addtoreset{equation}{section}%
4305 \def\theequation@prefix{\thesection}%
4306 \addtocontents{toc}{\protect\appendix}%
4307 \@ifstar{%
4308 \def\thesection{\unskip}%
4309 \def\theequation@prefix{A.}%
4310 }{%
4311 \def\thesection{\Alph{section}}%
4312 }%
4313 }%
4314 % \end{macrocode}
4315 %
4316 % \section{Changing the page grid}
4317 % \changes{4.0b}{1999/06/20}{Define three separate environments, defer assignment to \cs{AtBeginDocument} time.}
4318 %
4319 % \subsection{Avoiding Grid Changes}%
4320 %
4321 % In preprint styles, ``wide text'' is a no-op, and the title page
4322 % processing involves no grid change.
4323 %
4324 % \begin{macro}{\title@column}%
4325 % \begin{macro}{\close@column}%
4326 % Provide default meanings for \cmd\title@column\ and \cmd\close@column,
4327 % in case they were never defined.
4328 % Note that the society or journal substyle may define
4329 % \cmd\title@column\ or \cmd\close@column: this code will not override.
4330 % \begin{macrocode}
4331 \def\title@column#1{%
4332 \minipagefootnote@init
4333 #1%
4334 \minipagefootnote@foot
4335 }%
4336 \def\close@column{%
4337 \newpage
4338 }%
4339 % \end{macrocode}
4340 % \end{macro}
4341 % \end{macro}
4342 %
4343 %
4344 % \subsection{Galley Style: Margin Changes}%
4345 % A variant of preprint processing. Emulate journal appearance somewhat.
4346 %
4347 % \begin{environment}{widetext@galley}
4348 % DPC: We're in galley style so do a lob sided display environment.
4349 %
4350 % QUERY: How can we be sure that we are in galley style?
4351 % ANSWER: as noted elsewhere, require that both \cmd\twocolumn@sw\ and \cmd\preprintsty@sw\ be false.
4352 % \begin{macrocode}
4353 \def\galley@outdent{\rightmargin-\columnwidth\advance\rightmargin-\columnsep}%
4354 \let\widetext@outdent\@empty
4355 \newenvironment{widetext@galley}{%
4356 \list{}{%
4357 \topsep \z@skip
4358 \listparindent \parindent
4359 \itemindent \parindent
4360 \leftmargin \z@
4361 \parsep \z@\@plus\p@
4362 \widetext@outdent
4363 \relax
4364 }%
4365 \item\relax
4366 }{
4367 \endlist
4368 }%
4369 % \end{macrocode}
4370 % \end{environment}
4371 %
4372 %
4373 % \subsection{Grid Changing Via \classname{ltxgrid}}%
4374 %
4375 % In case \classoption{twocolumngrid} has been invoked,
4376 % switch column grid using the column grid-changing commands.
4377 % Supply stub definitions of those commands here.
4378 % \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
4379 %
4380 % \begin{macro}{\title@column@grid}%
4381 % \begin{macro}{\close@column@grid}%
4382 % The title block always starts at the top of a new page.
4383 % \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
4384 %
4385 % Note that, for the procedure \cmd\close@column@grid,
4386 % we balance columns by switching to the one-column page grid.
4387 % \begin{macrocode}
4388 \def\title@column@grid#1{%
4389 \minipagefootnote@init
4390 \onecolumngrid
4391 \begingroup
4392 \let\@footnotetext\frontmatter@footnotetext
4393 %<ignore> \let\set@footnotewidth\set@footnotewidth@two
4394 \ltx@no@footnote
4395 #1%
4396 \endgroup
4397 \twocolumngrid
4398 \minipagefootnote@foot
4399 }%
4400 \def\close@column@grid{%
4401 \balancelastpage@sw{%
4402 \onecolumngrid
4403 %<ignore> \twocolumngrid
4404 }{}%
4405 }%
4406 % \end{macrocode}
4407 % \end{macro}
4408 % \end{macro}
4409 %
4410 % \begin{environment}{widetext@grid}
4411 % \changes{4.0c}{1999/11/13}{grid changes via ltxgrid procedures}
4412 % \changes{4.0e}{2000/11/21}{adornments above and below.}
4413 % \changes{4.1g}{2009/10/07}{(AO, 525) Remove phantom paragraph above display math that is given in vertical mode}%
4414 % We slip into the one-column page grid
4415 % within the scope of this environment.
4416 %
4417 % Note that we set adornments above and below the \env{widettext}.
4418 % These are set as leaders, so they will disappear at a page break.
4419 % \changes{4.1n}{2010/01/02}{(AO) fine-tune spacing above and below widetext}%
4420 % \begin{macrocode}
4421 \newenvironment{widetext@grid}{%
4422 \par\ignorespaces
4423 \setbox\widetext@top\vbox{%
4424 %<ignore> \vskip15\p@
4425 \hb@xt@\hsize{%
4426 \leaders\hrule\hfil
4427 \vrule\@height6\p@
4428 }%
4429 %<ignore> \vskip6\p@
4430 }%
4431 \setbox\widetext@bot\hb@xt@\hsize{%
4432 \vrule\@depth6\p@
4433 \leaders\hrule\hfil
4434 }%
4435 \onecolumngrid
4436 \vskip10\p@
4437 \dimen@\ht\widetext@top\advance\dimen@\dp\widetext@top
4438 \cleaders\box\widetext@top\vskip\dimen@
4439 %<ignore> \let\set@footnotewidth\set@footnotewidth@two
4440 \vskip6\p@
4441 \prep@math@patch
4442 }{%
4443 \par
4444 \vskip6\p@
4445 \setbox\widetext@bot\vbox{%
4446 \hb@xt@\hsize{\hfil\box\widetext@bot}%
4447 %<ignore> \vskip14\p@
4448 }%
4449 \dimen@\ht\widetext@bot\advance\dimen@\dp\widetext@bot
4450 \cleaders\box\widetext@bot\vskip\dimen@
4451 \vskip8.5\p@
4452 \twocolumngrid\global\@ignoretrue
4453 \@endpetrue
4454 }%
4455 \newbox\widetext@top
4456 \newbox\widetext@bot
4457 % \end{macrocode}
4458 % \end{environment}
4459 %
4460 %
4461 % Decide, finally, how the page grid is to be manipulated.
4462 % \begin{macrocode}
4463 \def\set@page@grid{%
4464 \twocolumn@sw{%
4465 % \end{macrocode}
4466 % The following two assignments determine what procedures are to be executed when
4467 % the footnote set width is calculated, and how footnotes are to be composed at the bottom of the page.
4468 % A society or journal wishing to do otherwise will override this code.
4469 % \begin{macrocode}
4470 \let\set@footnotewidth\set@footnotewidth@two
4471 \let\compose@footnotes\compose@footnotes@two
4472 \let@environment{widetext}{widetext@grid}%
4473 \let\title@column\title@column@grid
4474 \let\close@column\close@column@grid
4475 }{%
4476 \let@environment{widetext}{widetext@galley}%
4477 \preprintsty@sw{%
4478 % \end{macrocode}
4479 % Change the page grid not at all.
4480 % \begin{macrocode}
4481 }{%
4482 % \end{macrocode}
4483 % If we are galley style, change the page margin only.
4484 % \begin{macrocode}
4485 \galley@sw{%
4486 \let\widetext@outdent\galley@outdent
4487 }{}%
4488 }%
4489 }%
4490 }%
4491 \appdef\setup@hook{\set@page@grid}%
4492 % \end{macrocode}
4493 %
4494 % \section{Old font commands}
4495 %
4496 % \begin{macrocode}
4497 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
4498 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
4499 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
4500 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
4501 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
4502 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
4503 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
4504 \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
4505 \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
4506 % \end{macrocode}
4507 %
4508 % \section{English-Language Texts}
4509 % As this class is just for English language journals, we
4510 % could hardwire these texts,
4511 % but to make it easier to use this as a
4512 % basis for the code for similar journal styles, separate out all the
4513 % fixed text strings into babel-style macros of the form
4514 % |\|\ldots|name|
4515 %
4516 % Note: for babel compatability, use version 1999/05/05 v3.6x or later.
4517 %
4518 % Some of these might need changing in the society-specific code.
4519 %
4520 % \begin{macro}{\today}
4521 % Procedure \cmd\today\ is used in the article class, but not in
4522 % this document class.
4523 % \begin{macrocode}
4524 \def\today{\ifcase\month\or
4525 January\or February\or March\or April\or May\or June\or
4526 July\or August\or September\or October\or November\or December\fi
4527 \space\number\day, \number\year}
4528 % \end{macrocode}
4529 % \end{macro}
4530 %
4531 % \begin{macro}{\notesname}
4532 % Text entity \cmd\notesname\ had been used in \cmd\printendnotes.
4533 % \changes{4.1f}{2009/07/10}{(AO, 520) Automatically produce \cs{bibliography} command when needed}%
4534 % However, we have removed the endnotes facility from REVTeX.
4535 %
4536 % \begin{verbatim}
4537 %\def\notesname{Notes}
4538 % \end{verbatim}
4539 % \end{macro}
4540 %
4541 % \begin{macro}{\partname}
4542 % Text entity \cmd\partname\ is used in \cmd\@part.
4543 % \begin{macrocode}
4544 \def\partname{Part}
4545 % \end{macrocode}
4546 % \end{macro}
4547 %
4548 % \begin{macro}{\tocname}
4549 % Text entity \cmd\tocname\ is used in \cmd\tableofcontents,
4550 % as defined in the standard \LaTeX\ book class.
4551 % \begin{macrocode}
4552 \def\tocname{Contents}
4553 % \end{macrocode}
4554 % \end{macro}
4555 %
4556 % \begin{macro}{\lofname}
4557 % Text entity \cmd\lofname\ is used in \cmd\listoffigures,
4558 % as defined in the standard \LaTeX\ book class.
4559 % \begin{macrocode}
4560 \def\lofname{List of Figures}
4561 % \end{macrocode}
4562 % \end{macro}
4563 %
4564 % \begin{macro}{\lotname}
4565 % Text entity \cmd\lotname\ is used in \cmd\listoftables,
4566 % as defined in the standard \LaTeX\ book class.
4567 % \begin{macrocode}
4568 \def\lotname{List of Tables}
4569 % \end{macrocode}
4570 % \end{macro}
4571 %
4572 % \begin{macro}{\refname}
4573 % Text entity \cmd\refname\ is used in \env{thebibliography}.
4574 % \begin{macrocode}
4575 \def\refname{References}
4576 % \end{macrocode}
4577 % \end{macro}
4578 %
4579 % \begin{macro}{\indexname}
4580 % Text entity \cmd\indexname\ is used in \env{theindex},
4581 % as defined in the standard \LaTeX\ book class.
4582 % \begin{macrocode}
4583 \def\indexname{Index}
4584 % \end{macrocode}
4585 % \end{macro}
4586 %
4587 % \begin{macro}{\figurename}
4588 % \changes{4.0b}{1999/06/20}{Added localization of \cs{figuresname}}
4589 % Text entity \cmd\figurename\ is used in \env{figure},
4590 % \cmd\figuresname\ in \cmd\printfigures.
4591 % \begin{macrocode}
4592 \def\figurename{FIG.}
4593 \def\figuresname{Figures}%
4594 % \end{macrocode}
4595 % \end{macro}
4596 %
4597 % \begin{macro}{\tablename}
4598 % \changes{4.0b}{1999/06/20}{Added localization of \cs{tablesname}}
4599 % Text entity \cmd\tablename\ is used in \env{table},
4600 % \cmd\tablesname\ in \cmd\printtables.
4601 % \begin{macrocode}
4602 \def\tablename{TABLE}
4603 \def\tablesname{Tables}%
4604 % \end{macrocode}
4605 % \end{macro}
4606 %
4607 % \begin{macro}{\abstractname}
4608 % Text entity \cmd\abstractname\ is used in \env{abstract}.
4609 % \begin{macrocode}
4610 \def\abstractname{Abstract}
4611 % \end{macrocode}
4612 % \end{macro}
4613 %
4614 % \begin{macro}{\appendixesname}
4615 % \begin{macro}{\appendixname}
4616 % Text entity \cmd\appendixesname\ is used in TOC.
4617 % \begin{macrocode}
4618 \def\appendixesname{Appendixes}%
4619 \def\appendixname{Appendix}%
4620 % \end{macrocode}
4621 % \end{macro}
4622 % \end{macro}
4623 %
4624 % \begin{macro}{\acknowledgmentsname}
4625 % Text entity \cmd\acknowledgmentsname\ is used in \env{acknowledgments}.
4626 % \begin{macrocode}
4627 \def\acknowledgmentsname{Acknowledgments}
4628 % \end{macrocode}
4629 % \end{macro}
4630 %
4631 % \begin{macro}{\journalname}
4632 % This should be set by the society journal options, eg `pra'.
4633 % \begin{macrocode}
4634 \def\journalname{??}
4635 % \end{macrocode}
4636 % \end{macro}
4637 %
4638 % \begin{macro}{\copyrightname}
4639 % Default layout does not assign copyright, but a journal that wants
4640 % to might use this.
4641 % \begin{macrocode}
4642 \def\copyrightname{??}
4643 % \end{macrocode}
4644 % \end{macro}
4645 %
4646 % \begin{macro}{\andname}
4647 % The text string ``and'' for use in author lists.
4648 % \begin{macrocode}
4649 \def\andname{and}
4650 % \end{macrocode}
4651 % \end{macro}
4652 %
4653 % \begin{macro}{\@pacs@name}
4654 % \begin{macro}{\@keys@name}
4655 % The text string prepended to PACS numbers, resp. to keywords.
4656 % \begin{macrocode}
4657 \def\@pacs@name{PACS numbers: }%
4658 \def\@keys@name{Keywords: }%
4659 % \end{macrocode}
4660 % \end{macro}
4661 % \end{macro}
4662 %
4663 % \begin{macro}{\ppname}
4664 % The text string ``pp'' for use in page ranges.
4665 % \begin{macrocode}
4666 \def\ppname{pp}
4667 % \end{macrocode}
4668 % \end{macro}
4669 %
4670 % \begin{macro}{\numbername}
4671 % The text string ``number'' for use in article reference.
4672 % \begin{macrocode}
4673 \def\numbername{number}
4674 % \end{macrocode}
4675 % \end{macro}
4676 %
4677 % \begin{macro}{\volumename}
4678 % The text string ``volume'' for use in article reference.
4679 % \begin{macrocode}
4680 \def\volumename{volume}
4681 % \end{macrocode}
4682 % \end{macro}
4683 %
4684 % \begin{macro}{\Dated@name}
4685 % \begin{macro}{\Received@name}
4686 % \begin{macro}{\Revised@name}
4687 % \begin{macro}{\Accepted@name}
4688 % \begin{macro}{\Published@name}
4689 % These texts are used in the \cmd\date, et al. commands.
4690 % \begin{macrocode}
4691 \def\Dated@name{Dated: }%
4692 \def\Received@name{Received }%
4693 \def\Revised@name{Revised }%
4694 \def\Accepted@name{Accepted }%
4695 \def\Published@name{Published }%
4696 % \end{macrocode}
4697 % \end{macro}
4698 % \end{macro}
4699 % \end{macro}
4700 % \end{macro}
4701 % \end{macro}
4702 %
4703 % \section{Legacy Commands}
4704 % We define some commands left over from version 3.1, or give default meanings.
4705 % Some definitions can be overridden
4706 % in the document preamble or in included packages.
4707 %
4708 % Note on the namespace: command names like \cmd\REV@\emph{name} are used here,
4709 % because it is not clear that any of this code is generally useful.
4710 % \begin{macrocode}
4711 \def\address{\replace@command\address\affiliation}%
4712 \def\altaddress{\replace@command\altaddress\altaffiliation}%
4713 \newenvironment{references}{%
4714 \class@warn@end{The references environment is not supported; use thebibliography instead.}
4715 \gdef\references{\thebibliography{}}\references
4716 }{%
4717 \endthebibliography
4718 }%
4719 \def\draft{%
4720 \class@warn@end{Command \string\draft\space is obsolete;^^JInvoke option draft instead.}%
4721 \@booleantrue\draft@sw
4722 }%
4723 \def\tighten{%
4724 \class@warn@end{Command \string\tighten\space is obsolete;^^JInvoke option tightenlines instead.}%
4725 \@booleantrue\tightenlines@sw
4726 }%
4727 \def\tableline{%
4728 \noalign{%
4729 \class@warn@end{Command \string\tableline\space is obsolete;^^JUse \string\colrule\space instead.}%
4730 \global\let\tableline\colrule
4731 }%
4732 \tableline
4733 }%
4734 \def\case{\replace@command\case\frac}%
4735 \def\slantfrac{\replace@command\slantfrac\frac}%
4736 \def\tablenote{\replace@command\tablenote\footnote}%
4737 \def\tablenotemark{\replace@command\tablenotemark\footnotemark}%
4738 \def\tablenotetext{\replace@command\tablenotetext\footnotetext}%
4739 % Lose the following definition:
4740 \DeclareRobustCommand\REV@text[1]{%
4741 \relax
4742 \ifmmode
4743 \mathchoice
4744 {\hbox{{\everymath{\displaystyle }#1}}}%
4745 {\hbox{{\everymath{\textstyle }#1}}}%
4746 {\hbox{{\everymath{\scriptstyle }\let\f@size\sf@size\selectfont#1}}}%
4747 {\hbox{{\everymath{\scriptscriptstyle}\let\f@size\ssf@size\selectfont#1}}}%
4748 \glb@settings
4749 \else
4750 \mbox{#1}%
4751 \fi
4752 }%
4753 % Lose the following definition:
4754 \DeclareRobustCommand\REV@bbox[1]{%
4755 \relax
4756 \ifmmode
4757 \mathchoice
4758 {\hbox{{\everymath{\displaystyle }\boldmath$#1$}}}%
4759 {\hbox{{\everymath{\textstyle }\boldmath$#1$}}}%
4760 {\hbox{{\everymath{\scriptstyle }\boldmath$#1$}}}%
4761 {\hbox{{\everymath{\scriptscriptstyle}\boldmath$#1$}}}%
4762 \glb@settings
4763 \else
4764 \mbox{#1}%
4765 \fi
4766 }%
4767 \DeclareRobustCommand\REV@bm[1]{%
4768 \class@warn@end{To use \string\bm, please load the bm package!}%
4769 \global\let\bm\relax
4770 }%
4771 \def\FL{\obsolete@command\FL}%
4772 \def\FR{\obsolete@command\FR}%
4773 \def\narrowtext{\obsolete@command\narrowtext}%
4774 \def\mediumtext{\obsolete@command\mediumtext}%
4775 \newenvironment{quasitable}{%
4776 \let@environment{tabular}{longtable}%
4777 }{%
4778 }%
4779 % \end{macrocode}
4780 %
4781 % \begin{macro}{\text}
4782 % \begin{macro}{\bm}
4783 % \begin{macro}{\bibinfo}
4784 % \begin{macro}{\eprint}
4785 % \begin{macro}{\url}
4786 %
4787 % If not otherwise defined, give default meanings to certain commands.
4788 % \changes{4.0d}{2000/04/10}{eprint takes an optional argument, syntactical only in this case.}
4789 %FIXME: \cmd\bibinfo?
4790 % \begin{macrocode}
4791 \let\text\REV@text
4792 \let\bm\REV@bm
4793 \appdef\setup@hook{%
4794 \providecommand\bibinfo[2]{#2}%
4795 \providecommand\eprint[2][]{#2}%
4796 %\providecommand\url[1]{#1}%
4797 }%
4798 % \end{macrocode}
4799 % \end{macro}
4800 % \end{macro}
4801 % \end{macro}
4802 % \end{macro}
4803 % \end{macro}
4804 %
4805 % \begin{macro}{\bbox}
4806 %
4807 % \begin{macrocode}
4808 \def\bbox#1{%
4809 \class@warn@end{\string\bbox\space is obsolete,^^Jload the bm package and use \string\bm\space instead.}%
4810 \global\let\bbox\relax
4811 }%
4812 % \end{macrocode}
4813 % \end{macro}
4814 %
4815 % \begin{macro}{\mathletters}
4816 %
4817 % \begin{macrocode}
4818 \newenvironment{mathletters}{%
4819 \class@warn@end{Environment {mathletters} is obsolete;^^Jload the amsmath package and use {subequations}!}%
4820 \global\let\mathletters\@empty
4821 }{%
4822 }%
4823 % \end{macrocode}
4824 % \end{macro}
4825 %
4826 % \begin{macro}{\eqnum}
4827 %
4828 % \begin{macrocode}
4829 \def\eqnum#1{%
4830 \class@warn@end{\string\eqnum\space is obsolete, load the amsmath package and use \string\tag!}%
4831 \global\let\eqnum\@gobble
4832 }%
4833 % \end{macrocode}
4834 % \end{macro}
4835 %
4836 % We read in the symbol definitions.
4837 % \begin{macrocode}
4838 \appdef\rtx@require@packages{%
4839 \RequirePackage{revsymb4-2}%
4840 }%
4841 \appdef\class@documenthook{\revsymb@inithook}%
4842 % \end{macrocode}
4843 %
4844 %
4845 % \section{Corrected Indentation for \texttt{tableofcontents}}
4846 % \changes{4.2a}{2014/12/31}{(MD, Aptara) Make titles in bibliography default, prb style to follow other Phys. Rev. journals, add a unified physrev option as well as prx, prapplied, prmaterials, prfluids, prab, and prper options. Corrected indentation for tableofcontents appearing along with listoffigure/listoftable.}%
4847 %
4848 % Corrected indentation for \texttt{tableofcontents}, when appearing with \texttt{listoffigure} or \texttt{listoftable}.
4849 %
4850 % \begin{macrocode}
4851 %%
4852 \def\@startflt#1{%
4853 \begingroup
4854 %\toc@pre
4855 \makeatletter
4856 \@input{\jobname.#1}%
4857 \if@filesw
4858 \expandafter\newwrite\csname tf@#1\endcsname
4859 \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
4860 \fi
4861 \@nobreakfalse
4862 %\toc@post
4863 \endgroup
4864 }%
4865 \def\att@TOC{toc}%
4866 \def\print@toc#1{%
4867 \begingroup
4868 \expandafter\section
4869 \expandafter*%
4870 \expandafter{%
4871 \csname#1name\endcsname
4872 }%
4873 \let\appendix\appendix@toc
4874 \def\tempa{#1}%
4875 \ifx\tempa\att@TOC%%
4876 \@starttoc{#1}%
4877 \else%%
4878 \@startflt{#1}%%
4879 \fi%%
4880 \endgroup
4881 }%
4882 %%
4883 % \end{macrocode}
4884 %
4885 %
4886 % \section{Patches for lineno.sty}
4887 %
4888 % The \classname{lineno} package detects the case where the package has been loaded
4889 % and the document invokes \cmd\linelabel, but the \cmd\linenumbers\ command has not been
4890 % issued: it treats this case as an error.
4891 %
4892 % It is wrong for validity of document syntax to be dependent upon package semantics:
4893 % we make the condition a warning rather than an error.
4894 %
4895 % \begin{macrocode}
4896 \def\@LN@LLerror@org{%
4897 \PackageError{lineno}{%
4898 \string\linelabel\space without \string\linenumbers
4899 }{%
4900 Just see documentation. (New feature v4.11)%
4901 }%
4902 \@gobble
4903 }%
4904 \def\@LN@LLerror@ltx{%
4905 \PackageWarning{lineno}{%
4906 To make the \string\linelabel\space command work, you must issue the \string\linenumbers\ command
4907 }%
4908 \@gobble
4909 }%
4910 % \end{macrocode}
4911 %
4912 % If appropriate, enable line numbering within the abstract.
4913 %
4914 % This mechanism applies generally:
4915 % Create the box in a context in which the meaning of \cmd\par\ has been patched by \classname{lineno},
4916 % then \cmd\unvbox\ the box in a context where \cmd\set@linepenalties\ has been executed, and
4917 % follow up with \cmd\@linenumberpar, which forces a visit to the output routine just there.
4918 % Note that here, we have to de-fang \cmd\@LN@parpgbrk, which would otherwise causes the appearance
4919 % of a box with depth -1000 points. Go figure.
4920 % \begin{macrocode}
4921 \appdef\class@documenthook{%
4922 \@ifx{\@LN@LLerror\@LN@LLerror@org}{%
4923 \class@info{Overriding \string\@LN@LLerror}%
4924 \let\@LN@LLerror\@LN@LLerror@ltx
4925 }{}%
4926 \@ifpackageloaded{lineno}{%
4927 \@ifxundefined{\set@linepenalties}{}{%
4928 \def\prep@absbox{\set@linepenalties}%
4929 \def\post@absbox{\let\@LN@parpgbrk\@empty\@linenumberpar}%
4930 }%
4931 }{}%
4932 }%
4933 % \end{macrocode}
4934 %
4935 % One may well ask: how to obtain line numbering within an alignment in a float?
4936 % This objective, along with line numbering within footnotes, would require extraordinary measures.
4937 % The float would have to be thrown onto the MVL in order to acquire its line numbers, but
4938 % that fragment of MVL would then have to be protected from being shipped out.
4939 % The question of how to coordinate those lines' numbers with those of lines in the MVL would
4940 % also require dealing with.
4941 %
4942 % \section{Endgame for the Document Class}
4943 %
4944 % We provide for a ``job macro package'' that can override
4945 % definitions and assignments made by the class or any other packages it loads.
4946 %
4947 % \subsection{Job Macro Package}
4948 % You can create a ``job macro package'' for your document
4949 % that will be read in automatically every time
4950 % your document is processed.
4951 % Thus, if your job is a file called \file{myarticle.tex},
4952 % then the file \file{myarticle.rty} will be read in
4953 % just the same as if you had placed a
4954 % \cmd\usepackage|{myarticle.rty}| statement
4955 % immediately following your \cmd\documentclass\ statement.
4956 %
4957 % Within your \file{.rty} file,
4958 % you can define and use control sequence names that use the |@| character
4959 % and you can override any of the definitions or assignments made
4960 % by the \revtex\ document class or the selected journal substyle.
4961 % That is, you have the power to really mess things up badly.
4962 %
4963 % If you choose to have a job macro package, you are well
4964 % advised to read the \LaTeX\ guide to document classes,
4965 % \file{clsguide.tex} or read up on the subject
4966 % in a book like the \LaTeX\ Companion.
4967 %
4968 % The file \file{template.rty} contains a template for
4969 % creating your own job macro package.
4970 %
4971 % \begin{macrocode}
4972 \appdef\rtx@require@packages{%
4973 \InputIfFileExists{\jobname.rty}{}{}%
4974 }%
4975 % \end{macrocode}
4976 %
4977 % \subsection{Endgame Processing for the Document Class}
4978 %
4979 % The remaining steps in processing the document class involve
4980 % determining the needed society, journal, and pointsize from
4981 % the document's class options and inputting the needed files or
4982 % executing the indicated procedures.
4983 %
4984 % Note that the society file is expected to declare options that will
4985 % allow us to determine the journal involved, and the society and journal
4986 % themselves determine the which pointsize options are declared, along with
4987 % their meanings.
4988 %
4989 % Note also that required packages are read in only after the document options
4990 % have been processed, because the latter can affect the former.
4991 %
4992 % Finally, the setup code is executed: this is code that depends on the
4993 % meanings of the switches we define and on the code within the packages we load.
4994 %
4995 % Note that there are other hooks in use: \cmd\document@inithook, which is
4996 % executed right at the beginning of the document, and \cmd\class@documenthook,
4997 % which serves as a vehicle for any \cmd\AtBeginDocument\ code we might wish to
4998 % execute.
4999 %
5000 %FIXME: use \cmd\class@documenthook\ only for things that bear on the MVL;
5001 % use \cmd\document@inithook\ for all patches to procedures defined within the preamble.
5002 %
5003 % Remember that \classname{natbib} changes its state at \cmd\AtBeginDocument\ time,
5004 % so we have to install our own code at a later point in the processing.
5005 %
5006 % We determine the proper \cmd\@society\ by examining the document's class options.
5007 % \begin{macrocode}
5008 \@parse@class@options@society
5009 % \end{macrocode}
5010 %
5011 % Then, we input the society's substyle
5012 % (which may in turn lead to loading a journal substyle or a pointsize substyle).
5013 % The substyle should not assume the value of any class option:
5014 % instead, it should install code into \cmd\setup@hook.
5015 % \begin{macrocode}
5016 \@process@society{aps}%
5017 % \end{macrocode}
5018 %
5019 % Now that the society has defined the class options relating to journals,
5020 % and has defined \cmd\@journal@default, we can process the journal substyle.
5021 % We parse the options for one that sets \cmd\@journal.
5022 % \begin{macrocode}
5023 \@parse@class@options@\@journal
5024 % \end{macrocode}
5025 % And we process the journal.
5026 % Note that \emph{it is an error} for a society file to fail to define
5027 % \cmd\@journal@default.
5028 %
5029 % \begin{macrocode}
5030 \expandafter\@process@journal\expandafter{\@journal@default}%
5031 % \end{macrocode}
5032 %
5033 % Now that the society and journal have finished defining any options relating to
5034 % point size, we process the class options for any that set \cmd\@pointsize.
5035 % \begin{macrocode}
5036 \@parse@class@options@\@pointsize
5037 % \end{macrocode}
5038 % And we process the pointsize.
5039 % Note that it is an error for the society and journal to leave \cmd\@pointsize@default\
5040 % undefined at this point, however, the journal may have overriden the assignment of the society.
5041 %
5042 % \begin{macrocode}
5043 \expandafter\@process@pointsize\expandafter{\@pointsize@default}%
5044 % \end{macrocode}
5045 %
5046 % Next, we process the class options for once and all.
5047 % Doing so sets values for some of the Booleans that were introduced along with
5048 % the \cmd\DeclareOption\ statements above.
5049 %
5050 %CHANGE: We process the options in the order declared in the document; this
5051 % gives the document greater control.
5052 %
5053 % \begin{macrocode}
5054 \@options
5055 % \end{macrocode}
5056 %
5057 % Now that the class options have been processed, we can load all the
5058 % packages that we know need loading.
5059 % \begin{macrocode}
5060 \rtx@require@packages
5061 % \end{macrocode}
5062 %
5063 % At this point, the society substyle, the journal substyle, and the
5064 % pointsize have all been processed, along with the document class options.
5065 % Some of these have left things for later; we do these now.
5066 %
5067 % \begin{macro}{\setup@hook}
5068 %
5069 % This portion of the code for this class file
5070 % \emph{must} appear at the very end:
5071 % The procedure
5072 % \cmd\setup@hook\
5073 % should be executed at the very end of the class file.
5074 % Any code that relies on the value of any of the \texttt{@sw} switches
5075 % or will patch the code of one of the required packages
5076 % should be executed here.
5077 %\changes{4.2a}{2017/11/28}{(MD) Add call to \normalsize to be a good citizen and allow booktabs.sty to work properly}
5078 %
5079 % \begin{macrocode}
5080 \appdef\setup@hook{\normalsize}%
5081 \setup@hook
5082 % \end{macrocode}
5083 % \end{macro}
5084 %
5085 %
5086 % Warn if past maturation date. This code to be enabled only in beta software.
5087 % \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}%
5088 % \changes{4.1h}{2009/10/09}{(AO) Remove expiry code in the release software}%
5089 % \begin{macrocode}
5090 %<*ignore>
5091 \def\rtx@fin@year{2010}%
5092 \def\rtx@fin@month{01}%
5093 \def\rtx@fin@day{01}%
5094 \def\rtx@fin@warn{%
5095 \@ifnum{\rtx@fin@year>\the\year\relax}{\true@sw}{%
5096 \@ifnum{\rtx@fin@month>\the\month\relax}{\true@sw}{%
5097 \@ifnum{\rtx@fin@day>\the\day\relax}{\true@sw}{%
5098 \false@sw
5099 }%
5100 }%
5101 }%
5102 {%
5103 \class@info{Beta software expires \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; updates available at https://journals.aps.org/revtex/}%
5104 }{%
5105 \class@warn{Outdated software expired \rtx@fin@year-\rtx@fin@month-\rtx@fin@day; please retrieve an update at https://journals.aps.org/revtex/}%
5106 }%
5107 }%
5108 %</ignore>
5109 % \end{macrocode}
5110 % In shipping (non-beta) software, the following line should be commented out.
5111 % \changes{4.1f}{2009/07/11}{(AO, 522) Warn if software is expired}%
5112 % \begin{verbatim}
5113 %\appdef\class@enddocumenthook{\rtx@fin@warn}%
5114 % \end{verbatim}
5115 %
5116 % End of the class file.
5117 % \begin{macrocode}
5118 %</package>
5119 % \end{macrocode}
5120 %
5121 %
5122 % \section{Symbols: the \texttt{revsymb} module}
5123 % We immediately define a utility command: this module's warning.
5124 % \begin{macrocode}
5125 %<*revsymb>
5126 \def\REVSYMB@warn#1{\PackageWarningNoLine{revsymb}{#1}}%
5127 % \end{macrocode}
5128 %
5129 % \begin{macro}{\lambdabar}
5130 % \begin{macrocode}
5131 \DeclareRobustCommand\lambdabar{%
5132 \bgroup
5133 \def\@tempa{%
5134 \hbox{%
5135 \raise.73\ht\z@
5136 \hb@xt@\z@{%
5137 \kern.25\wd\z@
5138 \vrule \@width.5\wd\z@\@height.1\p@\@depth.1\p@
5139 \hss
5140 }%
5141 \box\z@
5142 }%
5143 }%
5144 \mathchoice
5145 {\setbox\z@\hbox{$\displaystyle \lambda$}\@tempa}%
5146 {\setbox\z@\hbox{$\textstyle \lambda$}\@tempa}%
5147 {\setbox\z@\hbox{$\scriptstyle \lambda$}\@tempa}%
5148 {\setbox\z@\hbox{$\scriptscriptstyle\lambda$}\@tempa}%
5149 \egroup
5150 }%
5151 % \end{macrocode}
5152 % \end{macro}
5153 %
5154 % \begin{macro}{\openone}
5155 % DPC: Really should use a font that includes this glyph.
5156 % Unfortunately not in AMS ones, but is in bbold, cmbb.
5157 % (I think, must check),
5158 % \changes{4.0a}{1998/01/31}{use font-dependent spacing}
5159 % FIXME: check for bbold.
5160 % \begin{macrocode}
5161 \DeclareRobustCommand\openone{\leavevmode\hbox{\small1\normalsize\kern-.33em1}}%
5162 % \end{macrocode}
5163 % \end{macro}
5164 %
5165 % \begin{macro}{\corresponds}
5166 % \begin{macro}{\overdots}
5167 % \begin{macro}{\overcirc}
5168 % J\"org Knappen suggests the replacements:
5169 % replace \cmd\corresponds\ with \cmd\triangleq, source \classname{amssymb};
5170 % replace \cmd\overcirc\ with \cmd\mathring, source \classname{latex2e};
5171 % replace \cmd\overdots\ with \cmd\dddot, source \classname{amsmath}.
5172 %
5173 % Any use of any of these commands will result in a warning message at the end
5174 % of the log file. If the corresponding package is not loaded, a
5175 % definition will quietly be provided.
5176 % \begin{macrocode}
5177 \DeclareRobustCommand\corresponds{\replace@command\corresponds\triangleq}%
5178 \DeclareRobustCommand\overcirc{\replace@command\overcirc\mathring}%
5179 \DeclareRobustCommand\overdots{\replace@command\overdots\dddot}%
5180 \DeclareRobustCommand\REV@triangleq{%
5181 {\lower.2ex\hbox{=}}{\kern-.75em^\triangle}%
5182 }%
5183 \DeclareRobustCommand\REV@dddot[1]{%
5184 \@ontopof{#1}{\cdots}{1.0}\mathord{\box2}%
5185 }%
5186 % \end{macrocode}
5187 % \end{macro}
5188 % \end{macro}
5189 % \end{macro}
5190 %
5191 % \begin{macro}{\succsim}
5192 % \begin{macro}{\precsim}
5193 % \begin{macro}{\lesssim}
5194 % \begin{macro}{\gtrsim}
5195 % \begin{macro}{\alt}
5196 % \begin{macro}{\agt}
5197 % These version 3.1 commands are always supplied,
5198 % but the definitions in \classname{amssymb} are preferred.
5199 % \begin{macrocode}
5200 \DeclareRobustCommand\altsuccsim{\succ\kern-.9em_\sim\kern.3em}%
5201 \DeclareRobustCommand\altprecsim{\prec\kern-1em_\sim\kern.3em}%
5202 \let\REV@succsim\altsuccsim
5203 \let\REV@precsim\altprecsim
5204 \DeclareRobustCommand\REV@lesssim{\mathrel{\mathpalette\vereq{<}}}%
5205 \DeclareRobustCommand\REV@gtrsim{\mathrel{\mathpalette\vereq{>}}}%
5206 \DeclareRobustCommand\alt{\lesssim}
5207 \DeclareRobustCommand\agt{\gtrsim}
5208 \def\vereq#1#2{%
5209 \lower3\p@\vbox{%
5210 \baselineskip1.5\p@
5211 \lineskip1.5\p@
5212 \ialign{$\m@th#1\hfill##\hfil$\crcr#2\crcr\sim\crcr}%
5213 }%
5214 }%
5215 % \end{macrocode}
5216 % \end{macro}
5217 % \end{macro}
5218 % \end{macro}
5219 % \end{macro}
5220 % \end{macro}
5221 % \end{macro}
5222 %
5223 % \begin{macro}{\tensor}
5224 % \begin{macro}{\overstar}
5225 % \begin{macro}{\loarrow}
5226 % \begin{macro}{\roarrow}
5227 % \changes{4.0b}{1999/06/20}{AO: remove duplicates}
5228 % \begin{macrocode}
5229 \DeclareRobustCommand\tensor[1]{\@ontopof{#1}{\leftrightarrow}{1.15}\mathord{\box2}}
5230 \DeclareRobustCommand\overstar[1]{\@ontopof{#1}{\ast}{1.15}\mathord{\box2}}
5231 \DeclareRobustCommand\loarrow[1]{\@ontopof{#1}{\leftarrow}{1.15}\mathord{\box2}}
5232 \DeclareRobustCommand\roarrow[1]{\@ontopof{#1}{\rightarrow}{1.15}\mathord{\box2}}
5233 % \end{macrocode}
5234 % \end{macro}
5235 % \end{macro}
5236 % \end{macro}
5237 % \end{macro}
5238 %
5239 % \begin{macro}{\@ontopof}
5240 % \begin{macrocode}
5241 \def\@ontopof#1#2#3{%
5242 {%
5243 \mathchoice
5244 {\@@ontopof{#1}{#2}{#3}\displaystyle \scriptstyle }%
5245 {\@@ontopof{#1}{#2}{#3}\textstyle \scriptstyle }%
5246 {\@@ontopof{#1}{#2}{#3}\scriptstyle \scriptscriptstyle}%
5247 {\@@ontopof{#1}{#2}{#3}\scriptscriptstyle\scriptscriptstyle}%
5248 }%
5249 }%
5250 % \end{macrocode}
5251 % \end{macro}
5252 %
5253 % \begin{macro}{\@@ontopof}
5254 % Same as \revtex3, more or less.
5255 % \begin{macrocode}
5256 \def\@@ontopof#1#2#3#4#5{%
5257 \setbox\z@\hbox{$#4#1$}%
5258 \setbox\f@ur\hbox{$#5#2$}%
5259 \setbox\tw@\null\ht\tw@\ht\z@ \dp\tw@\dp\z@
5260 \@ifdim{\wd\z@>\wd\f@ur}{%
5261 \setbox\f@ur\hb@xt@\wd\z@{\hss\box\f@ur\hss}%
5262 \mathord{\rlap{\raise#3\ht\z@\box\f@ur}\box\z@}%
5263 }{%
5264 \setbox\f@ur\hb@[email protected]\wd\f@ur{\hss\box\f@ur\hss}%
5265 \setbox\z@\hb@xt@\wd\f@ur{\hss$#4\relax#1$\hss}%
5266 \mathord{\rlap{\copy\z@}\raise#3\ht\z@\box\f@ur}%
5267 }%
5268 }%
5269 % \end{macrocode}
5270 % \end{macro}
5271 %
5272 % \begin{macro}{\frak}
5273 % Deal with legacy \cmd\frak:
5274 % if \classname{amsfonts} not loaded, defined in such a way as to ask for that package.
5275 % Also, says to use \cmd\mathfrak\ instead.
5276 % \begin{macrocode}
5277 \DeclareRobustCommand\frak{%
5278 \REVSYMB@warn{%
5279 Command \string\frak\space unsupported:^^J%
5280 please use \string\mathfrak\space instead.%
5281 }%
5282 \global\let\frak\mathfrak
5283 \frak
5284 }%
5285 \DeclareRobustCommand\REV@mathfrak{%
5286 \REVSYMB@warn{%
5287 Command \string\mathfrak\space undefined:^^J%
5288 please specify the amsfonts or amssymb option!%
5289 }%
5290 \global\let\mathfrak\@firstofone
5291 \mathfrak
5292 }%
5293 % \end{macrocode}
5294 % \end{macro}
5295 %
5296 % \begin{macro}{\Bbb}
5297 % Deal with legacy \cmd\Bbb:
5298 % if \classname{amsfonts} not loaded, defined in such a way as to ask for that package.
5299 % Also, says to use \cmd\mathbb\ instead.
5300 % \begin{macrocode}
5301 \DeclareRobustCommand\Bbb{%
5302 \REVSYMB@warn{%
5303 Command \string\Bbb\space unsupported:^^J%
5304 please use \string\mathbb\space instead.%
5305 }%
5306 \global\let\Bbb\mathbb
5307 \Bbb
5308 }%
5309 \DeclareRobustCommand\REV@mathfrak{%
5310 \REVSYMB@warn{%
5311 Command \string\mathbb\space undefined:^^J%
5312 please specify the amsfonts or amssymb option!%
5313 }%
5314 \global\let\mathbb\@firstofone
5315 \mathbb
5316 }%
5317 % \end{macrocode}
5318 % \end{macro}
5319 %
5320 % \begin{macro}{\Bigglb}
5321 % Deal with legacy bold delimiters.
5322 % Each of the following takes an implicit argument consisting of
5323 % the delimiter to be made big and bold.
5324 % FIXME: \cmd\DeclareBoldMathCommand\ is not the right tool!
5325 % \begin{macrocode}
5326 \def\Bigglb{\REV@boldopen \Bigg}%
5327 \def\Biglb {\REV@boldopen \Big }%
5328 \def\bigglb{\REV@boldopen \bigg}%
5329 \def\biglb {\REV@boldopen \big }%
5330 \def\Biggrb{\REV@boldclose\Bigg}%
5331 \def\Bigrb {\REV@boldclose\Big }%
5332 \def\biggrb{\REV@boldclose\bigg}%
5333 \def\bigrb {\REV@boldclose\big }%
5334 \def\REV@pmb#1{%
5335 \hbox{%
5336 \setbox\z@=\hbox{#1}%
5337 \kern-.02em\copy\z@\kern-\wd\z@
5338 \kern .04em\copy\z@\kern-\wd\z@
5339 \kern-.02em
5340 \raise.04em\copy\z@
5341 }%
5342 }%
5343 \def\REV@boldopen #1#2{\mathopen {\REV@pmb{$#1#2$}}}%
5344 \def\REV@boldclose#1#2{\mathclose{\REV@pmb{$#1#2$}}}%
5345 % \end{macrocode}
5346 % \end{macro}
5347 %
5348 % \begin{macro}{\revsymb@inithook}
5349 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
5350 % Package dependencies are taken care of at \cmd\setup@hook\ time.
5351 % \begin{macrocode}
5352 \def\revsymb@inithook{%
5353 \@ifxundefined\dddot{\let\dddot\REV@dddot}{}%
5354 \@ifxundefined\triangleq{\let\triangleq\REV@triangleq}{}%
5355 \@ifxundefined\succsim{\let\succsim\altsuccsim}{}%
5356 \@ifxundefined\precsim{\let\precsim\altprecsim}{}%
5357 \@ifxundefined\lesssim{\let\lesssim\REV@lesssim}{}%
5358 \@ifxundefined\gtrsim {\let\gtrsim \REV@gtrsim }{}%
5359 \@ifxundefined\mathfrak{\let\mathfrak\REV@mathfrak}{}%
5360 \@ifxundefined\mathbb{\let\mathbb\REV@mathbb}{}%
5361 }%
5362 % \end{macrocode}
5363 % \end{macro}
5364 %
5365 % \begin{macrocode}
5366 %</revsymb>
5367 % \end{macrocode}
5368 %
5369 % \section{The \classoption{10pt} class option: the \texttt{10pt} module}
5370 % \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{10pt} is in this module.}
5371 % The file \file{aps10pt.rtx} is read in by the \classname{revtex4} document class
5372 % if \cmd\@pointsize\ has the value 10.
5373 %
5374 % \begin{macrocode}
5375 %<*10pt>
5376 % \end{macrocode}
5377 %
5378 % \subsection{Defend Against Forseeable Errors}%
5379 % Protect this file from being read in by anything but \revtex.
5380 % \begin{macrocode}
5381 \ifx\undefined\substyle@ext
5382 \def\@tempa{%
5383 \endinput
5384 \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
5385 }%
5386 \expandafter\else
5387 \def\@tempa{}%
5388 \expandafter\fi\@tempa
5389 \class@info{RevTeX pointsize 10pt selected}%
5390 % \end{macrocode}
5391 %
5392 % \begin{macrocode}
5393 \def\normalsize{%
5394 \@setfontsize\normalsize\@xpt{11.5}%
5395 \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
5396 \belowdisplayskip \abovedisplayskip
5397 \abovedisplayshortskip \abovedisplayskip
5398 \belowdisplayshortskip \abovedisplayskip
5399 \let\@listi\@listI
5400 }%
5401 % \end{macrocode}
5402 %
5403 % \begin{macrocode}
5404 \def\small{%
5405 \@setfontsize\small\@ixpt{10.5}%
5406 \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
5407 \belowdisplayskip \abovedisplayskip
5408 \abovedisplayshortskip \z@ \@plus2\p@
5409 \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
5410 \def\@listi{%
5411 \leftmargin\leftmargini
5412 \topsep 4\p@ \@plus2\p@ \@minus2\p@
5413 \parsep 2\p@ \@plus\p@ \@minus\p@
5414 \itemsep \parsep
5415 }%
5416 }%
5417 % \end{macrocode}
5418 %
5419 % \begin{macrocode}
5420 \def\footnotesize{%
5421 \@setfontsize\footnotesize\@viiipt{9.5pt}%
5422 \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
5423 \belowdisplayskip \abovedisplayskip
5424 \abovedisplayshortskip \z@ \@plus\p@
5425 \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
5426 \def\@listi{%
5427 \leftmargin\leftmargini
5428 \topsep 3\p@ \@plus\p@ \@minus\p@
5429 \parsep 2\p@ \@plus\p@ \@minus\p@
5430 \itemsep \parsep
5431 }%
5432 }%
5433 % \end{macrocode}
5434 %
5435 % \begin{macrocode}
5436 \def\scriptsize{%
5437 \@setfontsize\scriptsize\@viipt\@viiipt
5438 }%
5439 \def\tiny{%
5440 \@setfontsize\tiny\@vpt\@vipt
5441 }%
5442 \def\large{%
5443 \@setfontsize\large\@xiipt{14pt}%
5444 }%
5445 \def\Large{%
5446 \@setfontsize\Large\@xivpt{18pt}%
5447 }%
5448 \def\LARGE{%
5449 \@setfontsize\LARGE\@xviipt{22pt}%
5450 }%
5451 \def\huge{%
5452 \@setfontsize\huge\@xxpt{25pt}%
5453 }%
5454 \def\Huge{%
5455 \@setfontsize\Huge\@xxvpt{30pt}%
5456 }%
5457 % \end{macrocode}
5458 %
5459 % The values of these margin parameters are dependent upon
5460 % \cmd\twoside@sw; any society or journal that
5461 % has its own preferences should override these assignments
5462 % by doing \cmd\appdef\cmd\setup@hook.
5463 % \begin{macrocode}
5464 \appdef\setup@hook{%
5465 \twoside@sw{%
5466 % \oddsidemargin -.1in
5467 % \evensidemargin -.4in
5468 \oddsidemargin -20pt
5469 \evensidemargin -20pt
5470 \marginparwidth 107pt
5471 }{%
5472 \oddsidemargin -.25in
5473 \evensidemargin -.25in
5474 \marginparwidth 30pt
5475 }%
5476 }%
5477 % \end{macrocode}
5478 %
5479 % \begin{macrocode}
5480 \marginparsep 6pt
5481 % \end{macrocode}
5482 %
5483 % \begin{macrocode}
5484 \topmargin -61pt
5485 % \end{macrocode}
5486 %
5487 % \begin{macrocode}
5488 \headheight 25pt
5489 \headsep 16pt
5490 % \end{macrocode}
5491 %
5492 % \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
5493 % \begin{macrocode}
5494 \topskip 10pt
5495 \splittopskip\topskip
5496 % \end{macrocode}
5497 %
5498 % \begin{macrocode}
5499 \footskip 30pt
5500 % \end{macrocode}
5501 %
5502 % \begin{macrocode}
5503 \textheight = 56pc
5504 % \end{macrocode}
5505 %
5506 % \begin{macrocode}
5507 \textwidth42.5pc
5508 % \end{macrocode}
5509 %
5510 % \begin{macrocode}
5511 \columnsep 1.5pc
5512 \columnseprule 0pt
5513 % \end{macrocode}
5514 %
5515 % \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
5516 % \begin{macrocode}
5517 \footnotesep 1pt
5518 \skip\footins 39pt plus 4pt minus 12pt
5519 \def\footnoterule{%
5520 \dimen@\skip\footins\divide\dimen@\tw@
5521 \kern-\dimen@\hrule width.5in\kern\dimen@
5522 }%
5523 % \end{macrocode}
5524 %
5525 % \begin{macrocode}
5526 \floatsep 12pt plus 2pt minus 2pt
5527 \textfloatsep 20pt plus 2pt minus 4pt
5528 \intextsep 12pt plus 2pt minus 2pt
5529 % \end{macrocode}
5530 %
5531 % \begin{macrocode}
5532 \dblfloatsep 12pt plus 2pt minus 2pt
5533 \dbltextfloatsep 20pt plus 2pt minus 4pt
5534 % \end{macrocode}
5535 %
5536 % \begin{macrocode}
5537 \@fptop 0pt plus 1fil
5538 \@fpsep 8pt plus 2fil
5539 \@fpbot 0pt plus 1fil
5540 \@dblfptop 0pt plus 1fil
5541 \@dblfpsep 8pt plus 2fil
5542 \@dblfpbot 0pt plus 1fil
5543 % \end{macrocode}
5544 %
5545 % \begin{macrocode}
5546 \marginparpush 5pt
5547 % \end{macrocode}
5548 %
5549 % \begin{macrocode}
5550 \parskip 0pt plus 1pt
5551 \parindent 10pt
5552 \emergencystretch8\p@
5553 % \end{macrocode}
5554 %
5555 % \begin{macrocode}
5556 \partopsep 2pt plus 1pt minus 1pt
5557 % \end{macrocode}
5558 %
5559 % \begin{macrocode}
5560 \leftmargini 25pt
5561 \leftmarginii 22pt
5562 \leftmarginiii 18.7pt
5563 \leftmarginiv 17pt
5564 \leftmarginv 10pt
5565 \leftmarginvi 10pt
5566 % \end{macrocode}
5567 %
5568 % \begin{macrocode}
5569 \def\@listI{%
5570 \leftmargin\leftmargini
5571 \parsep 4\p@ plus2\p@ minus\p@
5572 \topsep 8\p@ plus2\p@ minus4\p@
5573 \itemsep 4\p@ plus2\p@ minus\p@
5574 }%
5575 % \end{macrocode}
5576 %
5577 % \begin{macrocode}
5578 \labelsep 4pt
5579 % \end{macrocode}
5580 %
5581 % \begin{macrocode}
5582 \def\@listii{%
5583 \leftmargin\leftmarginii
5584 \labelwidth\leftmarginii
5585 \advance\labelwidth-\labelsep
5586 \topsep 4\p@ plus2\p@ minus\p@
5587 \parsep 2\p@ plus\p@ minus\p@
5588 \itemsep \parsep
5589 }%
5590 % \end{macrocode}
5591 %
5592 % \begin{macrocode}
5593 \def\@listiii{%
5594 \leftmargin\leftmarginiii
5595 \labelwidth\leftmarginiii
5596 \advance\labelwidth-\labelsep
5597 \topsep 2\p@ plus\p@ minus\p@
5598 \parsep \z@
5599 \partopsep \p@ plus\z@ minus\p@
5600 \itemsep \topsep
5601 }%
5602 % \end{macrocode}
5603 %
5604 % \begin{macrocode}
5605 \def\@listiv{%
5606 \leftmargin\leftmarginiv
5607 \labelwidth\leftmarginiv
5608 \advance\labelwidth-\labelsep
5609 }%
5610 % \end{macrocode}
5611 %
5612 % \begin{macrocode}
5613 \def\@listv{%
5614 \leftmargin\leftmarginv
5615 \labelwidth\leftmarginv
5616 \advance\labelwidth-\labelsep
5617 }%
5618 % \end{macrocode}
5619 %
5620 % \begin{macrocode}
5621 \def\@listvi{%
5622 \leftmargin\leftmarginvi
5623 \labelwidth\leftmarginvi
5624 \advance\labelwidth-\labelsep
5625 }%
5626 % \end{macrocode}
5627 %
5628 % \begin{macrocode}
5629 %</10pt>
5630 % \end{macrocode}
5631 %
5632 % \section{The \classoption{11pt} class option: the \texttt{11pt} module}
5633 % \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{11pt} is in this module.}
5634 % The file \file{11pt.rtx} is read in by the \classname{revtex4} document class
5635 % if \cmd\@pointsize\ has the value 11.
5636 %
5637 % \begin{macrocode}
5638 %<*11pt>
5639 % \end{macrocode}
5640 %
5641 % \subsection{Defend Against Forseeable Errors}%
5642 % Protect this file from being read in by anything but \revtex.
5643 % \begin{macrocode}
5644 \ifx\undefined\substyle@ext
5645 \def\@tempa{%
5646 \endinput
5647 \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
5648 }%
5649 \expandafter\else
5650 \def\@tempa{}%
5651 \expandafter\fi\@tempa
5652 \class@info{RevTeX pointsize 11pt selected}%
5653 % \end{macrocode}
5654 %
5655 % \begin{macrocode}
5656 \def\normalsize{%
5657 \@setfontsize\normalsize\@xipt{13.6}%
5658 \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
5659 \belowdisplayskip \abovedisplayskip
5660 \abovedisplayshortskip \abovedisplayskip
5661 \belowdisplayshortskip \abovedisplayskip
5662 \let\@listi\@listI
5663 }%
5664 % \end{macrocode}
5665 %
5666 % \begin{macrocode}
5667 \def\small{%
5668 \@setfontsize\small\@xpt\@xiipt
5669 \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
5670 \abovedisplayshortskip \z@ \@plus3\p@
5671 \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
5672 \def\@listi{\leftmargin\leftmargini
5673 \topsep 6\p@ \@plus2\p@ \@minus2\p@
5674 \parsep 3\p@ \@plus2\p@ \@minus\p@
5675 \itemsep \parsep
5676 }%
5677 \belowdisplayskip \abovedisplayskip
5678 }%
5679 % \end{macrocode}
5680 %
5681 % \begin{macrocode}
5682 \def\footnotesize{%
5683 \@setfontsize\footnotesize\@ixpt{11}%
5684 \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
5685 \abovedisplayshortskip \z@ \@plus\p@
5686 \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
5687 \def\@listi{\leftmargin\leftmargini
5688 \topsep 4\p@ \@plus2\p@ \@minus2\p@
5689 \parsep 2\p@ \@plus\p@ \@minus\p@
5690 \itemsep \parsep
5691 }%
5692 \belowdisplayskip \abovedisplayskip
5693 }%
5694 % \end{macrocode}
5695 %
5696 % \begin{macrocode}
5697 \def\scriptsize{%
5698 \@setfontsize\scriptsize\@viiipt{9.5}%
5699 }%
5700 \def\tiny{%
5701 \@setfontsize\tiny\@vipt\@viipt
5702 }%
5703 \def\large{%
5704 \@setfontsize\large\@xiipt{14}%
5705 }%
5706 \def\Large{%
5707 \@setfontsize\Large\@xivpt{18}%
5708 }%
5709 \def\LARGE{%
5710 \@setfontsize\LARGE\@xviipt{22}%
5711 }%
5712 \def\huge{%
5713 \@setfontsize\huge\@xxpt{25pt}%
5714 }%
5715 \def\Huge{%
5716 \@setfontsize\Huge\@xxvpt{30pt}%
5717 }%
5718 % \end{macrocode}
5719 %
5720 % \begin{macrocode}
5721 %</11pt>
5722 % \end{macrocode}
5723 %
5724 % \section{The \classoption{12pt} class option: the \texttt{12pt} module}
5725 % \changes{4.0b}{1999/06/20}{AO: all code for \protect\classoption{12pt} is in this module.}
5726 % The file \file{12pt.rtx} is read in by the \classname{revtex4} document class
5727 % if \cmd\@pointsize\ has the value 12.
5728 %
5729 % \begin{macrocode}
5730 %<*12pt>
5731 % \end{macrocode}
5732 %
5733 % \subsection{Defend Against Forseeable Errors}%
5734 % Protect this file from being read in by anything but \revtex.
5735 % \begin{macrocode}
5736 \ifx\undefined\substyle@ext
5737 \def\@tempa{%
5738 \endinput
5739 \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
5740 }%
5741 \expandafter\else
5742 \def\@tempa{}%
5743 \expandafter\fi\@tempa
5744 \class@info{RevTeX pointsize 12pt selected}%
5745 % \end{macrocode}
5746 %
5747 % \begin{macrocode}
5748 \def\normalsize{%
5749 \@setfontsize\normalsize\@xiipt{14pt}%
5750 \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
5751 \belowdisplayskip \abovedisplayskip
5752 \abovedisplayshortskip \z@ plus3\p@
5753 \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
5754 \let\@listi\@listI
5755 }%
5756 % \end{macrocode}
5757 %
5758 % \begin{macrocode}
5759 \def\small{%
5760 \@setfontsize\small\@xipt{14.5pt}%
5761 \abovedisplayskip 8\p@ \@plus3\p@ \@minus6\p@
5762 \belowdisplayskip \abovedisplayskip
5763 \abovedisplayshortskip \z@ \@plus3\p@
5764 \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
5765 \def\@listi{%
5766 \leftmargin\leftmargini
5767 \topsep 9\p@ \@plus3\p@ \@minus5\p@
5768 \parsep 4.5\p@ \@plus2\p@ \@minus\p@
5769 \itemsep \parsep
5770 }%
5771 }%
5772 % \end{macrocode}
5773 %
5774 % Same baselineskip as \cmd\small\ ?
5775 % \begin{macrocode}
5776 \def\footnotesize{%
5777 \@setfontsize\footnotesize\@xpt{14.5pt}%
5778 \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
5779 \belowdisplayskip \abovedisplayskip
5780 \abovedisplayshortskip \z@ \@plus3\p@
5781 \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
5782 \def\@listi{%
5783 \leftmargin\leftmargini
5784 \topsep 6\p@ \@plus2\p@ \@minus2\p@
5785 \parsep 3\p@ \@plus2\p@ \@minus\p@
5786 \itemsep \parsep
5787 }%
5788 }%
5789 % \end{macrocode}
5790 %
5791 % \begin{macrocode}
5792 \def\scriptsize{%
5793 \@setfontsize\scriptsize\@viiipt{9.5pt}%
5794 }%
5795 \def\tiny{%
5796 \@setfontsize\tiny\@vipt{7pt}%
5797 }%
5798 \def\large{%
5799 \@setfontsize\large\@xivpt{18pt}%
5800 }%
5801 \def\Large{%
5802 \@setfontsize\Large\@xviipt{22pt}%
5803 }%
5804 \def\LARGE{%
5805 \@setfontsize\LARGE\@xxpt{25pt}%
5806 }%
5807 \def\huge{%
5808 \@setfontsize\huge\@xxvpt{30pt}%
5809 }%
5810 \let\Huge=\huge
5811 % \end{macrocode}
5812 %
5813 % \begin{macrocode}
5814 %</12pt>
5815 % \end{macrocode}
5816 %
5817 % \section{Page parameters}%
5818 % This code is common to both \classoption{11pt} and \classoption{12pt}.
5819 %
5820 % \begin{macrocode}
5821 %<*11pt|12pt>
5822 % \end{macrocode}
5823 %
5824 % \begin{macrocode}
5825 \appdef\setup@hook{%
5826 \twoside@sw{%
5827 \oddsidemargin 0pt
5828 \evensidemargin 0pt
5829 \marginparwidth 60pt
5830 }{%
5831 \oddsidemargin 0pt
5832 \evensidemargin 0pt
5833 \marginparwidth 44pt
5834 }%
5835 }%
5836 % \end{macrocode}
5837 %
5838 % \begin{macrocode}
5839 \marginparsep 10pt
5840 % \end{macrocode}
5841 %
5842 % \begin{macrocode}
5843 \topmargin -37pt
5844 % \end{macrocode}
5845 %
5846 % \begin{macrocode}
5847 \headheight 12pt
5848 \headsep 25pt
5849 % \end{macrocode}
5850 %
5851 % \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
5852 % \begin{macrocode}
5853 \topskip 10pt
5854 \splittopskip\topskip
5855 % \end{macrocode}
5856 %
5857 % \begin{macrocode}
5858 \footskip 30pt
5859 % \end{macrocode}
5860 %
5861 % \begin{macrocode}
5862 \textheight=665.5\p@
5863 % \end{macrocode}
5864 %
5865 % \begin{macrocode}
5866 \appdef\setup@hook{%
5867 \tightenlines@sw{%
5868 \def\baselinestretch{1}%
5869 }{%
5870 \def\baselinestretch{1.5}%
5871 }%
5872 }%
5873 % \end{macrocode}
5874 %
5875 % \begin{macrocode}
5876 \textwidth 468pt
5877 % \end{macrocode}
5878 %
5879 % \begin{macrocode}
5880 \columnsep 10pt
5881 \columnseprule 0pt
5882 % \end{macrocode}
5883 %
5884 % \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
5885 % \begin{macrocode}
5886 \footnotesep 1pt
5887 \skip\footins 25.25pt plus 4pt minus 12pt
5888 \def\footnoterule{%
5889 \dimen@\skip\footins\divide\dimen@\f@ur
5890 \kern-\dimen@\hrule width.5in\kern\dimen@
5891 }%
5892 % \end{macrocode}
5893 %
5894 % \begin{macrocode}
5895 \floatsep 14pt plus 2pt minus 4pt
5896 \textfloatsep 20pt plus 2pt minus 4pt
5897 \intextsep 14pt plus 4pt minus 4pt
5898 % \end{macrocode}
5899 %
5900 % \begin{macrocode}
5901 \dblfloatsep 14pt plus 2pt minus 4pt
5902 \dbltextfloatsep 20pt plus 2pt minus 4pt
5903 % \end{macrocode}
5904 %
5905 % \begin{macrocode}
5906 \@fptop 0pt plus 1fil
5907 \@fpsep 10pt plus 2fil
5908 \@fpbot 0pt plus 1fil
5909 \@dblfptop 0pt plus 1fil
5910 \@dblfpsep 10pt plus 2fil%
5911 \@dblfpbot 0pt plus 1fil
5912 % \end{macrocode}
5913 %
5914 % \begin{macrocode}
5915 \marginparpush 7pt
5916 % \end{macrocode}
5917 %
5918 % \begin{macrocode}
5919 \parskip 0pt plus 1pt
5920 \parindent 15pt
5921 \emergencystretch8\p@
5922 \partopsep 3pt plus 2pt minus 2pt
5923 % \end{macrocode}
5924 %
5925 % \begin{macrocode}
5926 \leftmargini 30pt
5927 \leftmarginii 26pt
5928 \leftmarginiii 22pt
5929 \leftmarginiv 20pt
5930 \leftmarginv 12pt
5931 \leftmarginvi 12pt
5932 % \end{macrocode}
5933 %
5934 % \begin{macrocode}
5935 \def\@listI{\leftmargin\leftmargini \parsep 5\p@ plus2.5\p@ minus\p@
5936 \topsep 10\p@ plus4\p@ minus6\p@
5937 \itemsep 5\p@ plus2.5\p@ minus\p@
5938 }%
5939 % \end{macrocode}
5940 %
5941 % \begin{macrocode}
5942 \labelsep 6pt
5943 % \end{macrocode}
5944 %
5945 % \begin{macrocode}
5946 \def\@listii{\leftmargin\leftmarginii
5947 \labelwidth\leftmarginii\advance\labelwidth-\labelsep
5948 \topsep 5\p@ plus2.5\p@ minus\p@
5949 \parsep 2.5\p@ plus\p@ minus\p@
5950 \itemsep \parsep
5951 }%
5952 % \end{macrocode}
5953 %
5954 % \begin{macrocode}
5955 \def\@listiii{\leftmargin\leftmarginiii
5956 \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
5957 \topsep 2.5\p@ plus\p@ minus\p@
5958 \parsep \z@ \partopsep \p@ plus\z@ minus\p@
5959 \itemsep \topsep
5960 }%
5961 % \end{macrocode}
5962 %
5963 % \begin{macrocode}
5964 \def\@listiv{\leftmargin\leftmarginiv
5965 \labelwidth\leftmarginiv\advance\labelwidth-\labelsep
5966 }%
5967 % \end{macrocode}
5968 %
5969 % \begin{macrocode}
5970 \def\@listv{\leftmargin\leftmarginv
5971 \labelwidth\leftmarginv\advance\labelwidth-\labelsep
5972 }%
5973 % \end{macrocode}
5974 %
5975 % \begin{macrocode}
5976 \def\@listvi{\leftmargin\leftmarginvi
5977 \labelwidth\leftmarginvi\advance\labelwidth-\labelsep
5978 }%
5979 % \end{macrocode}
5980 %
5981 % \begin{macrocode}
5982 %</11pt|12pt>
5983 % \end{macrocode}
5984 %
5985 % \section{The \classoption{aps} class extension: the \texttt{aps} module}
5986 % \changes{4.0b}{1999/06/20}{AO: made aps.rtx part of revtex4.dtx}
5987 % The file \file{aps.rtx} is read in by the \classname{revtex4} document class
5988 % if \cmd\@society\ has the value \classoption{aps}.
5989 %
5990 % Here, code specific to APS journals is separated out from the \revtex\ document class.
5991 % (Other societies can customize \revtex\ by supplying their own \file{.rtx} file.)
5992 %
5993 % This class extension file is a model for a class extension you might write yourself.
5994 %
5995 % First, incorporate a \cmd\ProvidesFile\ command with an optional argument giving
5996 % the version information, e.g.,
5997 % \begin{verbatim}
5998 % \ProvidesFile{foo}[2001/09/11 v1.1 Docinfo]%
5999 % \end{verbatim}
6000 %
6001 % Within the society substyle, there are two things we must do as well:
6002 % define the default journal,
6003 % \begin{verbatim}
6004 % \def\@journal@default{pra}%
6005 % \end{verbatim}
6006 % And do likewise for the point size:
6007 % \begin{verbatim}
6008 % \def\@pointsize@default{10}%
6009 % \end{verbatim}
6010 %
6011 % We first define some text entities (amounting to journal abbreviations),
6012 % then some APS-specific initializations,
6013 % then code for particular APS journals.
6014 % In the latter case, the choice is
6015 % keyed off the macro \cmd\@journal.
6016 %
6017 % \begin{macrocode}
6018 %<*aps>
6019 % \end{macrocode}
6020 %
6021 % \subsection{Defend Against Forseeable Errors}%
6022 % Protect this file from being read in by anything but \revtex.
6023 % \begin{macrocode}
6024 \ifx\undefined\substyle@ext
6025 \def\@tempa{%
6026 \endinput
6027 \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
6028 }%
6029 \expandafter\else
6030 \def\@tempa{}%
6031 \expandafter\fi\@tempa
6032 \class@info{RevTeX society APS selected}%
6033 % \end{macrocode}
6034 %
6035 % Here are the class options relating to the APS:
6036 % \begin{macrocode}
6037 \DeclareOption{pra}{\change@journal{pra}}%
6038 \DeclareOption{prb}{\change@journal{prb}}%
6039 \DeclareOption{prc}{\change@journal{prc}}%
6040 \DeclareOption{prd}{\change@journal{prd}}%
6041 \DeclareOption{pre}{\change@journal{pre}}%
6042 \DeclareOption{prl}{\change@journal{prl}}%
6043 %\changes{4.2b}{2017/11/21}{(MD) Update options for new titles without "Special Topics" and make prper match style of other journal options}
6044 \DeclareOption{prab}{\change@journal{prab}}%
6045 \DeclareOption{prper}{\change@journal{prper}}%
6046 \DeclareOption{rmp}{\change@journal{rmp}}%
6047 %\changes{4.2b}{2017/11/21}{(MD) Add options for new APS journals and a generic physrev option for future-proofing}
6048 \DeclareOption{prx}{\change@journal{prx}}%
6049 \DeclareOption{prapplied}{\change@journal{prapplied}}%
6050 \DeclareOption{prmaterials}{\change@journal{prmaterials}}%
6051 \DeclareOption{prfluids}{\change@journal{prfluids}}%
6052 \DeclareOption{physrev}{\change@journal{physrev}}%
6053 % \end{macrocode}
6054 %
6055 % \subsection{Abbreviations}%
6056 % \changes{4.1p}{2010/02/24}{(AO, 584) Per MD, remove trailing space character from each journal abbreviation: it had caused an extraneous space in the .bbl}
6057 % The following macros constitute typing shortcuts for
6058 % certain journal names.
6059 % \begin{macrocode}
6060 \def\adv{AIP Advances}%
6061 \def\ao{Appl.\ Opt.}%
6062 \def\ap{Appl.\ Phys.}%
6063 \def\apl{Appl.\ Phys.\ Lett.}%
6064 \def\apm{Appl.\ Phys.\ Lett.\ Mater.}%
6065 \def\apj{Astrophys.\ J.}%
6066 \def\bell{Bell Syst.\ Tech.\ J.}%
6067 \def\bmf{Biomicrofluidics}%
6068 \def\cha{Chaos}%
6069 \def\jqe{IEEE J.\ Quantum Electron.}%
6070 \def\assp{IEEE Trans.\ Acoust.\ Speech Signal Process.}%
6071 \def\aprop{IEEE Trans.\ Antennas Propag.}%
6072 \def\mtt{IEEE Trans.\ Microwave Theory Tech.}%
6073 \def\iovs{Invest.\ Ophthalmol.\ Vis.\ Sci.}%
6074 \def\jcp{J.\ Chem.\ Phys.}%
6075 \def\jap{J.\ Appl.\ Phys.}%
6076 \def\jmp{J.\ Math.\ Phys.}%
6077 \def\jmo{J.\ Mod.\ Opt.}%
6078 \def\josa{J.\ Opt.\ Soc.\ Am.}%
6079 \def\josaa{J.\ Opt.\ Soc.\ Am.\ A}%
6080 \def\josab{J.\ Opt.\ Soc.\ Am.\ B}%
6081 \def\jpp{J.\ Phys.\ (Paris)}%
6082 \def\jpr{J.\ Phys.\ Chem.\ Ref.\ Data}%
6083 \def\ltp{Low.\ Temp.\ Phys.}%
6084 \def\nat{Nature (London)}%
6085 \def\oc{Opt.\ Commun.}%
6086 \def\ol{Opt.\ Lett.}%
6087 \def\pl{Phys.\ Lett.}%
6088 \def\pop{Phys.\ Plasmas}%
6089 \def\pof{Phys.\ Fluids}%
6090 \def\pra{Phys.\ Rev.\ A}%
6091 \def\prb{Phys.\ Rev.\ B}%
6092 \def\prc{Phys.\ Rev.\ C}%
6093 \def\prd{Phys.\ Rev.\ D}%
6094 \def\pre{Phys.\ Rev.\ E}%
6095 \def\prl{Phys.\ Rev.\ Lett.}%
6096 \def\rmp{Rev.\ Mod.\ Phys.}%
6097 \def\rsi{Rev.\ Sci.\ Instrum.}%
6098 \def\rse{J.\ Renewable Sustainable Energy}%
6099 \def\pspie{Proc.\ Soc.\ Photo-Opt.\ Instrum.\ Eng.}%
6100 \def\sjqe{Sov.\ J.\ Quantum Electron.}%
6101 \def\vr{Vision Res.}%
6102 \def\sd{Structural\ Dynamics}%
6103 \def\jor{J.\ Rheol.}%
6104 \def\cp{AIP\ Conference\ Proceedings}%
6105 % \end{macrocode}
6106 %
6107 % \subsection{APS Setup}%
6108 % Here we define the default procedures for APS journals.
6109 % Individual APS journals may override these definitions.
6110 %
6111 % \subsubsection{Title block}%
6112 %
6113 % The specifics of the title block.
6114 % Apply to all APS journals; individual journals may override these settings.
6115 %
6116 % \begin{macro}{\@fnsymbol}
6117 % The \LaTeX\ kernel definition of \cmd\@fnsymbol\ is overridden.
6118 % The definition in \filename{fixltx2e.sty} serves as a guide to the new way to symbol,
6119 % working in both text- and math modes.
6120 %
6121 % \filename{fixltx2e.sty} duplicates some features of \filename{ltxgrid} and \filename{ltxutil},
6122 % however, so it may be incompatible with \revtex.
6123 % In case it is not loaded, we must provide a meaning for \cmd\TextOrMath,
6124 % which that package makes robust.
6125 % I believe that it is \cmd\@fnsymbol\ itself that ought to be robustified.
6126 % e\TeX\ further complicates matters; we do not especially accomodate it.
6127 %
6128 % \changes{4.1d}{2009/03/27}{Definition of \cs{ @fnsymbol} follows fixltx2e.sty}
6129 %
6130 % Not! \cmd\TextOrMath\ must be made robust in any case (Bug 530). I return things to follow
6131 % core \LaTeXe\ (\filename{latex.ltx}).
6132 % \changes{4.1f}{2009/10/05}{(AO, 530) \cs{@fnsymbol}: Failed to import fixltx2e.sty technology. Return to LaTeX core.}
6133 % \changes{4.2f}{2022/06/05}{(PHO) \cs{@fnsymbol}: Correct \cs{ifcase} nesting logic.}
6134 % \begin{macrocode}
6135 \def\@fnsymbol#1{%
6136 \ensuremath{%
6137 \ifcase#1\or
6138 *\or
6139 \dagger\or
6140 \ddagger\or
6141 \mathsection\or
6142 \mathparagraph\or
6143 % \|\or
6144 **\or
6145 \dagger\dagger\or
6146 \ddagger\ddagger\or
6147 \mathsection\mathsection\or
6148 \mathparagraph\mathparagraph\or
6149 ***\or
6150 \dagger\dagger\dagger\or
6151 \ddagger\ddagger\ddagger\or
6152 \mathsection\mathsection\mathsection\or
6153 \mathparagraph\mathparagraph\mathparagraph
6154 \else
6155 \@ctrerr
6156 \fi
6157 }%
6158 }%
6159 \appdef\document@inithook{%
6160 \@ifxundefined\TextOrMath{%
6161 \DeclareRobustCommand\TextOrMath{\@ifmmode{\false@sw}{\true@sw}}%
6162 }{}%
6163 }%
6164 \let\thefootnote@latex\thefootnote
6165 % \end{macrocode}
6166 % \end{macro}
6167 %
6168 % We assign the default titlepage style for APS; a journal or document instance
6169 % may override by invoking one of the other \cmd\clo@... procedures defined in \revtex.
6170 % \begin{macrocode}
6171 \clo@groupedaddress
6172 % \end{macrocode}
6173 %
6174 % \begin{macro}{\titlepage}
6175 % \begin{macrocode}
6176 \renewenvironment{titlepage}{%
6177 \let\wastwocol@sw\twocolumn@sw
6178 \onecolumngrid
6179 \newpage
6180 \thispagestyle{titlepage}%
6181 \c@page\z@
6182 % \end{macrocode}
6183 % A comment: ``article.cls sets this to one not zero?''
6184 % \begin{macrocode}
6185 }{%
6186 \wastwocol@sw{\twocolumngrid}{\newpage}%
6187 }%
6188 % \end{macrocode}
6189 % \end{macro}
6190 %
6191 % \begin{macro}{\frontmatter@abstractheading}
6192 % APS Journals all set the abstract head the same way, with no head.
6193 % However, if the user has specified the \classoption{preprint} class option,
6194 % then the abstract will have a head.
6195 % \begin{macrocode}
6196 \def\frontmatter@abstractheading{%
6197 \preprintsty@sw{%
6198 \begingroup
6199 \centering\large
6200 \abstractname
6201 \par
6202 \endgroup
6203 }{}%
6204 }%
6205 % \end{macrocode}
6206 % \end{macro}
6207 %
6208 % \begin{macro}{\frontmatter@abstractwidth}
6209 % All APS journals set the abstract to the same width.
6210 % \begin{macrocode}
6211 \def\frontmatter@abstractwidth{400\p@}%
6212 % \end{macrocode}
6213 % \end{macro}
6214 %
6215 % \begin{macro}{\frontmatter@abstractfont}
6216 % All APS journals set the abstract body the same way.
6217 % \changes{4.0c}{1999/11/13}{(AO, 123) add parskip to the abstract.}
6218 % \changes{4.1e}{2008/06/29}{(AO, 455) be nice to a list within the abstract}
6219 % \begin{macrocode}
6220 \def\frontmatter@abstractfont{%
6221 \small
6222 \parindent1em\relax
6223 \adjust@abstractwidth
6224 }%
6225 \def\adjust@abstractwidth{%
6226 \dimen@\textwidth\advance\dimen@-\frontmatter@abstractwidth
6227 \divide\dimen@\tw@
6228 \galley@sw{%
6229 \advance\rightskip\tw@\dimen@
6230 }{%
6231 \advance\leftskip\dimen@
6232 \advance\rightskip\dimen@
6233 }%
6234 \@totalleftmargin\leftskip
6235 }%
6236 % \end{macrocode}
6237 % \end{macro}
6238 %
6239 %\changes{4.2b}{2017/11/22}{(MD) Change default to not use a title page - it seems antiquated}
6240 % All APS journal preprints use separate titlepage and full-width abstract.
6241 %
6242 % In effect, we establish a society default value for \cmd\preprintsty@sw,
6243 % and for \cmd\titlepage@sw.
6244 % \begin{macrocode}
6245 \@booleanfalse\preprintsty@sw
6246 \@booleanfalse\titlepage@sw
6247 % \end{macrocode}
6248 %
6249 % We choose the page style for all APS journals.
6250 % The journal may override by inserting its own code in \cmd\setup@hook.
6251 % Users wishing to customize their documents will be able to invoke a \cmd\pagestyle\
6252 % command anywhere in the preamble; it will override the assignments here.
6253 %
6254 % Here is the big switch for APS preprints. Note that \cmd\preprintsty@sw
6255 % is also consulted in various procedures, but we assume its value does
6256 % not change after \cmd\setup@hook\ time.
6257 % \begin{macrocode}
6258 \appdef\setup@hook{%
6259 \preprintsty@sw{%
6260 \ps@preprint
6261 \def\frontmatter@abstractwidth{\textwidth}%
6262 \def\frontmatter@affiliationfont{\it}%
6263 \let\section\section@preprintsty
6264 % \end{macrocode}
6265 % The following line of code had been commented out at this point.
6266 % \begin{verbatim}
6267 % \let\@hangfrom@section\@hangfrom@section@preprintsty
6268 % \end{verbatim}
6269 % \begin{macrocode}
6270 \let\subsection\subsection@preprintsty
6271 \let\subsubsection\subsubsection@preprintsty
6272 }{%
6273 \ps@article
6274 }%
6275 }%
6276 % \end{macrocode}
6277 %
6278 % \begin{macro}{\frontmatter@authorformat}
6279 % All APS journals set the author list the same.
6280 % The leading is 11.5 points, and
6281 % there is 11.5 points of extra space above the first author line
6282 % (which amounts to the same thing as 11.5 points extra below the title)
6283 % for a total of 23 points base-to-base.
6284 %
6285 % \begin{macrocode}
6286 \def\frontmatter@authorformat{%
6287 \skip@\@flushglue
6288 \@flushglue\z@ plus.3\hsize\relax
6289 \centering
6290 \advance\baselineskip\p@
6291 \parskip11.5\p@\relax
6292 \@flushglue\skip@
6293 % \end{macrocode}
6294 % The following line of code had been commented out at this point.
6295 % \begin{verbatim}
6296 %\preprintsty@sw{}{%
6297 % \addvspace{0\p@}%
6298 %}%
6299 % \end{verbatim}
6300 % \begin{macrocode}
6301 }%
6302 % \end{macrocode}
6303 % \end{macro}
6304 %
6305 % \begin{macro}{\frontmatter@above@affilgroup}
6306 % The default amount of space above affiliation.
6307 % APS Journals have 24 points b-b above an affiliation group.
6308 % \begin{macrocode}
6309 \def\frontmatter@above@affilgroup{%
6310 % \end{macrocode}
6311 % The following line of code had been commented out at this point.
6312 % \begin{verbatim}
6313 %\preprintsty@sw{}{%
6314 % \addvspace{11\p@}%
6315 %}%
6316 % \end{verbatim}
6317 % \begin{macrocode}
6318 }%
6319 % \end{macrocode}
6320 % \end{macro}
6321 %
6322 % \begin{macro}{\frontmatter@above@affiliation}
6323 % \begin{macro}{\frontmatter@above@affiliation@script}
6324 % The default amount of space above affiliation.
6325 % APS Journals have no extra space between author group down to common affiliation.
6326 % \begin{macrocode}
6327 \def\frontmatter@above@affiliation@script{%
6328 \skip@\@flushglue
6329 \@flushglue\z@ plus.3\hsize\relax
6330 \centering
6331 \@flushglue\skip@
6332 \addvspace{3.5\p@}%
6333 }%
6334 \def\frontmatter@above@affiliation{%
6335 \preprintsty@sw{}{%
6336 % \end{macrocode}
6337 % The following line of code had been commented out at this point.
6338 % \begin{verbatim}
6339 % \addvspace{12\p@}%
6340 % \end{verbatim}
6341 % \begin{macrocode}
6342 }%
6343 }%
6344 % \end{macrocode}
6345 % \end{macro}
6346 % \end{macro}
6347 %
6348 % \begin{macro}{\frontmatter@affiliationfont}
6349 % All APS journals set the affiliation the same.
6350 % \begin{macrocode}
6351 \def\frontmatter@affiliationfont{%
6352 \small\it
6353 }%
6354 % \end{macrocode}
6355 % \end{macro}
6356 %
6357 % \begin{macro}{\frontmatter@collaboration@above}
6358 % PRL: 1.5 points extra: 13 points base-to-base above.
6359 % \begin{macrocode}
6360 \def\frontmatter@collaboration@above{%
6361 \preprintsty@sw{%
6362 }{%
6363 \parskip1.5\p@\relax
6364 }%
6365 }%
6366 % \end{macrocode}
6367 % \end{macro}
6368 %
6369 % \begin{macro}{\frontmatter@setup}
6370 % All APS journals set the title page using the same font and size.
6371 % However, justification varies for the title block elements, so
6372 % we assert none here.
6373 % \begin{macrocode}
6374 \def\frontmatter@setup{%
6375 \normalfont
6376 }%
6377 % \end{macrocode}
6378 % \end{macro}
6379 %
6380 % \begin{macro}{\frontmatter@title@above}
6381 % \begin{macro}{\frontmatter@title@format}
6382 % \begin{macro}{\frontmatter@title@below}
6383 % All APS journals set the article title the same.
6384 %
6385 % Note: Spacing from title to author is 23 points base-to-base.
6386 % \begin{macrocode}
6387 \def\frontmatter@title@above{\addvspace{6\p@}}%
6388 \def\frontmatter@title@format{\large\bfseries\centering\parskip\z@skip}%
6389 \def\frontmatter@title@below{}%
6390 % \end{macrocode}
6391 % \end{macro}
6392 % \end{macro}
6393 % \end{macro}
6394 %
6395 % \begin{macro}{\frontmatter@makefnmark}
6396 % All APS journals share this procedure for setting the titlepage footnote text.
6397 % \begin{macrocode}
6398 \def\@author@parskip{3\p@}%
6399 \def\frontmatter@makefnmark{%
6400 \@textsuperscript{%
6401 \normalfont\@thefnmark
6402 }%
6403 }%
6404 \def\frontmatter@authorbelow{%
6405 \addvspace{3\p@}%
6406 }%
6407 % \end{macrocode}
6408 % \end{macro}
6409 %
6410 % \begin{macro}{\frontmatter@RRAP@format}
6411 % All APS journals use the same format for the ``Received, Revised, etc.'' block on the title page.
6412 %
6413 % Change note: 11.5 points b-b from author/affiliation down to date.
6414 % \begin{macrocode}
6415 \def\frontmatter@RRAP@format{%
6416 \small
6417 \centering
6418 % \end{macrocode}
6419 % The following line of code had been commented out at this point.
6420 % \begin{verbatim}
6421 % \preprintsty@sw{}{\parskip.5ex\relax}%
6422 % \end{verbatim}
6423 % \begin{macrocode}
6424 \everypar{\hbox\bgroup(\@gobble@leavemode@uppercase}%
6425 \def\par{\@ifvmode{}{\unskip)\egroup\@@par}}%
6426 }%
6427 \def\punct@RRAP{;\egroup\ \hbox\bgroup}%
6428 \def\@gobble@leavemode@uppercase#1#2{\expandafter\MakeTextUppercase}%
6429 % \end{macrocode}
6430 % \end{macro}
6431 %
6432 % \begin{macro}{\frontmatter@PACS@format}
6433 %
6434 % \begin{macrocode}
6435 \def\frontmatter@PACS@format{%
6436 \addvspace{11\p@}%
6437 \footnotesize
6438 \adjust@abstractwidth
6439 \parindent\z@
6440 \parskip\z@skip
6441 \samepage
6442 }%
6443 % \end{macrocode}
6444 % \end{macro}
6445 %
6446 % \begin{macro}{\frontmatter@keys@format}
6447 %
6448 % \begin{macrocode}
6449 \def\frontmatter@keys@format{%
6450 \footnotesize
6451 \adjust@abstractwidth
6452 \parindent\z@
6453 \samepage
6454 }%
6455 % \end{macrocode}
6456 % \end{macro}
6457 %
6458 % \begin{macro}{\ps@titlepage}
6459 % \changes{4.0a}{1998/06/10}{multiple preprint commands}
6460 % \changes{4.0b}{1999/06/20}{Stack \cs{preprint} args flush right at right margin.}
6461 % Title page style. Currently empty except for preprint header,
6462 % which consists of all the \cmd\preprint\ arguments,
6463 % stacked flush right at the right margin.
6464 % \changes{4.0c}{1999/11/13}{Insert procedure \cs{checkindate}}
6465 % \begin{macrocode}
6466 \def\ps@titlepage{%
6467 \def\@oddhead{%
6468 \hfill
6469 \preprint@sw{%
6470 \expandafter\produce@preprints\expandafter{\@preprint}%
6471 }{}%
6472 }%
6473 \let\@evenhead\@oddhead
6474 \def\@oddfoot{%
6475 \hb@xt@\z@{\byrevtex\hss}%
6476 \hfil
6477 \preprintsty@sw{\thepage}{}%
6478 \quad\checkindate
6479 \hfil
6480 }%
6481 \let\@evenfoot\@oddfoot
6482 }%
6483 \def\byrevtex{\byrevtex@sw{Typeset by REV\TeX}{}}%
6484 % \end{macrocode}
6485 % \end{macro}
6486 %
6487 % \begin{macro}{\produce@preprints}
6488 % \changes{4.0c}{1999/11/13}{(AO, 115) If three or more preprints specified, set on single line, with commas.}
6489 % \begin{macrocode}
6490 \def\produce@preprints#1{%
6491 \vtop to \z@{%
6492 \def\baselinestretch{1}%
6493 \small
6494 \let\preprint\preprint@count
6495 \count@\z@
6496 #1%
6497 \@ifnum{\count@>\tw@}{%
6498 \hbox{%
6499 \let\preprint\preprint@hlist
6500 #1%
6501 \setbox\z@\lastbox
6502 }%
6503 }{%
6504 \let\preprint\preprint@cr
6505 \halign{\hfil##\cr#1\crcr}%
6506 \par
6507 \vss
6508 }%
6509 }%
6510 }%
6511 \def\preprint@cr#1{#1\cr}%
6512 \def\preprint@count#1{\advance\count@\@ne}%
6513 \def\preprint@hlist#1{#1\hbox{, }}%
6514 % \end{macrocode}
6515 % \end{macro}
6516 %
6517 % \subsubsection{Stacked Heads}%
6518 % All APS journals put a period (.), followed by quad space, after the section number.
6519 % Also, no hanging section number.
6520 % \begin{macrocode}
6521 \def\@seccntformat#1{\csname the#1\endcsname.\quad}%
6522 \def\@hang@from#1#2#3{#1#2#3}%
6523 % \end{macrocode}
6524 %
6525 % Note that in the following, we wish to set the section head uppercase, so we use
6526 % David Carlisle's \cmd\MakeTextUppercase. However, because this procedure effectively
6527 % parses its argument (looking for things to \emph{not} translate), it has to be invoked
6528 % in such a way that the argument of the \cmd\section\ command is passed to it as its
6529 % own argument.
6530 %
6531 % To accomplish this, we use the \cmd\@hangfrom@\ hook, which was developed for this
6532 % purpose.
6533 %
6534 % \begin{macrocode}
6535 \def\section{%
6536 \@startsection
6537 {section}%
6538 {1}%
6539 {\z@}%
6540 {0.8cm \@plus1ex \@minus .2ex}%
6541 {0.5cm}%
6542 {%
6543 \normalfont\small\bfseries
6544 \centering
6545 }%
6546 }%
6547 \def\@hangfrom@section#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
6548 \def\@hangfroms@section#1#2{#1\MakeTextUppercase{#2}}%
6549 % \end{macrocode}
6550 %
6551 % \begin{macrocode}
6552 \def\subsection{%
6553 \@startsection
6554 {subsection}%
6555 {2}%
6556 {\z@}%
6557 {.8cm \@plus1ex \@minus .2ex}%
6558 {.5cm}%
6559 {%
6560 \normalfont\small\bfseries
6561 \centering
6562 }%
6563 }%
6564 % \end{macrocode}
6565 %
6566 % \begin{macrocode}
6567 \def\subsubsection{%
6568 \@startsection
6569 {subsubsection}%
6570 {3}%
6571 {\z@}%
6572 {.8cm \@plus1ex \@minus .2ex}%
6573 {.5cm}%
6574 {%
6575 \normalfont\small\itshape
6576 \centering
6577 }%
6578 }%
6579 % \end{macrocode}
6580 %
6581 % \subsubsection{Runin Heads}%
6582 % \begin{macrocode}
6583 \def\paragraph{%
6584 \@startsection
6585 {paragraph}%
6586 {4}%
6587 {\parindent}%
6588 {\z@}%
6589 {-1em}%
6590 {\normalfont\normalsize\itshape}%
6591 }%
6592 % \end{macrocode}
6593 %
6594 % \begin{macrocode}
6595 \def\subparagraph{%
6596 \@startsection
6597 {subparagraph}%
6598 {5}%
6599 {\parindent}%
6600 {3.25ex \@plus1ex \@minus .2ex}%
6601 {-1em}%
6602 {\normalfont\normalsize\bfseries}%
6603 }%
6604 % \end{macrocode}
6605 %
6606 %
6607 %
6608 % \begin{macro}{\section@preprintsty}
6609 % \begin{macro}{\subsection@preprintsty}
6610 % \begin{macro}{\subsubsection@preprintsty}
6611 % Here are the formatting procedures specific to the preprint style;
6612 % the only difference is that the heads are flush left instead of centered.
6613 %
6614 % \begin{macrocode}
6615 \def\section@preprintsty{%
6616 \@startsection
6617 {section}%
6618 {1}%
6619 {\z@}%
6620 {0.8cm \@plus1ex \@minus .2ex}%
6621 {0.5cm}%
6622 {%
6623 \normalfont\small\bfseries
6624 % \centering
6625 }%
6626 }%
6627 %\def\@hangfrom@section@preprintsty#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
6628 % \end{macrocode}
6629 % \begin{macrocode}
6630 \def\subsection@preprintsty{%
6631 \@startsection
6632 {subsection}%
6633 {2}%
6634 {\z@}%
6635 {.8cm \@plus1ex \@minus .2ex}%
6636 {.5cm}%
6637 {%
6638 \normalfont\small\bfseries
6639 % \centering
6640 }%
6641 }%
6642 % \end{macrocode}
6643 % \begin{macrocode}
6644 \def\subsubsection@preprintsty{%
6645 \@startsection
6646 {subsubsection}%
6647 {3}%
6648 {\z@}%
6649 {.8cm \@plus1ex \@minus .2ex}%
6650 {.5cm}%
6651 {%
6652 \normalfont\small\itshape
6653 % \centering
6654 }%
6655 }%
6656 % \end{macrocode}
6657 % \end{macro}
6658 % \end{macro}
6659 % \end{macro}
6660 %
6661 % By default, APS journals set titlepage notes as footnotes.
6662 % \begin{verbatim}
6663 \let\frontmatter@footnote@produce\frontmatter@footnote@produce@footnote
6664 % \end{verbatim}
6665 %
6666 % \subsubsection{Table of Contents}%
6667 % The toc will itself make an entry in the toc,
6668 % but we temporarily turn off toc formatting for the duration.
6669 % \changes{4.1a}{2008/01/19}{(AO, 461) Change the csname revtex uses from @dotsep to ltxu@dotsep. The former is understood in mu. (What we wanted was a dimension.)}%
6670 % \begin{macrocode}
6671 \def\@pnumwidth{1.55em}%
6672 \def\@tocrmarg {2.55em}%
6673 \def\@dotsep{2}%
6674 \def\ltxu@dotsep{4.5pt}%
6675 \setcounter{tocdepth}{3}%
6676 % \end{macrocode}
6677 %
6678 % \begin{macrocode}
6679 \def\tableofcontents{%
6680 \addtocontents{toc}{\string\tocdepth@munge}%
6681 \print@toc{toc}%
6682 \addtocontents{toc}{\string\tocdepth@restore}%
6683 }%
6684 % \end{macrocode}
6685 %
6686 % \begin{macrocode}
6687 \def\tocdepth@munge{%
6688 \let\l@section@saved\l@section
6689 \let\l@section\@gobble@tw@
6690 }%
6691 \def\@gobble@tw@#1#2{}%
6692 % \end{macrocode}
6693 %
6694 % \begin{macrocode}
6695 \def\tocdepth@restore{%
6696 \let\l@section\l@section@saved
6697 }%
6698 % \end{macrocode}
6699 %
6700 % The following definition of \cmd\l@part\ is a variant on
6701 % the definition of \cmd\l@@sections\ in \file{ltxutil.dtx}.
6702 % \begin{macrocode}
6703 \def\l@part#1#2{\addpenalty{\@secpenalty}%
6704 \begingroup
6705 \set@tocdim@pagenum\@tempboxa{#2}%
6706 % \@tempdima 3em %
6707 \parindent \z@
6708 \rightskip\tocleft@pagenum plus 1fil\relax
6709 \skip@\parfillskip\parfillskip\z@
6710 \addvspace{2.25em plus\p@}%
6711 \large \bf %
6712 \leavevmode\ignorespaces#1\unskip\nobreak\hskip\skip@
6713 \hb@xt@\rightskip{\hfil\unhbox\@tempboxa}\hskip-\rightskip\hskip\z@skip
6714 \par
6715 \nobreak %
6716 \endgroup
6717 }%
6718 % \end{macrocode}
6719 %
6720 % \begin{macro}{\l@section}
6721 % Determine which TOC elements are automatically indented.
6722 %
6723 % We set the TOC to the standard of RMP.
6724 % If APS has its own specification, we will code it, and RMP must override.
6725 % \begin{macrocode}
6726 \def\tocleft@{\z@}%
6727 \def\tocdim@min{5\p@}%
6728 \def\l@section{%
6729 \l@@sections{}{section}% Implicit #3#4
6730 }%
6731 \def\l@f@section{%
6732 \addpenalty{\@secpenalty}%
6733 \addvspace{1.0em plus\p@}%
6734 %\bf
6735 }%
6736 \def\l@subsection{%
6737 \l@@sections{section}{subsection}% Implicit #3#4
6738 }%
6739 \def\l@subsubsection{%
6740 \l@@sections{subsection}{subsubsection}% Implicit #3#4
6741 }%
6742 \def\l@paragraph#1#2{}%
6743 \def\l@subparagraph#1#2{}%
6744 % \end{macrocode}
6745 % \end{macro}
6746 %
6747 % Activate the auto TOC processing.
6748 % \begin{macrocode}
6749 \let\toc@pre\toc@pre@auto
6750 \let\toc@post\toc@post@auto
6751 % \end{macrocode}
6752 %
6753 % \subsubsection{Default column bottom}%
6754 % All APS journal styles have flush bottoms.
6755 %\changes{4.1n}{2009/11/30}{(AO, 566) restore 4.0 behavior: flush column bottoms}
6756 % \begin{macrocode}
6757 \@booleanfalse\raggedcolumn@sw
6758 % \end{macrocode}
6759 %
6760 %
6761 % \subsubsection{Table alignment style}%
6762 %
6763 % \begin{macro}{\tableft@skip@float}
6764 % \begin{macro}{\tabmid@skip@float}
6765 % \begin{macro}{\tabright@skip@float}
6766 % \begin{macro}{\array@row@pre@float}
6767 % \begin{macro}{\array@row@pst@float}
6768 % All APS publications have the same table specification:
6769 % Scotch rules above and below, centered in column.
6770 % \begin{macrocode}
6771 \def\tableft@skip@float{\z@ plus\hsize}%
6772 \def\tabmid@skip@float{\@flushglue}%
6773 \def\tabright@skip@float{\z@ plus\hsize}%
6774 \def\array@row@pre@float{\hline\hline\noalign{\vskip\doublerulesep}}%
6775 \def\array@row@pst@float{\noalign{\vskip\doublerulesep}\hline\hline}%
6776 % \end{macrocode}
6777 % \end{macro}
6778 % \end{macro}
6779 % \end{macro}
6780 % \end{macro}
6781 % \end{macro}
6782 %
6783 %
6784 % \subsubsection{Footnote formatting}%
6785 % \changes{4.1n}{2010/01/02}{(AO, 572) \cs{@makefntext} and \cs{frontmatter@makefntext} must be defined harmoniously}%
6786 % We customize the formatting of footnotes for all APS journals.
6787 % \begin{macro}{\@makefntext}
6788 % \begin{macrocode}
6789 \long\def\@makefntext#1{%
6790 \def\baselinestretch{1}%
6791 \leftskip1em%
6792 \parindent1em%
6793 \noindent
6794 \nobreak\hskip-\leftskip
6795 \hb@xt@\leftskip{%
6796 \hss\@makefnmark\ %
6797 }%
6798 #1%
6799 \par
6800 }%
6801 % \end{macrocode}
6802 % \end{macro}
6803 % \begin{macro}{\frontmatter@makefntext}
6804 % We ensure that frontmatter footnotes format similarly to body footnotes.
6805 % But we provide our own hypertext anchor, otherwise not provided.
6806 % \changes{4.1n}{2010/01/02}{(AO, 572) Independent footnote counter for title block. Abstract footnote counter shared with body.}%
6807 % \begin{macrocode}
6808 \long\def\frontmatter@makefntext#1{%
6809 \def\baselinestretch{1}%
6810 \leftskip1em%
6811 \parindent1em%
6812 \noindent
6813 \nobreak\hskip-\leftskip
6814 \Hy@raisedlink{\hyper@anchorstart{frontmatter.\expandafter\the\csname c@\@mpfn\endcsname}\hyper@anchorend}%
6815 \hb@xt@\leftskip{%
6816 \hss\@makefnmark\ %
6817 }%
6818 #1%
6819 \par
6820 }%
6821 % \end{macrocode}
6822 % \end{macro}
6823 %
6824 %
6825 % \subsubsection{Appendix}%
6826 % \begin{macro}{\appendix}
6827 % \begin{macro}{\@hangfrom@appendix}
6828 % \begin{macro}{\@hangfroms@appendix}
6829 % \begin{macro}{\@appendixcntformat}
6830 % \changes{4.0c}{1999/11/13}{(AO, 129) section* within appendix was producing appendixname}
6831 % \begin{macrocode}
6832 \prepdef\appendix{%
6833 \par
6834 \let\@hangfrom@section\@hangfrom@appendix
6835 %\let\@hangfroms@section\@hangfroms@appendix
6836 \let\@sectioncntformat\@appendixcntformat
6837 }%
6838 \def\@hangfrom@appendix#1#2#3{%
6839 #1%
6840 \@if@empty{#2}{%
6841 #3%
6842 }{%
6843 #2\@if@empty{#3}{}{:\ #3}%
6844 }%
6845 }%
6846 \def\@hangfroms@appendix#1#2{%
6847 #1#2%
6848 }%
6849 \def\@appendixcntformat#1{\appendixname\ \csname the#1\endcsname}%
6850 % \end{macrocode}
6851 % \end{macro}
6852 % \end{macro}
6853 % \end{macro}
6854 % \end{macro}
6855 %
6856 % \subsubsection{Bibliography}%
6857 % \changes{4.1n}{2010/01/04}{(AO, 576) In .bst files, remove support for the annote field}%
6858 %
6859 % Customize \revtex\ for the journal substyle;
6860 % this task requires three components:
6861 % the \BibTeX\ \file{apsrev.bst} and \file{apsrmp.bst} style files, and
6862 % customizations of the \env{thebibliography} environment.
6863 %
6864 % \begin{macro}{\@bibstyle}
6865 % Define the argument of the \cmd\bibliographystyle\ command
6866 % (if the document does not do so).
6867 % The user must have installed a \file{.bst} file of the corresponding name.
6868 % This file will then be used by \BibTeX\ when compiling the document's \file{.bbl} file.
6869 %
6870 % To generate \file{apsrev.bst}, use \classname{custom-bib} version 4.21 or later.
6871 % Run the \file{.bst} generator, \file{makebst.tex}, and
6872 % accept all defaults, with the following exceptions:
6873 %
6874 % \def\QandA#1#2#3{\item#1: \textbf{#2}: \texttt{#3}---}%
6875 % \def\CandE#1{\item\relax\texttt{#1}---}%
6876 % \begin{enumerate}
6877 % \QandA{LANGUAGE FIELD}{l}{lang}Use language field to switch hyphenation patterns for title
6878 % \QandA{PRESENTATIONS}{b}{pres,pres-bf}Presentation, speaker bold face
6879 % \QandA{ORDERING OF REFERENCES}{c}{seq-no}Citation order (unsorted, like unsrt.bst)
6880 % \QandA{ORDER ON VON PART}{x}{vonx}Sort without von part (de la Maire after Mahone)
6881 % \QandA{AUTHOR NAMES}{i}{nm-init,ed-au}Initials + surname (J. F. Smith)
6882 % \QandA{POSITION OF JUNIOR}{*}{jnrlst}Junior comes last as Smith, John, Jr.
6883 % \QandA{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES}{u}{nmft,nmft-def}User defined author font (\cmd\bibnamefont)
6884 % \QandA{FONT FOR FIRST NAMES}{u}{fnm-def}First names in user defined font (\cmd\bibfnamefont)
6885 % \QandA{EDITOR NAMES IN INCOLLECTION ETC}{a}{nmfted}Editors incollection like authors font
6886 % \QandA{FONT FOR `AND' IN LIST}{r}{nmand-rm}`And' in normal font (JONES and JAMES)
6887 % \QandA{FONT OF CITATION LABELS IN TEXT}{u}{lab,lab-def}User defined citation font (\cmd\citenamefont)
6888 % \QandA{FONT FOR `AND' IN CITATIONS}{r}{and-rm}Cited `and' in normal font
6889 % \QandA{DATE FORMAT}{*}{yr-par}Date in parentheses as (May 1993)
6890 % \QandA{DATE EMPTY}{-}{date-nil-x}If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
6891 % \QandA{TITLE OF ARTICLE}{d}{tit-qq}Title and punctuation in double quotes (``Title,'' ..)
6892 % \QandA{INPROCEEDINGS CHAPTER AND PAGES, LIKE INBOOK}{-}{inproceedings-chapter}produce pages after chapter, just as in InBook
6893 % \QandA{TITLE PRESENT IN ARTICLE, INCOLLECTION, AND INPROCEEDINGS}{x}{jtit-x}Title is ignored
6894 % \QandA{INPROCEEDINGS CHAPTER AND PAGES, LIKE INBOOK}{y}{inproceedings-chapter}produce pages after chapter, just as in InBook
6895 % \QandA{ARTICLE BOOKTITLE PRESENT}{}{article-booktitle}format booktitle
6896 % \QandA{ARTICLE SERIES PRESENT}{}{article-series}article can has series
6897 % \QandA{JOURNAL NAME FONT}{r}{jttl-rm}Journal name normal font
6898 % \QandA{JOURNAL NAME WITH ADDRESS}{y}{journal-address}Include address field (in parentheses) along with journal name
6899 % \QandA{BOOK TITLE FIELDS}{y}{book-bt}Field `booktitle', or if absent field `title', is book title
6900 % \QandA{THESIS TITLE OPTIONAL}{}{thesis-title-o}Title is optional: no warning issued if empty
6901 % \QandA{TECHNICAL REPORT TITLE}{b}{trtit-b}Tech. report title like books
6902 % \QandA{TECHNICAL REPORT INSTITUTION}{}{techreport-institution-par}format tech report institution like book publisher
6903 % \QandA{JOURNAL VOLUME}{b}{vol-bf}Volume bold as {\bf vol}(num)
6904 % \QandA{JOURNAL VOL AND NUMBER}{x}{vnum-x}Journal vol, without number as 34
6905 % \QandA{VOLUME PUNCTUATION}{c}{volp-com}Volume with comma as vol(num), ppp
6906 % \QandA{PAGE NUMBERS}{f}{jpg-1}Only start page number
6907 % \QandA{BOOK EDITOR W/O AUTHOR}{}{book-editor-booktitle}Book permits empty author, produces title before editor in this case
6908 % \QandA{INBOOK PERMITS TITLE, BOOKTITLE, AUTHOR, EDITOR}{a}{inbook-editor-booktitle}Allow using both title/booktitle, both author/editor
6909 % \QandA{CONFERENCE ADDRESS FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{a}{bookaddress}Italic booktitle followed by bookaddress in roman
6910 % \QandA{NUMBER AND SERIES FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{*}{num-xser}Allows number without series and suppresses word "number"
6911 % \QandA{WORD NUMBER CAPITALIZED FOR NUMBER AND SERIES}{c}{number-cap}Capitalize word `number' as: "Number 123"
6912 % \QandA{WORD CHAPTER CAPITALIZED}{c}{chapter-cap}Capitalize word `chapter' as: `Chapter 42'
6913 % \QandA{COMBINING NUMBER AND SERIES}{x}{series-number}Series number as: `Springer Lecture Notes No. 125'
6914 % \QandA{POSITION OF NUMBER AND SERIES}{b}{numser-booktitle}After book title and conference address, and before editors
6915 % \QandA{VOLUME AND SERIES FOR BOOKS/COLLECTIONS}{s}{ser-vol}Series, vol. 23
6916 % \QandA{VOLUME AND SERIES FORMATTING}{y}{ser-rm}format series roman , even when used with volume
6917 % \QandA{WORD VOLUME CAPITALIZED FOR VOLUME AND SERIES}{y}{volume-cap}Capitalize word `volume', as: `Volume 7 in Lecture Series'
6918 % \QandA{POSITION OF VOLUME AND SERIES FOR INCOLLECTION, INBOOK, AND INPROCEEDINGS}{e}{ser-ed}Series and volume after booktitle and before editors
6919 % \QandA{JOURNAL NAME PUNCTUATION}{x}{jnm-x}Space after journal name
6920 % \QandA{PAGES IN BOOK}{*}{pg-bk,book-chapter-pages}As chapter and page: chapter 42, page 345
6921 % \QandA{PUBLISHER IN PARENTHESES}{d}{pub-date}Publisher with address and date in parentheses (Oxford, 1994)
6922 % \QandA{EMPTY PUBLISHER PARENTHESES}{y}{ay-empty-pub-parens-x}eliminate parentheses altogether if nothing inside
6923 % \QandA{PUBLISHER POSITION}{}{pre-pub}Publisher before volume, chapter, pages
6924 % \QandA{}{}{pre-edn}Edition before publisher
6925 % \QandA{}{p}{pre-pub,pre-edn}Edition, publisher, volume, chapter, pages
6926 % \QandA{ISBN NUMBER}{*}{isbn}Include ISBN for books, booklets, etc.
6927 % \QandA{ISSN NUMBER}{*}{issn}Include ISSN for periodicals
6928 % \QandA{DOI NUMBER}{a}{doi-link,doi}Doi forms a link to the publication, anchored to the volume or title
6929 % \QandA{EDITOR IN COLLECTIONS}{b}{edby}In booktitle, edited by .. (where .. is names)
6930 % \QandA{PUNCTUATION BETWEEN SECTIONS (BLOCKS)}{c}{blk-com}Comma between blocks
6931 % \QandA{FINAL PUNCTUATION}{c}{fin-endbibitem}Command at end instead of period
6932 % \QandA{ABBREVIATE WORD `PAGES'}{a}{pp}`Page' abbreviated as p. or pp.
6933 % \QandA{ABBREVIATE WORD `EDITORS'}{a}{ed}`Editor' abbreviated as ed. or eds.
6934 % \QandA{OTHER ABBREVIATIONS}{a}{abr}Abbreviations of such words
6935 % \QandA{ABBREVIATION FOR `EDITION'}{a}{ednx}`Edition' abbreviated as `ed'
6936 % \QandA{EDITION NUMBERS}{n}{ord}Numerical editions as 1st, 2nd, 3rd, etc
6937 % \QandA{STORED JOURNAL NAMES}{a}{jabr}Abbreviated journal names
6938 % \QandA{FONT OF `ET AL'}{i}{etal-it}Italic et al
6939 % \QandA{ADDITIONAL REVTeX DATA FIELDS}{r}{revdata,eprint,url,url-blk,translation}Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
6940 % \QandA{SLACcitation FIELD}{}{SLACcitation}Produce SLACcitation field
6941 % \QandA{NUMPAGES DATA FIELD}{*}{numpages-x}Do not include numpages field
6942 % \QandA{URL ADDRESS}{*}{url,url-prefix-x}URL without prefix (default: `URL ')
6943 % \QandA{REFERENCE COMPONENT TAGS}{b}{bibinfo}Reference component tags like \cmd\bibinfo in the content of \cmd\bibitem
6944 % \QandA{ELEMENT TAGS}{b}{bibfield}Element tags like \cmd\bibfield in the content of \cmd\bibitem
6945 % \QandA{COMPATIBILITY WITH PLAIN TEX}{*}{nfss}Use LaTeX commands which may not work with Plain TeX
6946 % \end{enumerate}
6947 %
6948 % A file \file{apsrev.dbj} file equivalent to the following should result:
6949 % \begin{verbatim}
6950 %\input docstrip
6951 %\preamble
6952 %----------------------------------------
6953 %*** REVTeX-compatible Phys Rev 2010-02-12 ***
6954 %\endpreamble
6955 %\postamble
6956 %End of customized bst file
6957 %\endpostamble
6958 %\keepsilent
6959 %\askforoverwritefalse
6960 %\def\MBopts{\from{merlin.mbs}{%
6961 % head,\MBopta}
6962 %\from{physjour.mbs}{\MBopta}
6963 %\from{geojour.mbs}{\MBopta}
6964 %\from{photjour.mbs}{\MBopta}
6965 %\from{merlin.mbs}{tail,\MBopta}}
6966 %\def\MBopta{%
6967 % ay,%: Author-year with some non-standard interface
6968 % nat,%: Natbib for use with natbib v5.3 or later
6969 % lang,%: Use language field to switch hyphenation patterns for title
6970 % pres,pres-bf,%: Presentation, speaker bold face
6971 % seq-no,%: Citation order (unsorted, only meaningful for numericals)
6972 % vonx,%: Sort without von part (de la Maire after Mahone)
6973 % nm-init,ed-au,%: Initials + surname (J. F. Smith)
6974 % jnrlst,%: Junior comes last as Smith, John, Jr.
6975 % nmft,nmft-def,%: User defined author font (\bibnamefont)
6976 % fnm-def,%: First names in user defined font (\bibfnamefont)
6977 % nmfted,%: Editors incollection like authors font
6978 % nmand-rm,%: `And' in normal font (JONES and JAMES)
6979 % lab,lab-def,%: User defined citation font (\citenamefont)
6980 % and-rm,%: Cited `and' in normal font
6981 % keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0)
6982 % blkyear,%: Missing date left blank
6983 % yr-par,%: Year in parentheses as (1993)
6984 % dtrev,%: Date as year month
6985 % date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
6986 % tit-qq,%: Title and punctuation in double quotes (``Title,'' ..)
6987 % inproceedings-chapter,%: produce pages after chapter, just as in InBook
6988 % jtit-x,%: Title is ignored
6989 % inproceedings-chapter,%: produce pages after chapter just as in InBook
6990 % article-booktitle,%: format booktitle
6991 % article-series,%: article can has series
6992 % jttl-rm,%: Journal name normal font
6993 % journal-address,%: Include address field (in parentheses) along with journal name
6994 % book-bt,%: Field `booktitle', or if absent field `title', is book title
6995 % thesis-title-o,%: Title is optional: no warning issued if empty
6996 % trtit-b,%: Tech. report title like books
6997 % techreport-institution-par,%: format tech report institution like book publisher
6998 % vol-bf,%: Volume bold as {\bf vol}(num)
6999 % vnum-x,%: Journal vol, without number as 34
7000 % volp-com,%: Volume with comma as vol(num), ppp
7001 % jpg-1,%: Only start page number
7002 % book-editor-booktitle,%: Book permits empty author, produces title before editor in this case
7003 % inbook-editor-booktitle,%: Allow using both title/booktitle, both author/editor
7004 % bookaddress,%: Italic booktitle followed by bookaddress in roman
7005 % num-xser,%: Allows number without series and suppresses word "number"
7006 % number-cap,%: Capitalize word `number' as: "Number 123"
7007 % chapter-cap,%: Capitalize word `chapter' as: `Chapter 42'
7008 % series-number,%: Series number as: `Springer Lecture Notes No. 125'
7009 % numser-booktitle,%: After book title and conference address, and before editors
7010 % ser-vol,%: Series, vol. 23
7011 % ser-rm,%: format series roman , even when used with volume
7012 % volume-cap,%: Capitalize word `volume', as: `Volume 7 in Lecture Series'
7013 % ser-ed,%: Series and volume after booktitle and before editors
7014 % jnm-x,%: Space after journal name
7015 % pg-bk,book-chapter-pages,%: As chapter and page: chapter 42, page 345
7016 % pub-date,%: Publisher with address and date in parentheses (Oxford, 1994)
7017 % ay-empty-pub-parens-x,%: eliminate parentheses altogether if nothing inside
7018 % pre-pub,pre-edn,%: Edition, publisher, volume, chapter, pages
7019 % isbn,%: Include ISBN for books, booklets, etc.
7020 % issn,%: Include ISSN for periodicals
7021 % doi-link,doi,%: Doi forms a link to the publication, anchored to the volume or title
7022 % edby,%: In booktitle, edited by .. (where .. is names)
7023 % blk-com,%: Comma between blocks
7024 % fin-endbibitem,%: Command at end instead of period
7025 % pp,%: `Page' abbreviated as p. or pp.
7026 % ed,%: `Editor' abbreviated as ed. or eds.
7027 % abr,%: Abbreviations of such words
7028 % ednx,%: `Edition' abbreviated as `ed'
7029 % ord,%: Numerical editions as 1st, 2nd, 3rd, etc
7030 % jabr,%: Abbreviated journal names
7031 % etal-it,%: Italic et al
7032 % revdata,eprint,url,url-blk,translation,%: Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
7033 % SLACcitation,%: Produce SLACcitation field
7034 % numpages-x,%: Do not include numpages field
7035 % url,url-prefix-x,%: URL without prefix (default: `URL ')
7036 % bibinfo,%: Reference component tags like \bibinfo in the content of \bibitem
7037 % bibfield,%: Element tags like \bibfield in the content of \bibitem
7038 % nfss,%: Use LaTeX commands which may not work with Plain TeX
7039 %,{%
7040 % }}
7041 %\generate{\file{apsrev4-2.bst}{\MBopts}}
7042 %\endbatchfile
7043 % \end{verbatim}
7044 %
7045 % \subsubsection{Comparing apsrev.bst and apsrmp.bst}\label{sec:CompRevRmp}
7046 % These two bibliographic styles differ as follows:
7047 % \file{apsrev.dbj} has the following guard codes, which \file{apsrmp.dbj} does not:
7048 % \begin{itemize}
7049 % \CandE{seq-no}%
7050 % Citation order (unsorted, like unsrt.bst)
7051 % \CandE{nm-init,ed-au}%
7052 % Initials + surname (J. F. Smith)
7053 % \CandE{blkyear}%
7054 % Missing date left blank
7055 % \CandE{date-nil-x}%
7056 % If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
7057 % \CandE{inproceedings-chapter}%
7058 % produce pages after chapter, just as in InBook
7059 % \CandE{techreport-institution-par}%
7060 % format tech report institution like book publisher
7061 % \CandE{vnum-x}%
7062 % Journal vol, without number as `34'
7063 % \CandE{pub-date}%
7064 % Publisher with address and date in parentheses (Oxford, 1994)
7065 % \CandE{pre-pub}%
7066 % Edition, publisher, volume, chapter, pages. Note that both use guard code pre-edn.
7067 % \end{itemize}
7068 %
7069 % \file{apsrmp.dbj} has the following guard codes, which \file{apsrev.dbj} does not:
7070 % \begin{itemize}
7071 % \CandE{nm-rev1}%
7072 % Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
7073 % \CandE{dt-beg}%
7074 % Date after authors
7075 % \CandE{vnum-sp}%
7076 % Journal vol (num) as `34 (2)'
7077 % \CandE{pp-last}%
7078 % Pages at end, but before any notes
7079 % \CandE{pub-par}%
7080 % Publisher in parentheses
7081 % \CandE{school-par}%
7082 % School/address in parens: `(school, address)'
7083 % \CandE{bkedcap}%
7084 % `Name Editor,' as above, editor upper case
7085 % \CandE{and-com}%
7086 % Comma even with 2 authors as `Tom, and Harry'
7087 %
7088 % \end{itemize}
7089 %
7090 % We ensure that the journal substyle has the first word
7091 % in the matter by installing the (default) APS code
7092 % later on (see Section~\ref{sec:aps-defaults}).
7093 % \end{macro}
7094 %
7095 % \begin{macro}{\authoryear@sw}
7096 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
7097 % Numerical citations: default value of \cmd\authoryear@sw\ is false.
7098 % \begin{macrocode}
7099 \@booleanfalse\authoryear@sw
7100 % \end{macrocode}
7101 % \end{macro}
7102 %
7103 % \begin{macro}{\bibpunct}
7104 % The following commands effectively establish the style in which \cmd\cite\ commands are
7105 % formatted.
7106 % You can think of them as the second needed component for the bibliography.
7107 %
7108 % Set up for APS numerical citations (once the packages are loaded).
7109 % The journal substyle can override these choices.
7110 %
7111 % Note that, prior to \classname{natbib} version 8.21, changing \cmd\NAT@sort\ at this late hour would not be totally effective;
7112 % you would have to give \classname{natbib} the relevant options at load time.
7113 % From version 8.21 on, \cmd\NAT@sort\ and \cmd\NAT@cmprs\ are not bound at all.
7114 % \changes{4.1a}{2008/01/19}{For natbib versions before 8.21, \cs{NAT@sort} was consulted only as natbib was being read in. Now it is fully dynamic.}
7115 % \begin{macrocode}
7116 \appdef\setup@hook{%
7117 \bibpunct{[}{]}{,}{n}{}{,}%
7118 }%
7119 % \end{macrocode}
7120 % \end{macro}
7121 %
7122 % \begin{macro}{\pre@bibdata}
7123 %
7124 % Set up to write endnotes to a .bib file; its data will be incorporated into the bibliography.
7125 % \begin{macrocode}
7126 \def\pre@bibdata{\jobname\bibdata@app}%
7127 % \end{macrocode}
7128 % \end{macro}
7129 %
7130 % \begin{macro}{\bibsection}
7131 % We define the sectioning command to use when starting the bibliography.
7132 %
7133 % \changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
7134 % \begin{macrocode}
7135 \appdef\setup@hook{%
7136 \def\bibsection{%
7137 \par
7138 \onecolumngrid@push
7139 \begingroup
7140 \baselineskip26\p@
7141 \bib@device{\textwidth}{245.5\p@}%
7142 \endgroup
7143 \nobreak\@nobreaktrue
7144 \addvspace{19\p@}%
7145 \par
7146 \onecolumngrid@pop
7147 }%
7148 }%
7149 % \end{macrocode}
7150 % \end{macro}
7151 %
7152 % \begin{macro}{\bib@device}
7153 % \begin{macro}{\bibpreamble}
7154 % \begin{macro}{\bibsep}
7155 % \begin{macro}{\newblock}
7156 % We define the sectioning command to use when starting the bibliography.
7157 % \begin{macrocode}
7158 \def\bib@device#1#2{%
7159 \hb@xt@\z@{%
7160 \hb@xt@#1{%
7161 \hfil
7162 \phantomsection
7163 \addcontentsline {toc}{section}{\protect\numberline{}\refname}%
7164 % \hyper@anchorstart {\@currentHref }%
7165 \hb@xt@#2{%
7166 \skip@\z@\@plus-1fil\relax
7167 \leaders\hrule height.25 \p@ depth.25 \p@ \hskip\z@\@plus1fil
7168 \hskip\skip@
7169 \hskip\z@\@plus0.125fil\leaders\hrule height.375\p@ depth.375\p@ \hskip\z@\@plus0.75fil \hskip\z@\@plus0.125fil
7170 \hskip\skip@
7171 \hskip\z@\@plus0.25 fil\leaders\hrule height.5 \p@ depth.5 \p@ \hskip\z@\@plus0.5 fil \hskip\z@\@plus0.25 fil
7172 \hskip\skip@
7173 \hskip\z@\@plus0.375fil\leaders\hrule height.625\p@ depth.625\p@ \hskip\z@\@plus0.25fil \hskip\z@\@plus0.375fil
7174 % \hskip\skip@
7175 % \hfil
7176 }%
7177 % \hyper@anchorend
7178 \hfil
7179 }%
7180 \hss
7181 }%
7182 }%
7183 \appdef\setup@hook{%
7184 \let\bibpreamble\@empty
7185 \bibsep\z@\relax
7186 \def\newblock{\ }%
7187 }%
7188 % \end{macrocode}
7189 % \end{macro}
7190 % \end{macro}
7191 % \end{macro}
7192 % \end{macro}
7193 %
7194 % \begin{macro}{\bibfont}
7195 % We define the font switch that applies to the body of the bibliography.
7196 %
7197 % \begin{macrocode}
7198 \appdef\setup@hook{%
7199 \def\bibfont{%
7200 \small
7201 \@clubpenalty\clubpenalty
7202 }%
7203 }%
7204 % \end{macrocode}
7205 % \end{macro}
7206 %
7207 %
7208 % \subsubsection{Index}%
7209 % FIXME: the following call to \cmd\twocolumn\ appears wrong if we were in two-column grid.
7210 % \changes{4.0c}{1999/11/13}{grid changes with ltxgrid}
7211 % \changes{4.0rc1}{2001/06/18}{grid changes with push and pop}
7212 % \begin{macrocode}
7213 \newenvironment{theindex}{%
7214 \columnseprule \z@
7215 \columnsep 35\p@
7216 \c@secnumdepth-\maxdimen
7217 \onecolumngrid@push
7218 \section{\indexname}%
7219 \thispagestyle{plain}%
7220 \parindent\z@
7221 \parskip\z@ plus.3\p@\relax
7222 \let\item\@idxitem
7223 \onecolumngrid@pop
7224 }{%
7225 %\onecolumngrid@pop
7226 }%
7227 %
7228 \def\@idxitem{\par\hangindent 40\p@}%
7229 %
7230 \def\subitem{\par\hangindent 40\p@ \hspace*{20\p@}}%
7231 %
7232 \def\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}}%
7233 %
7234 \def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax}%
7235 % \end{macrocode}
7236 %
7237 %
7238 % \subsection{Journal- and Pointsize-Specific Code}%
7239 %
7240 % After this substyle is read in, we will execute the code specific to the selected
7241 % journal: execute the society/journal \file{.rtx} file if it exists, or
7242 % execute the society/journal macro (if the latter is not defined, it will \cmd\relax\ out).
7243 % Here we define the default journal.
7244 % \begin{macrocode}
7245 \def\@journal@default{pra}%
7246 % \end{macrocode}
7247 %
7248 % \subsection{Typesize-Specific Code}%
7249 %
7250 % After this society file is read in, we will process the \cmd\@pointsize-specific
7251 % code. Here we define the default.
7252 % \begin{macrocode}
7253 \def\@pointsize@default{10}%
7254 % \end{macrocode}
7255 %
7256 % Note: the convention in \revtex\ and its substyles is that
7257 % the substyle must not override any explicit class options
7258 % declared by the document.
7259 % This means that the various Booleans of Section~\ref{sec:options}
7260 % may be assigned here only if they are still undefined at this point.
7261 %
7262 % For the APS, we supply code specific to journals PRA, PRB, PRC, PRD, PRE, PRL, PRX, PRAPPLIED, PRMATERIALS, PRFLUIDS, PRAB (was PRSTAB), PRPER (was PRSTPER), and RMP.
7263 % At present, they are identical,
7264 % with the exception of PRL and RMP.
7265 % We also introduce a new generic physrev style now that all of the Phys. Rev. journals
7266 % are identical
7267 % In 4.2, we make the inclusion of titles in the bibliography the default
7268 %
7269 % For most all of the APS journals, the journal-dependent
7270 % code is relatively meager and is therefore embedded in this file.
7271 % However, the RMP code is sufficiently extensive that
7272 % splitting it out into a separate file is more convenient.
7273 %
7274 % \subsubsection{\classoption{pra}}%
7275 % There is no code specific to \classoption{pra}.
7276 % \begin{macrocode}
7277 \def\rtx@apspra{%
7278 \class@info{APS journal PRA selected}%
7279 }%
7280 % \end{macrocode}
7281 %
7282 % \subsubsection{\classoption{prb}}%
7283 % There is no code specific to \classoption{prb}.
7284 % \begin{macrocode}
7285 \def\rtx@apsprb{%
7286 \class@info{APS journal PRB selected}%
7287 }%
7288 % \end{macrocode}
7289 %
7290 % \subsubsection{\classoption{prc}}%
7291 % There is no code specific to \classoption{prc}.
7292 % \begin{macrocode}
7293 \def\rtx@apsprc{%
7294 \class@info{APS journal PRC selected}%
7295 }%
7296 % \end{macrocode}
7297 %
7298 % \subsubsection{\classoption{prd}}%
7299 % There is no code specific to \classoption{prd}.
7300 % \begin{macrocode}
7301 \def\rtx@apsprd{%
7302 \class@info{APS journal PRD selected}%
7303 }%
7304 % \end{macrocode}
7305 %
7306 % \subsubsection{\classoption{pre}}%
7307 % There is no code specific to \classoption{pre}.
7308 % \begin{macrocode}
7309 \def\rtx@apspre{%
7310 \class@info{APS journal PRE selected}%
7311 }%
7312 % \end{macrocode}
7313 %
7314 % \subsubsection{\classoption{prl}}%
7315 % \begin{macrocode}
7316 \def\rtx@apsprl{%
7317 \class@info{APS journal PRL selected}%
7318 % \end{macrocode}
7319 % In PRL, the default is the \classoption{bibnotes} option,
7320 % and the Acknowledgments section has no head.
7321 %
7322 % The References head is a device that may be described as a lozenge centered on the baseline,
7323 % 71 points wide by 2 points thick, with the ends tapering to a half point in thickness.
7324 % Space above 26 points base to base, below 31 base to base.
7325 %FIXME: this code may confound \classname{geometry}
7326 % \begin{macrocode}
7327 \let\frontmatter@footnote@produce\frontmatter@footnote@produce@endnote
7328 \@booleanfalse\acknowledgments@sw
7329 \appdef\setup@hook{%
7330 \def\bibsection{%
7331 \par
7332 \begingroup
7333 \baselineskip26\p@
7334 \bib@device{\hsize}{72\p@}%
7335 \endgroup
7336 \nobreak\@nobreaktrue
7337 \addvspace{19\p@}%
7338 }%
7339 }%
7340 % \end{macrocode}
7341 % Implement length checking.
7342 % Use the \classname{times} and \classname{mathtime} packages,
7343 % plus whatever other processing is required
7344 % to make the formatted output be true
7345 % to the metrics of the journal.
7346 %
7347 % \begin{macrocode}
7348 \appdef\setup@hook{%
7349 \lengthcheck@sw{%
7350 \RequirePackage{times}%
7351 % \end{macrocode}
7352 % Wait. Do not use mathtime after all. APS has their own way of doing math pi, involving
7353 % Adobe Mathematical Pi and other fonts.
7354 % \begin{verbatim}
7355 % \RequirePackage{mathtime}%
7356 % \end{verbatim}
7357 % \begin{macrocode}
7358 }{}%
7359 }%
7360 % \end{macrocode}
7361 % A PRL does not have numbered sections.
7362 % \begin{macrocode}
7363 \c@secnumdepth=-\maxdimen
7364 % \end{macrocode}
7365 % Note: we defer this code until after type size file is read in.
7366 % \begin{macrocode}
7367 \appdef\setup@hook{%
7368 \@ifnum{\@pointsize=10\relax}{%
7369 \lengthcheck@sw{%
7370 \def\large{%
7371 \@setfontsize\large{12.5}{14\p@}%
7372 }%
7373 \def\normalsize{%
7374 \@setfontsize\normalsize{10.5}\@xiipt
7375 \abovedisplayskip 6\p@ \@plus6\p@ \@minus5\p@
7376 \belowdisplayskip \abovedisplayskip
7377 \abovedisplayshortskip \abovedisplayskip
7378 \belowdisplayshortskip \abovedisplayskip
7379 \let\@listi\@listI
7380 }%
7381 \def\small{%
7382 \@setfontsize\small{9.5}\@xipt
7383 \abovedisplayskip 5\p@ \@plus5\p@ \@minus4\p@
7384 \belowdisplayskip \abovedisplayskip
7385 \abovedisplayshortskip \abovedisplayskip
7386 \belowdisplayshortskip \abovedisplayskip
7387 \let\@listi\@listI
7388 }%
7389 \DeclareMathSizes{12.5}{12.5}{9}{6}%
7390 \DeclareMathSizes{10.5}{10.5}{7.5}{5}%
7391 \DeclareMathSizes{9.5}{9.5}{7.0}{5}%
7392 }{%
7393 \def\normalsize{%
7394 \@setfontsize\normalsize\@xpt\@xiipt
7395 \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
7396 \belowdisplayskip \abovedisplayskip
7397 \abovedisplayshortskip \abovedisplayskip
7398 \belowdisplayshortskip \abovedisplayskip
7399 \let\@listi\@listI
7400 }%
7401 }%
7402 }{}%
7403 }%
7404 \textheight = 694.0\p@
7405 % \end{macrocode}
7406 %
7407 % End of \classoption{prl} code.
7408 % \begin{macrocode}
7409 }%
7410 % \end{macrocode}
7411 %
7412 % \subsubsection{\classoption{prper}}%
7413 % There is no code specific to \classoption{prper}
7414 % \begin{macrocode}
7415 \def\rtx@apsprper{%
7416 \class@info{APS journal PRPER selected}%
7417 }%
7418 % \end{macrocode}
7419 %
7420 % \subsubsection{\classoption{prab}}%
7421 % There is no code specific to \classoption{prab}.
7422 % \begin{macrocode}
7423 \def\rtx@apsprab{%
7424 \class@info{APS journal PRAB selected}%
7425 }%
7426 % \end{macrocode}
7427 %
7428 % \subsubsection{\classoption{prx}}%
7429 % There is no code specific to \classoption{prx}.
7430 % \begin{macrocode}
7431 \def\rtx@apsprx{%
7432 \class@info{APS journal PRX selected}%
7433 }%
7434 % \end{macrocode}
7435 %
7436 % \subsubsection{\classoption{prapplied}}%
7437 % There is no code specific to \classoption{prapplied}.
7438 % \begin{macrocode}
7439 \def\rtx@apsprapplied{%
7440 \class@info{APS journal PRApplied selected}%
7441 }%
7442 % \end{macrocode}
7443 %
7444 % \subsubsection{\classoption{prmaterials}}%
7445 % There is no code specific to \classoption{prmaterials}.
7446 % \begin{macrocode}
7447 \def\rtx@apsprmaterials{%
7448 \class@info{APS journal PRMaterials selected}%
7449 }%
7450 % \end{macrocode}
7451 %
7452 % \subsubsection{\classoption{prfluids}}%
7453 % PRFluids uses a one-column format for journal format, but if authors want this, they should use the onecolumn option and not the reprint option.
7454 % Parsing of documentclass options is rather involved and hard to control precisely enough to have the correct behavior using the reprint option.
7455 % \begin{macrocode}
7456 \def\rtx@apsprfluids{%
7457 \class@info{APS journal PRFluids selected}%
7458 \@booleanfalse\titlepage@sw
7459 }%
7460 % \end{macrocode}
7461 %
7462 % \subsubsection{\classoption{physrev}}%
7463 % There is no code specific to \classoption{physrev}.
7464 % \begin{macrocode}
7465 \def\rtx@apsphysrev{%
7466 \class@info{APS unified Physical Review journal style selected}%
7467 % \begin{macrocode}
7468 }%
7469 % \end{macrocode}
7470 %
7471 % \subsubsection{\classoption{rmp}}%
7472 % If this option has been selected, we will read in the needed code from the file \file{apsrmp.rtx}.
7473 %
7474 % \subsection{Establish APS Defaults}\label{sec:aps-defaults}
7475 %
7476 % \begin{macro}{\footinbib@sw}
7477 % All APS journals except RMP effectively invoke the \classoption{footinbib} option.
7478 % We rely on the RMP-specific code to override this assignment.
7479 % \begin{macrocode}
7480 \@booleantrue\footinbib@sw
7481 % \end{macrocode}
7482 % \end{macro}
7483 %
7484 % \begin{macro}{\@bibdataout@init}
7485 % \begin{macro}{\@bibdataout@aps}
7486 % \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
7487 % Procedure \cmd\@bibdataout@aps\ has the job of writing the control record into the
7488 % job's \cmd\jobname\filename{.bib} file, where it will adjust the options to \filename{.bst} processing.
7489 % It is installed into the initialization procedure \cmd\@bibdataout@init, and its meaning
7490 % is set by the society (APS) and journal.
7491 % For all but RMP, we select the Physical Review style.
7492 % For the latter case, we change the meaning, per the code in \file{apsrmp.rtx}.
7493 %
7494 % \begin{macrocode}
7495 \appdef\@bibdataout@rev{\@bibdataout@aps}%
7496 \def\@bibdataout@aps{%
7497 \immediate\write\@bibdataout{%
7498 % \end{macrocode}
7499 % An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
7500 % \begin{macrocode}
7501 @CONTROL{%
7502 apsrev42Control%
7503 % \end{macrocode}
7504 % Say whether we want long bibliography style (the default), or the abbreviated style.
7505 % \changes{4.2b}{2017/11/22}{(MD) MD - not sure why these parameters were different previously. Made them match except for title.}%
7506 % Use binary flags on control.* flags in bst file to set appropriate parameters
7507 % author = 08 corresponds to initials, jrnlst
7508 % editor = 1 corresponds to format identical to authors
7509 % title = 0 means to include title in journal references if present; title ="" means omit the title even if present (this should be the only difference between long and short bib styles)
7510 % year = 1 corresponds to truncate
7511 % page = 0 corresponds to using single page number rather than a range
7512 % \begin{macrocode}
7513 \longbibliography@sw{%
7514 ,author="08",editor="1",pages="0",title="0",year="1"%
7515 }{%
7516 ,author="08",editor="1",pages="0",title="",year="1"%
7517 }%
7518 }%
7519 }%
7520 % \end{macrocode}
7521 % Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
7522 % \begin{macrocode}
7523 \if@filesw
7524 \immediate\write\@auxout{\string\citation{apsrev42Control}}%
7525 \fi
7526 }%
7527 % \end{macrocode}
7528 % \end{macro}
7529 % \end{macro}
7530 %
7531 % \begin{macro}{\place@bibnumber}
7532 % \begin{macro}{\@bibstyle}
7533 % We install code that will select the presentation for \cmd\bibitem s
7534 % and govern the \BibTeX\ processing.
7535 % \begin{macrocode}
7536 \let\place@bibnumber\place@bibnumber@inl
7537 \def\@bibstyle{apsrev\substyle@post}%
7538 % \end{macrocode}
7539 % \begin{verbatim}
7540 %\appdef\setup@hook{%
7541 % \longbibliography@sw{%
7542 % \appdef\@bibstyle{long}%
7543 % }{}%
7544 %}%
7545 % \end{verbatim}
7546 % \end{macro}
7547 % \end{macro}
7548 %
7549 % \subsection{APS Sanity Checking}\label{sec:aps-sanity}
7550 % \changes{4.1f}{2009/07/20}{(AO, 524) Makes no sense if citations are superscript numbers and so are footnotes}
7551 %
7552 % Rule: if \cmd\place@bibnumber\ is \cmd\place@bibnumber@sup\
7553 % (citations are numbered and set superscript),
7554 % then it makes no sense for \cmd\footinbib@sw\ to be \cmd\false@sw\
7555 % (footnotes set in the bibliography, as endnotes).
7556 % If both conditions prevailed, then the document would have footnotes
7557 % and citations both as superscript arabic numbers, but independently numbered,
7558 % which would be confusing.
7559 %
7560 % Any society that provides for both superscript numbered citations as well as for
7561 % numbered footnotes should check for this same condition, and deal with it.
7562 %
7563 % Note: an alternative would be for footnotes to use the same sequence of footnote devices
7564 % that are used by the frontmatter footnotes
7565 % (\cmd\frontmatter@thefootnote\ instead of arabic numbers).
7566 %
7567 % In this case, we would want to refrain from resetting \cmd\c@footnote\ at the end of
7568 % the title page formatting.
7569 % We would also want to treat body footnotes identically to frontmatter footnotes:
7570 % the assignments in \cmd\titleblock@produce\ would persist throughout the document.
7571 %
7572 % But APS do not choose to go that route.
7573 % \begin{macrocode}
7574 \appdef\setup@hook{%
7575 \@ifx{\place@bibnumber\place@bibnumber@sup}{%
7576 \footinbib@sw{}{%
7577 \class@warn{Citations are superscript numbers: footnotes must be endnotes; changing to that configuration}%
7578 \@booleantrue\footinbib@sw
7579 }%
7580 }{}%
7581 }%
7582 % \end{macrocode}
7583 %
7584 % Here ends the substyle for society APS.
7585 % \begin{macrocode}
7586 %</aps>
7587 % \end{macrocode}
7588 %
7589 %
7590 % \section{The \classoption{rmp} journal substyle: the \texttt{rmp} module}
7591 %
7592 % The file \file{apsrmp.rtx} is read in by the \classname{revtex4} document class
7593 % if \cmd\@society\ has the value \classoption{aps}
7594 % and \cmd\@journal\ has the value \classoption{rmp}.
7595 %
7596 % It is read at the end of the \file{aps.rtx}, so all definitions
7597 % and assignments in that file are operative unless overridden here.
7598 %
7599 %
7600 % \begin{macrocode}
7601 %<*rmp>
7602 % \end{macrocode}
7603 %
7604 % Protect this file from being read in by anything but \revtex.
7605 % \begin{macrocode}
7606 \ifx\undefined\substyle@ext
7607 \def\@tempa{%
7608 \endinput
7609 \GenericWarning{I must be read in by REVTeX! (Bailing out)}%
7610 }%
7611 \expandafter\else
7612 \def\@tempa{}%
7613 \expandafter\fi\@tempa
7614 % \end{macrocode}
7615 %
7616 % Protect this file from being read in as a society instead of a journal.
7617 % In such a case, \cmd\@journal\ will be undefined.
7618 % \begin{macrocode}
7619 \@ifxundefined\@journal{%
7620 % \end{macrocode}
7621 % One alternative: abort the document.
7622 % Another alternative: try to recover: force load the aps society file
7623 % \begin{macrocode}
7624 \class@warn{Please specify the REVTeX options [aps,rmp]!}%
7625 \@@end
7626 }{}%
7627 % \end{macrocode}
7628 % Log the journal substyle.
7629 % \begin{macrocode}
7630 \class@info{APS journal RMP selected}%
7631 % \end{macrocode}
7632 %
7633 % \subsection{Frontmatter}%
7634 %
7635 % We assign the titlepage style for RMP; a document instance
7636 % may override by invoking one of the class options of \revtex.
7637 % \begin{macrocode}
7638 \clo@groupedaddress
7639 % \end{macrocode}
7640 %
7641 % \begin{macro}{\frontmatter@setup}
7642 %
7643 % \begin{macrocode}
7644 \def\frontmatter@setup{%
7645 \normalfont\sffamily\raggedright
7646 }%
7647 % \end{macrocode}
7648 % \end{macro}
7649 %
7650 % \begin{macro}{\PACS@warn}
7651 % Per Mark Doyle, RMP never displays the PACS, so they don't want the `use showpacs' warning spit out.
7652 %\changes{4.2b}{2017/11/22}{(MD) PACS are obsolete altogether now}%
7653 % \begin{macrocode}
7654 \def\PACS@warn{RMP documents do not display PACS and PACS are obsolete. Your \string\pacs\space will be ignored}%
7655 % \end{macrocode}
7656 % \end{macro}
7657 %
7658 % \begin{macro}{\frontmatter@title@above}
7659 % \begin{macro}{\frontmatter@title@format}
7660 % \begin{macro}{\frontmatter@title@below}
7661 %
7662 % \begin{macrocode}
7663 \def\frontmatter@title@above{}%
7664 \def\frontmatter@title@format{\Large\bfseries\raggedright}% HelveticaNeue-Medium(Italic) 14pt.
7665 \def\frontmatter@title@below{\addvspace{12\p@}}% 24pt b-b down to first author
7666 % \end{macrocode}
7667 % \end{macro}
7668 % \end{macro}
7669 % \end{macro}
7670 %
7671 % \begin{macro}{\frontmatter@authorformat}
7672 % \changes{4.1b}{2008/08/04}{Rag the right even more: .8\cs{hsize}. Also, assign \cs{@totalleftmargin}.}%
7673 % \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
7674 % Set the rag to a milder value, because we want to do true ragged right
7675 % typesetting, as opposed to the \LaTeX\ default, which gives very poor results.
7676 %
7677 % Note: author font is 9.8bp. 19.2bp/14.3bp above/below.
7678 % \begin{macrocode}
7679 \def\frontmatter@authorformat{%
7680 \preprintsty@sw{\vskip0.5pc\relax}{}%
7681 \@tempskipa\@flushglue
7682 \@flushglue\z@ plus.8\hsize
7683 \raggedright\advance\leftskip.5in\relax
7684 \@flushglue\@tempskipa
7685 \parskip\z@skip
7686 \@totalleftmargin\leftskip
7687 }%
7688 % \end{macrocode}
7689 % \end{macro}
7690 %
7691 % \begin{macro}{\frontmatter@affiliationfont}
7692 % \changes{4.1b}{2008/08/04}{As with author formatting, rag the right more, and assign \cs{@totalleftmargin}. Also neutralize \cs{def@after@address}.}%
7693 % \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
7694 % The hook \cmd\frontmatter@affiliationfont\ controls the formatting of affiliations and affiliation groups.
7695 % The hook \cmd\frontmatter@above@affilgroup\ is invoked just before proceeding with author/affiliation processing.
7696 % The \cmd\frontmatter@above@affiliation\ is the amount of space above affiliations in the \classoption{groupedaddress} style,
7697 % and \cmd\frontmatter@above@affiliation@script\ is that for \classoption{superscriptaddress}.
7698 %
7699 % Note: affiliation font is 9.03/10.4bp, 14.3bp/19.2bp b-b above/below
7700 % \begin{macrocode}
7701 \def\frontmatter@affiliationfont{% Helvetica 9/10.2
7702 \small\slshape\selectfont\baselineskip10.5\p@\relax
7703 \@tempskipa\@flushglue
7704 \@flushglue\z@ plus.8\hsize
7705 \raggedright\advance\leftskip.5in\relax
7706 \@flushglue\@tempskipa
7707 \@totalleftmargin\leftskip
7708 \let\def@after@address\def@after@address@empty
7709 }%
7710 \def\frontmatter@above@affilgroup{\addvspace{7.2\p@}}% additional leading above an author
7711 \def\frontmatter@above@affiliation{\addvspace{5.3\p@}}%
7712 \def\frontmatter@above@affiliation@script{}%
7713 % \end{macrocode}
7714 % \end{macro}
7715 %
7716 % Set up the default RMP style for title block authors and affiliations.
7717 % We assign the titlepage style for RMP; a document instance
7718 % may override by invoking one of the class options of \revtex.
7719 % \changes{4.1b}{2008/08/04}{The \texttt{rmp} journal substyle selects \texttt{groupedaddress} by default.}%
7720 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
7721 %
7722 % This command should override the effect of the
7723 % corresponding command in the society substyle,
7724 % and any document class option bearing on same will in turn override.
7725 % \begin{macrocode}
7726 \clo@groupedaddress
7727 % \end{macrocode}
7728 %
7729 % \begin{macro}{\frontmatter@RRAP@format}
7730 % \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
7731 % Note: in RMP, if we are not in preprint mode, the date will not be produced.
7732 %
7733 % Note: Helvetica C/lc, 8.98bp, space above: 16.3bp b-b.
7734 % \begin{macrocode}
7735 \def\frontmatter@RRAP@format{%
7736 \addvspace{7.3\p@}%
7737 \small
7738 \raggedright\advance\leftskip.5in\relax
7739 \@totalleftmargin\leftskip
7740 }%
7741 \def\produce@RRAP#1{%
7742 \@if@empty{#1}{}{%
7743 \@ifvmode{\leavevmode}{}%
7744 \unskip(\ignorespaces#1\unskip)\quad
7745 }%
7746 }%
7747 % \end{macrocode}
7748 % \end{macro}
7749 %
7750 % \begin{macro}{\frontmatter@abstractheading}
7751 % Space above 21.8bp b-b.
7752 % \begin{macrocode}
7753 \def\frontmatter@abstractheading{%
7754 \preprintsty@sw{%
7755 \begingroup
7756 \centering\large
7757 \abstractname
7758 \par
7759 \endgroup
7760 \vspace{.5pc}%
7761 }{}%
7762 }%
7763 % \end{macrocode}
7764 % \end{macro}
7765 %
7766 % \begin{macro}{\frontmatter@abstractfont}
7767 % TimesTen 8.93bp/9.6bp X 360bp, indented 36bp, with 21.9/37.6bp b-b above/below
7768 % \changes{4.1b}{2008/06/29}{(AO, 455) Be nice to a list within the abstract (assign \cs{@totalleftmargin}).}
7769 % \begin{macrocode}
7770 \def\frontmatter@abstractfont{%
7771 \footnotesize
7772 \hsize360\p@
7773 \leftskip=0.5in
7774 \parindent\z@
7775 \@totalleftmargin\leftskip
7776 }%
7777 % \end{macrocode}
7778 % \end{macro}
7779 %
7780 % \begin{macro}{\frontmatter@preabstractspace}
7781 % \begin{macro}{\frontmatter@postabstractspace}
7782 % Space above and space below abstract in title block.
7783 % Should be 22/36 points base-to-base.
7784 % \begin{macrocode}
7785 \def\frontmatter@preabstractspace{7.7\p@}%
7786 \def\frontmatter@postabstractspace{24.6\p@}%
7787 % \end{macrocode}
7788 % \end{macro}
7789 % \end{macro}
7790 %
7791 % FIXME: Not done: PACS.
7792 % FIXME: TOC: Head is same as \section: HelveticaNeue 8.98. 32/22bp b-b above/below,
7793 % Body: TimesTen 8/10.5.
7794 %
7795 % \subsection{General Text}%
7796 %
7797 % \changes{4.1b}{2008/07/01}{(AO) make settings at class time instead of deferring them to later.}
7798 % If not in preprint mode, RMP sets the type size to 10/12 point. Note: s/b 11.6bp leading
7799 %FIXME: define \cmd\normalsize\ only if nobody else has done so.
7800 % \begin{macrocode}
7801 \appdef\setup@hook{%
7802 \preprintsty@sw{}{%
7803 \def\normalsize{%
7804 \@setsize\normalsize{12pt}\xpt\@xpt
7805 \abovedisplayskip 10\p@ plus2\p@ minus5\p@
7806 \belowdisplayskip \abovedisplayskip
7807 \abovedisplayshortskip \abovedisplayskip
7808 \belowdisplayshortskip \abovedisplayskip
7809 \let\@listi\@listI
7810 }%
7811 }%
7812 }%
7813 % \end{macrocode}
7814 %
7815 % Footnote mods:
7816 % \changes{4.1n}{2010/01/02}{(AO, 571) class file must set \cs{splittopskip}; fine tune \cs{skip}\cs{footins}; \cs{footnoterule} defined in terms of \cs{skip}\cs{footins}}%
7817 % \begin{macrocode}
7818 \footnotesep 9.25pt
7819 \skip\footins 36pt plus 4pt minus 12pt
7820 \def\footnoterule{%
7821 \dimen@\skip\footins\divide\dimen@\thr@@
7822 \kern-\dimen@\hrule width.5in\kern\dimen@
7823 }%
7824 % \end{macrocode}
7825 %
7826 %
7827 % \subsection{Sectioning}
7828 % \changes{4.1b}{2008/08/04}{Use \cs{setup@hook} to initialize all.}
7829 % \changes{4.1b}{2008/08/01}{Section numbering via procedures \cs{secnums@rtx} and \cs{secnums@arabic}.}
7830 %
7831 % We override the meaning of \cmd\secnums@rtx.
7832 % The class option \classoption{secnumarabic} will continue to work.
7833 % \begin{macrocode}
7834 \def\secnums@rtx{%
7835 \@ifxundefined\thepart{%
7836 \def\thepart{\Roman{part}}%
7837 }{}%
7838 \@ifxundefined\thesection{%
7839 \def\thesection {\Roman{section}}%
7840 \def\p@section {}%
7841 }{}%
7842 \@ifxundefined\thesubsection{%
7843 \def\thesubsection {\Alph{subsection}}%
7844 \def\p@subsection {\thesection.}%
7845 }{}%
7846 \@ifxundefined\thesubsubsection{%
7847 \def\thesubsubsection {\arabic{subsubsection}}%
7848 \def\p@subsubsection {\thesection.\thesubsection.}%
7849 }{}%
7850 \@ifxundefined\theparagraph{%
7851 \def\theparagraph {\alph{paragraph}}%
7852 \def\p@paragraph {\thesection.\thesubsection.\thesubsubsection.}%
7853 }{}%
7854 \@ifxundefined\thesubparagraph{%
7855 \def\thesubparagraph {\arabic{subparagraph}}%
7856 \def\p@subparagraph {\thesection.\thesubsection.\thesubsubsection.\theparagraph.}%
7857 }{}%
7858 }%
7859 % \end{macrocode}
7860 %
7861 % In RMP, put a period (.), followed by `nut space', after the section number.
7862 % Also, hang the section number (the \LaTeX\ default).
7863 % \begin{macrocode}
7864 \def\@seccntformat#1{\csname the#1\endcsname.\hskip0.5em\relax}%
7865 % \end{macrocode}
7866 %
7867 % Note that we wish to set the section head uppercase, so we use
7868 % David Carlisle's \cmd\MakeTextUppercase. However, because this procedure effectively
7869 % parses its argument (looking for things to \emph{not} translate), it has to be invoked
7870 % in such a way that the argument of the \cmd\section\ command is passed to it as its
7871 % own argument.
7872 %
7873 % To accomplish this, we use the \cmd\@hangfrom@\ hook, which was developed for this
7874 % purpose.
7875 % \changes{4.1b}{2008/07/01}{Add \cs{@hangfroms@section}}
7876 % \begin{macrocode}
7877 \def\section{%
7878 \@startsection{section}{1}{\z@}{0.8cm plus1ex minus.2ex}{0.4cm}%
7879 {%
7880 \small\sffamily\bfseries\selectfont
7881 \raggedright
7882 \parindent\z@
7883 }%
7884 }%
7885 \def\@hangfrom@section#1#2#3{\@hangfrom{#1#2}\MakeTextUppercase{#3}}%
7886 \def\@hangfroms@section#1#2{#1\MakeTextUppercase{#2}}%
7887 \def\subsection{%
7888 \@startsection{subsection}{2}{\z@}{0.8cm plus1ex minus.2ex}{0.4cm}%
7889 {%
7890 \small\sffamily\bfseries
7891 \raggedright
7892 \parindent\z@
7893 }%
7894 }%
7895 \def\subsubsection{%
7896 \@startsection{subsubsection}{3}{\z@}{.8cm plus1ex minus.2ex}{0.4cm}%
7897 {%
7898 \small\sffamily\selectfont
7899 \raggedright
7900 \parindent\z@
7901 }%
7902 }%
7903 \def\paragraph{%
7904 \@startsection{paragraph}{4}{\z@}{.8cm plus1ex minus.2ex}{-1em}%
7905 {%
7906 \small\slshape\selectfont
7907 \raggedright
7908 \parindent\z@
7909 }%
7910 }%
7911 \def\subparagraph{%
7912 \@startsection{subparagraph}{4}{\parindent}{3.25ex plus1ex minus.2ex}{-1em}%
7913 {\normalsize\bfseries\selectfont}%
7914 }%
7915 %
7916 \setcounter{tocdepth}{4}% FIXME: has no effect
7917 % \end{macrocode}
7918 %
7919 % \begin{macro}{\appendix}
7920 % \begin{macro}{\@hangfrom@appendix}
7921 % \begin{macro}{\@hangfroms@appendix}
7922 % \begin{macro}{\@appendixcntformat}
7923 % \changes{4.1b}{2008/07/01}{Add \cs{@hangfroms@section}}
7924 % \begin{macrocode}
7925 \appdef\appendix{%
7926 \let\@hangfrom@section\@hangfrom@appendix
7927 \let\@sectioncntformat\@appendixcntformat
7928 }%
7929 \def\@hangfrom@appendix#1#2#3{%
7930 #1%
7931 \@if@empty{#2}{%
7932 #3%
7933 }{%
7934 #2\@if@empty{#3}{}{:\ #3}%
7935 }%
7936 }%
7937 \def\@hangfroms@appendix#1#2{%
7938 #1\appendixname\@if@empty{#2}{}{:\ #2}%
7939 }%
7940 \def\@appendixcntformat#1{\appendixname\ \csname the#1\endcsname}%
7941 % \end{macrocode}
7942 % \end{macro}
7943 % \end{macro}
7944 % \end{macro}
7945 % \end{macro}
7946 %
7947 %
7948 % \subsection{Figure and Table Caption Formatting}
7949 % \begin{macro}{\@makecaption}
7950 % \changes{4.1b}{2008/07/01}{Break out \cs{@caption@fignum@sep}}
7951 %
7952 % \begin{macrocode}
7953 \setlength\belowcaptionskip{2\p@}
7954 \long\def\@makecaption#1#2{%
7955 \vskip\abovecaptionskip
7956 \vbox{%
7957 \flushing
7958 \small\rmfamily
7959 \noindent
7960 #1\@caption@fignum@sep#2\par
7961 }%
7962 \vskip\belowcaptionskip
7963 }%
7964 \def\@caption@fignum@sep{\nobreak\hskip.5em plus.2em\ignorespaces}%
7965 % \end{macrocode}
7966 % \end{macro}
7967 %
7968 % \subsection{Citations and Bibliography}%
7969 %
7970 % Customize \revtex\ for the journal substyle;
7971 % this task requires three components:
7972 % a \BibTeX\ \file{.bst} style file,
7973 % customizing code for \file{natbib}, and
7974 % customizations of the \env{thebibliography} environment.
7975 %
7976 % \begin{macro}{\@bibstyle}
7977 % Define the argument of the \cmd\bibliographystyle\ command
7978 % (if the document does not do so).
7979 %
7980 % The user must have installed a \file{.bst} file of the corresponding name.
7981 % This file will then be used by \BibTeX\ when compiling the document's \file{.bbl} file.
7982 %
7983 % To generate \file{apsrmp.bst}, use \classname{custom-bib} version 3.89d1 or later.
7984 % Run the \file{.bst} generator, \file{makebst.tex}, with the following options:
7985 %
7986 % \def\QandA#1#2#3{\item#1: \textbf{#2}: \texttt{#3}---}%
7987 % \def\CandE#1{\item\relax\texttt{#1}---}%
7988 % \begin{enumerate}
7989 % \QandA{STYLE OF CITATIONS}{a}{ay}Author-year with some non-standard interface
7990 % \QandA{AUTHOR}{*}{nat}Natbib for use with natbib v5.3 or later
7991 % \QandA{LANGUAGE FIELD}{l}{lang}Use language field to switch hyphenation patterns for title
7992 % \QandA{PRESENTATIONS}{b}{pres,pres-bf}Presentation, speaker bold face
7993 % \QandA{ORDER ON VON PART }{x}{vonx}Sort without von part (de la Maire after Mahone)
7994 % \QandA{AUTHOR NAMES}{a}{nm-rev1}Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
7995 % \QandA{POSITION OF JUNIOR }{*}{jnrlst}Junior comes last as Smith, John, Jr.
7996 % \QandA{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES}{u}{nmft,nmft-def}User defined author font (\cmd\bibnamefont)
7997 % \QandA{FONT FOR FIRST NAMES }{u}{fnm-def}First names in user defined font (\cmd\bibfnamefont)
7998 % \QandA{EDITOR NAMES IN INCOLLECTION ETC}{a}{nmfted}Editors incollection like authors font
7999 % \QandA{FONT FOR `AND' IN LIST}{r}{nmand-rm}`And' in normal font (JONES and JAMES)
8000 % \QandA{FONT OF CITATION LABELS IN TEXT }{u}{lab,lab-def}User defined citation font (\cmd\citenamefont)
8001 % \QandA{FONT FOR `AND' IN CITATIONS }{r}{and-rm}Cited `and' in normal font
8002 % \QandA{LABEL WHEN AUTHORS MISSING }{*}{keyxyr}Year blank when KEY replaces missing author (for natbib 7.0)
8003 % \QandA{DATE POSITION}{b}{dt-beg}Date after authors
8004 % \QandA{DATE FORMAT }{m}{yr-com}Date preceded by comma as `, 1993'
8005 % \QandA{INCLUDE MONTHS}{m}{aymth}Include month in date
8006 % \QandA{REVERSED DATE }{r}{dtrev}Date as year month
8007 % \QandA{TRUNCATE YEAR }{*}{note-yr}Year text full as 1990--1993 or `in press'
8008 % \QandA{TITLE OF ARTICLE}{d}{tit-qq}Title and punctuation in double quotes (``Title,'' ..)
8009 % \QandA{TITLE PRESENT IN ARTICLE, INCOLLECTION, AND INPROCEEDINGS}{x}{jtit-x}Title is ignored
8010 % \QandA{INPROCEEDINGS CHAPTER AND PAGES, LIKE INBOOK}{y}{inproceedings-chapter}produce pages after chapter just as in InBook
8011 % \QandA{ARTICLE BOOKTITLE PRESENT}{?}{article-booktitle}format booktitle
8012 % \QandA{ARTICLE SERIES PRESENT}{?}{article-series}article can has series
8013 % \QandA{JOURNAL NAME FONT}{r}{jttl-rm}Journal name normal font
8014 % \QandA{JOURNAL NAME WITH ADDRESS}{y}{journal-address}Include address field (in parentheses) along with journal name
8015 % \QandA{BOOK TITLE FIELDS}{y}{book-bt}Field `booktitle', or if absent field `title', is book title
8016 % \QandA{THESIS TITLE OPTIONAL}{?}{thesis-title-o}Title is optional: no warning issued if empty
8017 % \QandA{TECHNICAL REPORT TITLE}{b}{trtit-b}Tech. report title like books
8018 % \QandA{JOURNAL VOLUME}{b}{vol-bf}Volume bold as {\bf vol}(num)
8019 % \QandA{JOURNAL VOL AND NUMBER}{s}{vnum-sp}Journal vol (num) as 34 (2)
8020 % \QandA{VOLUME PUNCTUATION}{c}{volp-com}Volume with comma as vol(num), ppp
8021 % \QandA{PAGE NUMBERS}{f}{jpg-1}Only start page number
8022 % \QandA{POSITION OF PAGES}{e}{pp-last}Pages at end but before any notes
8023 % \QandA{BOOK EDITOR W/O AUTHOR}{}{book-editor-booktitle}Book permits empty author, produces title before editor in this case
8024 % \QandA{INBOOK PERMITS TITLE, BOOKTITLE, AUTHOR, EDITOR}{a}{inbook-editor-booktitle}Allow using both title/booktitle, both author/editor
8025 % \QandA{CONFERENCE ADDRESS FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{a}{bookaddress}Italic booktitle followed by bookaddress in roman
8026 % \QandA{NUMBER AND SERIES FOR BOOK, INBOOK, INCOLLECTION, INPROCEEDINGS, PROCEEDINGS}{*}{num-xser}Allows number without series and suppresses word "number"
8027 % \QandA{WORD NUMBER CAPITALIZED FOR NUMBER AND SERIES}{c}{number-cap}Capitalize word `number' as: "Number 123"
8028 % \QandA{WORD CHAPTER CAPITALIZED}{c}{chapter-cap}Capitalize word `chapter' as: `Chapter 42'
8029 % \QandA{COMBINING NUMBER AND SERIES}{x}{series-number}Series number as: `Springer Lecture Notes No. 125'
8030 % \QandA{POSITION OF NUMBER AND SERIES}{b}{numser-booktitle}After book title and conference address, and before editors
8031 % \QandA{VOLUME AND SERIES FOR BOOKS}{s}{ser-vol}Series, vol. 23
8032 % \QandA{VOLUME AND SERIES FORMATTING}{y}{ser-rm}format series roman , even when used with volume
8033 % \QandA{WORD VOLUME CAPITALIZED FOR VOLUME AND SERIES}{y}{volume-cap}Capitalize word `volume', as: `Volume 7 in Lecture Series'
8034 % \QandA{POSITION OF VOLUME AND SERIES FOR INCOLLECTION, INBOOK, AND INPROCEEDINGS}{e}{ser-ed}Series and volume after booktitle and before editors
8035 % \QandA{JOURNAL NAME PUNCTUATION}{x}{jnm-x}Space after journal name
8036 % \QandA{PAGES IN BOOK}{*}{pg-bk,book-chapter-pages}As chapter and page: chapter 42, page 345
8037 % \QandA{PUBLISHER IN PARENTHESES}{p}{pub-par}Publisher in parentheses
8038 % \QandA{EMPTY PUBLISHER PARENTHESES}{y}{ay-empty-pub-parens-x}eliminate parentheses altogether if nothing inside
8039 % \QandA{PUBLISHER POSITION}{e}{pre-edn}Edition before publisher
8040 % \QandA{SCHOOL}{p}{school-par}school/address in parens: `(school, address)'
8041 % \QandA{ISBN NUMBER}{*}{isbn}Include ISBN for books, booklets, etc.
8042 % \QandA{ISSN NUMBER}{*}{issn}Include ISSN for periodicals
8043 % \QandA{DOI NUMBER}{a}{doi-link,doi}Doi forms a link to the publication, anchored to the volume or title
8044 % \QandA{`EDITOR' AFTER NAMES}{a}{bkedcap}`Name Editor,' as above, editor upper case
8045 % \QandA{EDITOR IN COLLECTIONS}{b}{edby}In booktitle, edited by .. (where .. is names)
8046 % \QandA{PUNCTUATION BETWEEN SECTIONS }{c}{blk-com}Comma between blocks
8047 % \QandA{FINAL PUNCTUATION}{c}{fin-endbibitem}Command at end instead of period
8048 % \QandA{ABBREVIATE WORD `PAGES' }{a}{pp}`Page' abbreviated as p. or pp.
8049 % \QandA{ABBREVIATE WORD `EDITORS'}{a}{ed}`Editor' abbreviated as ed. or eds.
8050 % \QandA{OTHER ABBREVIATIONS}{a}{abr}Abbreviations of such words
8051 % \QandA{ABBREVIATION FOR `EDITION' }{a}{ednx}`Edition' abbreviated as `ed'
8052 % \QandA{EDITION NUMBERS}{n}{ord}Numerical editions as 1st, 2nd, 3rd, etc
8053 % \QandA{STORED JOURNAL NAMES}{a}{jabr}Abbreviated journal names
8054 % \QandA{COMMA BEFORE `AND'}{c}{and-com}Comma even with 2 authors as `Tom, and Harry'
8055 % \QandA{FONT OF `ET AL'}{i}{etal-it}Italic et al
8056 % \QandA{ADDITIONAL REVTeX DATA FIELDS}{r}{revdata,eprint,url,url-blk,translation}Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
8057 % \QandA{SLACcitation FIELD}{?}{SLACcitation}Produce SLACcitation field
8058 % \QandA{NUMPAGES DATA FIELD}{*}{numpages-x}Do not include numpages field
8059 % \QandA{REFERENCE COMPONENT TAGS}{b}{bibinfo}Reference component tags like \cmd\bibinfo\ in the content of \cmd\bibitem
8060 % \QandA{ELEMENT TAGS}{b}{bibfield}Element tags like \cmd\bibfield\ in the content of \cmd\bibitem
8061 % \QandA{COMPATIBILITY WITH PLAIN TEX}{*}{nfss}Use LaTeX commands which may not work with Plain TeX
8062 % \end{enumerate}
8063 %
8064 % A file \file{apsrmp.dbj} file equivalent to the following should result:
8065 % \begin{verbatim}
8066 %\input docstrip
8067 %\preamble
8068 %----------------------------------------
8069 %*** REVTeX-compatible RMP 2010-02-12 ***
8070 %\endpreamble
8071 %\postamble
8072 %End of customized bst file
8073 %\endpostamble
8074 %\keepsilent
8075 %\askforoverwritefalse
8076 %\def\MBopts{\from{merlin.mbs}{%
8077 % head,\MBopta}
8078 %\from{physjour.mbs}{\MBopta}
8079 %\from{geojour.mbs}{\MBopta}
8080 %\from{photjour.mbs}{\MBopta}
8081 %\from{merlin.mbs}{tail,\MBopta}}
8082 %\def\MBopta{%
8083 % ay,%: Author-year with some non-standard interface
8084 % nat,%: Natbib for use with natbib v5.3 or later
8085 % lang,%: Use language field to switch hyphenation patterns for title
8086 % pres,pres-bf,%: Presentation, speaker bold face
8087 % vonx,%: Sort without von part (de la Maire after Mahone)
8088 % nm-rev1,%: Only first name reversed, initials (AGU style: Smith, J. F., H. K. Jones)
8089 % jnrlst,%: Junior comes last as Smith, John, Jr.
8090 % nmft,nmft-def,%: User defined author font (\bibnamefont)
8091 % fnm-def,%: First names in user defined font (\bibfnamefont)
8092 % nmfted,%: Editors incollection like authors font
8093 % nmand-rm,%: `And' in normal font (JONES and JAMES)
8094 % lab,lab-def,%: User defined citation font (\citenamefont)
8095 % and-rm,%: Cited `and' in normal font
8096 % keyxyr,%: Year blank when KEY replaces missing author (for natbib 7.0)
8097 % dt-beg,%: Date after authors
8098 % yr-par,%: Year in parentheses as (1993)
8099 % dtrev,%: Date as year month
8100 % date-nil-x,%: If date is empty, then do not produce the surrounding punctuation (parens, brackets, colon, comma)
8101 % tit-qq,%: Title and punctuation in double quotes (``Title,'' ..)
8102 % inproceedings-chapter,%: produce pages after chapter, just as in InBook
8103 % jtit-x,%: Title is ignored
8104 % inproceedings-chapter,%: produce pages after chapter just as in InBook
8105 % article-booktitle,%: format booktitle
8106 % article-series,%: article can has series
8107 % jttl-rm,%: Journal name normal font
8108 % journal-address,%: Include address field (in parentheses) along with journal name
8109 % book-bt,%: Field `booktitle', or if absent field `title', is book title
8110 % thesis-title-o,%: Title is optional: no warning issued if empty
8111 % trtit-b,%: Tech. report title like books
8112 % techreport-institution-par,%: format tech report institution like book publisher
8113 % vol-bf,%: Volume bold as {\bf vol}(num)
8114 % vnum-sp,%: Journal vol (num) as 34 (2)
8115 % volp-com,%: Volume with comma as vol(num), ppp
8116 % jpg-1,%: Only start page number
8117 % pp-last,%: Pages at end but before any notes
8118 % book-editor-booktitle,%: Book permits empty author, produces title before editor in this case
8119 % inbook-editor-booktitle,%: Allow using both title/booktitle, both author/editor
8120 % bookaddress,%: Italic booktitle followed by bookaddress in roman
8121 % num-xser,%: Allows number without series and suppresses word "number"
8122 % number-cap,%: Capitalize word `number' as: "Number 123"
8123 % chapter-cap,%: Capitalize word `chapter' as: `Chapter 42'
8124 % series-number,%: Series number as: `Springer Lecture Notes No. 125'
8125 % numser-booktitle,%: After book title and conference address, and before editors
8126 % ser-vol,%: Series, vol. 23
8127 % ser-rm,%: format series roman , even when used with volume
8128 % volume-cap,%: Capitalize word `volume', as: `Volume 7 in Lecture Series'
8129 % ser-ed,%: Series and volume after booktitle and before editors
8130 % jnm-x,%: Space after journal name
8131 % pg-bk,book-chapter-pages,%: As chapter and page: chapter 42, page 345
8132 % pub-par,%: Publisher in parentheses
8133 % ay-empty-pub-parens-x,%: eliminate parentheses altogether if nothing inside
8134 % pre-edn,%: Edition before publisher
8135 % school-par,%: school/address in parens: `(school, address)'
8136 % isbn,%: Include ISBN for books, booklets, etc.
8137 % issn,%: Include ISSN for periodicals
8138 % doi-link,doi,%: Doi forms a link to the publication, anchored to the volume or title
8139 % bkedcap,%: `Name Editor,' as above, editor upper case
8140 % edby,%: In booktitle, edited by .. (where .. is names)
8141 % blk-com,%: Comma between blocks
8142 % fin-endbibitem,%: Command at end instead of period
8143 % pp,%: `Page' abbreviated as p. or pp.
8144 % ed,%: `Editor' abbreviated as ed. or eds.
8145 % abr,%: Abbreviations of such words
8146 % ednx,%: `Edition' abbreviated as `ed'
8147 % ord,%: Numerical editions as 1st, 2nd, 3rd, etc
8148 % jabr,%: Abbreviated journal names
8149 % and-com,%: Comma even with 2 authors as `Tom, and Harry'
8150 % etal-it,%: Italic et al
8151 % revdata,eprint,url,url-blk,translation,%: Include REVTeX data fields collaboration, eid, eprint, archive, url, translation
8152 % SLACcitation,%: Produce SLACcitation field
8153 % numpages-x,%: Do not include numpages field
8154 % url,url-prefix-x,%: URL without prefix (default: `URL ')
8155 % bibinfo,%: Reference component tags like \bibinfo in the content of \bibitem
8156 % bibfield,%: Element tags like \bibfield in the content of \bibitem
8157 % nfss,%: Use LaTeX commands which may not work with Plain TeX
8158 %,{%
8159 % }}
8160 %\generate{\file{apsrmp4-2.bst}{\MBopts}}
8161 %\endbatchfile
8162 % \end{verbatim}
8163 %
8164 % For a comparison between apsrmp.bst and apsrev.bst, see Section~\ref{sec:CompRevRmp}.
8165 %
8166 % \changes{4.1c}{2008/08/15}{Document class option longbibliography via \cs{substyle@post}}
8167 % \begin{macrocode}
8168 \def\@bibstyle{apsrmp\substyle@post}%
8169 % \end{macrocode}
8170 % \end{macro}
8171 %
8172 % \begin{macro}{\authoryear@sw}
8173 % \changes{4.1a}{2008/01/18}{(AO, 457) Endnotes to be sorted in with numerical citations.}%
8174 % Author-year citations: default value of \cmd\authoryear@sw\ is true.
8175 % \begin{macrocode}
8176 \@booleantrue\authoryear@sw
8177 % \end{macrocode}
8178 % \end{macro}
8179 %
8180 % \begin{macro}{\@bibdataout@rmp}
8181 % \changes{4.1o}{2010/02/12}{(AO, 580) Control .bst at run time.}%
8182 % When the journal is RMP, the meaning of the procedure \cmd\@bibdataout@aps\ needs to be different
8183 % because of the way the author names are formatted. In other respects, it is the same.
8184 % \begin{macrocode}
8185 \def\@bibdataout@aps{%
8186 \immediate\write\@bibdataout{%
8187 % \end{macrocode}
8188 % An entry that controls processing of the \filename{.bst} file has entry type \texttt{@CONTROL}.
8189 % This entry's cite key is \texttt{apsrmp41Control}, which serves as a version number.
8190 % \begin{macrocode}
8191 @CONTROL{%
8192 apsrmp41Control%
8193 % \end{macrocode}
8194 % Say whether we want long bibliography style (the default), or the abbreviated style.
8195 % \begin{macrocode}
8196 \longbibliography@sw{%
8197 ,author="03",editor="0",pages="1",title="0",year="0"%
8198 }{%
8199 ,author="0B",editor="0",pages="0",title="0",year="1"% TeXSupport
8200 }%
8201 }%
8202 }%
8203 % \end{macrocode}
8204 % Place a \cmd\citation\ into the auxiliary file corresponding to this entry.
8205 % \begin{macrocode}
8206 \if@filesw
8207 \immediate\write\@auxout{\string\citation{apsrmp41Control}}%
8208 \fi
8209 }%
8210 % \end{macrocode}
8211 % \end{macro}
8212 %
8213 % \begin{macro}{\bibpunct}
8214 % \begin{macro}{\bibsection}
8215 % \begin{macro}{\bibpreamble}
8216 % \begin{macro}{\newblock}
8217 % \begin{macro}{\bibhang}
8218 % \begin{macro}{\bibsep}
8219 % \begin{macro}{\cite}
8220 % The following commands effectively establish the style in which \cmd\cite\ commands are
8221 % formatted.
8222 % You can think of them as the second needed component for the bibliography.
8223 %
8224 % Set up for author-year citations:
8225 % when \cmd\NAT@set@cites\ executes (at \envb{document} time), the \cmd\@biblabel\ will
8226 % be set to \cmd\NAT@biblabel.
8227 %
8228 % Per Karie Friedman ([email protected]), multiple citations are separated by semicolons, e.g.,
8229 % (Jones, 1999; Abbott and Smith, 2000; Wortley, 2001a),
8230 % and
8231 % multiple citations by the same author by commas, e.g.,
8232 % Abela et al. (1995, 1997a, 1997b).
8233 % The third argument of \cmd\bibpunct\ handles the former.
8234 %
8235 % The fifth argument puts a comma after the author when the year is not in parens:
8236 % (Lee et al., 1996).
8237 %
8238 % Incidently, this \cmd\bibpunct\ command specifies the \classname{natbib} default values.
8239 %
8240 % We define the sectioning command to use when starting the bibliography.
8241 %
8242 % We change \classname{natbib}'s \cmd\NAT@def@citea\ procedure to effect more elaborate
8243 % punctuation for RMP: see item 473:
8244 % \cmd\cite\ order punctuation: ``If possible, \cmd\textcite should put the word 'and' between two citations and before the last citation in a list of 3 or more.''
8245 %
8246 % \begin{macrocode}
8247 \appdef\setup@hook{%
8248 % \end{macrocode}
8249 %
8250 % We define the punctuation to use in the \cmd\cite\ command's production.
8251 %
8252 % \begin{macrocode}
8253 \bibpunct{(%)
8254 }{%(
8255 )}{;}{a}{,}{,}%
8256 % \end{macrocode}
8257 %
8258 % We define the sectioning command to use when starting the bibliography.
8259 %
8260 % \begin{macrocode}
8261 \def\bibsection{%
8262 \expandafter\section\expandafter*\expandafter{\refname}%
8263 \@nobreaktrue
8264 }%
8265 \let\bibpreamble\@empty
8266 \def\newblock{\ }%
8267 \bibhang10\p@
8268 \bibsep\z@
8269 % \end{macrocode}
8270 %
8271 % Per Mark Doyle, \cmd\cite\ is mapped to \cmd\citep\ in RMP.
8272 % \changes{4.1i}{2009/10/23}{(AO, 541) Defer assignment of \cs{cite} until after natbib loads}
8273 % \begin{macrocode}
8274 \let\cite\citep
8275 % \end{macrocode}
8276 %
8277 % End of code to be delayed until after \classname{natbib} loads.
8278 % \begin{macrocode}
8279 }%
8280 % \end{macrocode}
8281 % \end{macro}
8282 % \end{macro}
8283 % \end{macro}
8284 % \end{macro}
8285 % \end{macro}
8286 % \end{macro}
8287 % \end{macro}
8288 %
8289 % \begin{macro}{\footinbib@sw}
8290 % Footnotes in bibliography are consistent only with numbered citations,
8291 % and are particularly nasty under \classname{natbib}:
8292 % the packcage will automatically change to numbered references if
8293 % any \cmd\bibitem\ commands lack the optional argument.
8294 % Therefore, we must uninvoke it now, even if invoked by the document.
8295 % The same is quietly done with
8296 % \classname{natbib}'s \classoption{mcite} and \classoption{compress} options.
8297 %
8298 % \changes{4.1f}{2009/07/15}{(AO, 523) Add class option nomerge, to turn off new natbib 8.3 syntax}
8299 % (AO 523) I changed the code that alters \cmd\NAT@merge\ so that it will not override
8300 % when \cmd\NAT@merge\ has been set to \cmd\z@.
8301 % \begin{macrocode}
8302 \@booleanfalse\footinbib@sw
8303 \appdef\setup@hook{%
8304 \footinbib@sw{%
8305 \class@warn{%
8306 Footnotes in bibliography are incompatible with RMP.^^J%
8307 Undoing the footinbib option.
8308 }%
8309 \@booleanfalse\footinbib@sw
8310 }{}%
8311 \@ifnum{\NAT@merge>\@ne}{\let\NAT@merge\@ne}{}%
8312 \def\NAT@cmprs{\z@}%
8313 }%
8314 % \end{macrocode}
8315 % \end{macro}
8316 %
8317 % \begin{macro}{\eprint}
8318 % RMP requires the \cmd\eprint\ field in the bib entry to be set off with the word ``eprint''.
8319 % \begin{macrocode}
8320 \def\eprint#1{eprint #1}%
8321 % \end{macrocode}
8322 % \end{macro}
8323 %
8324 % \subsection{Table of Contents}
8325 %
8326 % We set up for auto-sizing of certain TOC elements.
8327 %
8328 % To do this, we override the definitions for
8329 % the default TOC font (\cmd\toc@@font),
8330 % and define
8331 % formatting for the needed elements (\cmd\l@\dots).
8332 % Finally, we activate the autosizing by
8333 % assigning \cmd\toc@pre\ and \cmd\toc@post.
8334 %
8335 % \begin{macro}{\toc@@font}
8336 % \changes{4.1a}{2008/01/19}{(AO, 461) Change the csname revtex uses from @dotsep to ltxu@dotsep. The former is understood in mu. (What we wanted was a dimension.)}%
8337 % Set the formatting characteristics of the auto-indenting part
8338 % of the TOC.
8339 % \begin{macrocode}
8340 \def\toc@@font{%
8341 \footnotesize\rmfamily
8342 \def\\{\space\ignorespaces}%
8343 }%
8344 \def\ltxu@dotsep{5.5pt}%
8345 % \end{macrocode}
8346 % \end{macro}
8347 %
8348 % \begin{macro}{\l@section}
8349 % Determine which TOC elements are automatically indented.
8350 % \begin{macrocode}
8351 \def\tocleft@{\z@}%
8352 \def\tocdim@min{5\p@}%
8353 \def\l@section{%
8354 \l@@sections{}{section}% Implicit #3#4
8355 }%
8356 \def\l@subsection{%
8357 \l@@sections{section}{subsection}% Implicit #3#4
8358 }%
8359 \def\l@subsubsection{%
8360 \l@@sections{subsection}{subsubsection}% Implicit #3#4
8361 }%
8362 %\def\l@subsubsection#1#2{}%
8363 \def\l@paragraph#1#2{}%
8364 \def\l@subparagraph#1#2{}%
8365 % \end{macrocode}
8366 % \end{macro}
8367 %
8368 % Activate the TOC processing.
8369 % \begin{macrocode}
8370 \let\toc@pre\toc@pre@auto
8371 \let\toc@post\toc@post@auto
8372 % \end{macrocode}
8373 %
8374 %
8375 % \begin{macrocode}
8376 %</rmp>
8377 % \end{macrocode}
8378 %
8379 %
8380 % \Finale
8381 % %Here ends the programmer's documentation.
8382 % \endinput
8383 %
8384 \endinput