| 1 |
% \section{Document preambles} |
| 2 |
% |
| 3 |
% \begin{macrocode} |
| 4 |
%<nrc1|nrc2>\NeedsTeXFormat{LaTeX2e}[1995/12/01] |
| 5 |
%<*dtx> |
| 6 |
\ProvidesFile {nrc.dtx} |
| 7 |
%</dtx> |
| 8 |
%<nrc1cls>\ProvidesClass {nrc1} |
| 9 |
%<nrc1sty>\ProvidesPackage{nrc1} |
| 10 |
%<nrc2cls>\ProvidesClass {nrc2} |
| 11 |
%<nrc2sty>\ProvidesPackage{nrc2} |
| 12 |
%<balance>\ProvidesPackage{baltools} |
| 13 |
%<*nrc1|nrc2|balance> |
| 14 |
[2013/02/02 v2.01a |
| 15 |
%</nrc1|nrc2|balance> |
| 16 |
%<nrc1cls> NRC single-column journal class% |
| 17 |
%<nrc1sty> NRC single-column journal compatibility package% |
| 18 |
%<nrc2cls> NRC 2-column journal class% |
| 19 |
%<nrc2sty> NRC 2-column journal compatibility package% |
| 20 |
%<balance> NRC 2-column balancing tools% |
| 21 |
%<*dtx> |
| 22 |
NRC macros source file% |
| 23 |
%</dtx> |
| 24 |
%<*nrc1|nrc2|balance> |
| 25 |
]% $Id: nrc.dtx,v 2.143 2013/02/02 17:45:07 ct $ |
| 26 |
%</nrc1|nrc2|balance> |
| 27 |
% \end{macrocode} |
| 28 |
% |
| 29 |
% \iffalse |
| 30 |
% |
| 31 |
% Note that the RCS version relates to the number of times the file |
| 32 |
% has been checked-in, which relates to a development process taking |
| 33 |
% place on several machines, rather than the incidence of significant |
| 34 |
% change; the definitive version number is that in the \Provides* |
| 35 |
% things, while the RCS Id may provide a clue as to the latest date |
| 36 |
% the documentation was worked on. |
| 37 |
% |
| 38 |
% Code to compile the thing using LaTeX2e |
| 39 |
% |
| 40 |
% \begin{macrocode} |
| 41 |
%<*driver> |
| 42 |
\documentclass{ltxdoc} |
| 43 |
% |
| 44 |
% |
| 45 |
\begin{document} |
| 46 |
\GetFileInfo{nrc.dtx} |
| 47 |
\title{The \textsf{nrc} macros\thanks{This file |
| 48 |
has version number \fileversion, last |
| 49 |
revised \filedate}} |
| 50 |
\author{Robin Fairbairns\\\small\texttt{[email protected]}} |
| 51 |
\date{Printed \today} |
| 52 |
\maketitle |
| 53 |
\tableofcontents |
| 54 |
\begin{center} |
| 55 |
\fboxsep1.5mm |
| 56 |
\framebox{\bfseries |
| 57 |
\begin{minipage}{4.5in} |
| 58 |
Copyright \copyright\ |
| 59 |
Her Majesty the Queen in Right of Canada (1999--\\ |
| 60 |
\hphantom{Copyright \copyright\ }% |
| 61 |
2002) as represented by the Minister responsible\\ |
| 62 |
\hphantom{Copyright \copyright\ }% |
| 63 |
for the National Research Council of Canada. |
| 64 |
\end{minipage}} |
| 65 |
\end{center} |
| 66 |
\DocInput{nrc.dtx} |
| 67 |
\end{document} |
| 68 |
%</driver> |
| 69 |
% \end{macrocode} |
| 70 |
% |
| 71 |
% \fi |
| 72 |
% \CheckSum{4586} |
| 73 |
% |
| 74 |
% \StopEventually{} |
| 75 |
% \section{Introduction} |
| 76 |
% |
| 77 |
% This file generates class files that provide macros for use with |
| 78 |
% \LaTeXe{} to typeset journals published by the National Research |
| 79 |
% Council of Canada, in both one- (\textsf{nrc1}) and two-column |
| 80 |
% (\textsf{nrc2}) formats. |
| 81 |
% |
| 82 |
% \subsection{Class options} |
| 83 |
% |
| 84 |
% \begin{macro}{\NRC@clsname} |
| 85 |
% \begin{macro}{\NRC@warning} |
| 86 |
% \begin{macro}{\hb@xt@} |
| 87 |
% \begin{macro}{\NRC@xlap} |
| 88 |
% \begin{macro}{\NRC@footer@centre} |
| 89 |
% \begin{macro}{\NRC@tpheader@centre} |
| 90 |
% \begin{macro}{\NRC@tpfooter@centre} |
| 91 |
% First, a few utility definitions, etc. |
| 92 |
% |
| 93 |
% \cs{hb@xt@} is in modern \LaTeX{} kernels, but \cs{providecommand} |
| 94 |
% was there from the very start of \LaTeXe. |
| 95 |
% |
| 96 |
% \cs{NRC@clsname} is self-explanatory and \cs{NRC@warning} is a |
| 97 |
% warning for the class. \cs{NRC@xlap} is a centred lap (a zero-width |
| 98 |
% box, like \cs{llap} and \cs{rlap}); the name comes from the |
| 99 |
% \textsl{TUGboat} macros. \cs{NRC@footer@centre} is used in the |
| 100 |
% footer of pages; it may be blank~--- hence pre-emptive declaration |
| 101 |
% here. \cs{NRC@tpfooter@centre} (old style) or |
| 102 |
% \cs{NRC@tpheader@centre} (new style) contains the same information on |
| 103 |
% the title page, and may also therefore be blank. |
| 104 |
% |
| 105 |
% \begin{macrocode} |
| 106 |
%<*nrc1cls|nrc2cls> |
| 107 |
\newcommand{\NRC@clsname}% |
| 108 |
%<nrc1>{nrc1} |
| 109 |
%<nrc2>{nrc2} |
| 110 |
\newcommand{\NRC@warning}[1]{\ClassWarning\NRC@clsname{#1}} |
| 111 |
\providecommand{\hb@xt@}{\hbox to} |
| 112 |
\newcommand{\NRC@xlap}[1]{\hb@xt@\z@{\hss#1\hss}} |
| 113 |
\let\NRC@footer@centre\@empty |
| 114 |
%<newtplayout>\let\NRC@tpheader@centre\@empty |
| 115 |
%<!newtplayout>\let\NRC@tpfooter@centre\@empty |
| 116 |
% \end{macrocode} |
| 117 |
% \end{macro} |
| 118 |
% \end{macro} |
| 119 |
% \end{macro} |
| 120 |
% \end{macro} |
| 121 |
% \end{macro} |
| 122 |
% \end{macro} |
| 123 |
% \end{macro} |
| 124 |
% |
| 125 |
% \begin{environment}{landscape} |
| 126 |
% \begin{environment}{11pt} |
| 127 |
% \begin{environment}{12pt} |
| 128 |
% \begin{environment}{a5paper} |
| 129 |
% \begin{environment}{b5paper} |
| 130 |
% Kill off all actively irrelevant options. (Landscape anything, and |
| 131 |
% the standard 5-size papers are too small\dots) Unless we do this, |
| 132 |
% we will inherit those options (which are defined by |
| 133 |
% \textsf{article.cls}) and cause potential confusion. |
| 134 |
% \begin{macrocode} |
| 135 |
\DeclareOption{landscape}{\NRC@warning{Option \CurrentOption\space |
| 136 |
ignored}} |
| 137 |
\DeclareOption{11pt}{\ds@landscape} |
| 138 |
\DeclareOption{12pt}{\ds@landscape} |
| 139 |
\DeclareOption{a5paper}{\ds@landscape} |
| 140 |
\DeclareOption{b5paper}{\ds@landscape} |
| 141 |
% \end{macrocode} |
| 142 |
% \end{environment} |
| 143 |
% \end{environment} |
| 144 |
% \end{environment} |
| 145 |
% \end{environment} |
| 146 |
% \end{environment} |
| 147 |
% |
| 148 |
% \begin{environment}{cmfonts} |
| 149 |
% \begin{environment}{type1fonts} |
| 150 |
% \begin{environment}{type1rest} |
| 151 |
% Font usage: this provides the mechanism to test the class without |
| 152 |
% access to the specialised (and rather expensive) fonts used at the |
| 153 |
% NRC. |
| 154 |
% |
| 155 |
% Option \verb|usecmfonts| replaces text Times and Helvetica by |
| 156 |
% Computer Modern family fonts. Option \verb|type1rest| uses Times |
| 157 |
% and Helvetica, but restricts the set of Helvetica available by |
| 158 |
% replacing Helvetica Light by Helvetica (Medium: the regular weight |
| 159 |
% of the font), and Helvetica Black by Helvetica Bold. |
| 160 |
% |
| 161 |
% Option \verb|type1fonts| (the default) uses the complete set of |
| 162 |
% Times and Helvetica fonts available in the production process. |
| 163 |
% \begin{macrocode} |
| 164 |
\newif\if@usecmfonts |
| 165 |
\newif\if@restrictedtypeone |
| 166 |
\DeclareOption{cmfonts}{\@usecmfontstrue} |
| 167 |
\DeclareOption{type1fonts}{\@usecmfontsfalse |
| 168 |
\@restrictedtypeonefalse} |
| 169 |
\DeclareOption{type1rest}{\@usecmfontsfalse |
| 170 |
\@restrictedtypeonetrue} |
| 171 |
% \end{macrocode} |
| 172 |
% \end{environment} |
| 173 |
% \end{environment} |
| 174 |
% \end{environment} |
| 175 |
% |
| 176 |
% \begin{environment}{YandY} |
| 177 |
% \begin{environment}{genTeX} |
| 178 |
% Option \verb|YandY| specifies that \verb|LY1| encoding should be |
| 179 |
% used. Otherwise (option |genTeX|~--- `generic' \TeX{}) we use |
| 180 |
% whatever encoding the user specifies (by default, |OT1|). We make |
| 181 |
% no moves on input encoding: that's up to the user, regardless\dots |
| 182 |
% \begin{macrocode} |
| 183 |
\newif\if@yandy |
| 184 |
\DeclareOption{YandY}{\@yandytrue} |
| 185 |
\DeclareOption{genTeX}{\@yandyfalse} |
| 186 |
% \end{macrocode} |
| 187 |
% \end{environment} |
| 188 |
% \end{environment} |
| 189 |
% |
| 190 |
% \begin{environment}{breakaddress} |
| 191 |
% \begin{environment}{nobreakaddress} |
| 192 |
% These control an aspect of the layout of the address information box |
| 193 |
% at the bottom of the title page. |
| 194 |
% |
| 195 |
% Option \verb|breakaddress| arranges that the address is printed on a |
| 196 |
% new line after the list of authors whose address it is. Option |
| 197 |
% \verb|nobreakaddress| (the default) arranges that the address runs |
| 198 |
% on after the list of authors. |
| 199 |
% \begin{macrocode} |
| 200 |
\DeclareOption{breakaddress}{\let\if@breakaddress\iftrue} |
| 201 |
\DeclareOption{nobreakaddress}{\let\if@breakaddress\iffalse} |
| 202 |
% \end{macrocode} |
| 203 |
% \end{environment} |
| 204 |
% \end{environment} |
| 205 |
% |
| 206 |
% \begin{environment}{twocolid} |
| 207 |
% \begin{environment}{twocolid*} |
| 208 |
% \begin{environment}{onecolid} |
| 209 |
% Options \verb'twocolid' and \verb'twocolid*' arrange that the IDbox |
| 210 |
% at the bottom of the title page is set over both columns, rather |
| 211 |
% than over one column only (which is the default, and which the |
| 212 |
% nervous can select by option \verb'onecolid'). The IDbox can be set |
| 213 |
% internally in a single column over the entire width of the page |
| 214 |
% (option \verb'twocolid'), or in two columns (option |
| 215 |
% \verb'twocolid*'). |
| 216 |
% \begin{macrocode} |
| 217 |
%<*nrc2> |
| 218 |
\newif\if@onecolid |
| 219 |
\newif\if@multcolid |
| 220 |
\DeclareOption{twocolid}{\@onecolidfalse\@multcolidfalse} |
| 221 |
\DeclareOption{twocolid*}{\@onecolidfalse\@multcolidtrue} |
| 222 |
\DeclareOption{onecolid}{\@onecolidtrue} |
| 223 |
%</nrc2> |
| 224 |
% \end{macrocode} |
| 225 |
% \end{environment} |
| 226 |
% \end{environment} |
| 227 |
% \end{environment} |
| 228 |
% |
| 229 |
% \begin{environment}{leqno} |
| 230 |
% \begin{environment}{reqno} |
| 231 |
% \begin{macro}{\iflefteqnos} |
| 232 |
% The option \verb'leqno' (the default) has the same meaning (in |
| 233 |
% effect) as does the \verb'article' class option (which in fact loads |
| 234 |
% its view of the world through a \verb'.clo' file). The option |
| 235 |
% \verb'reqno' restores the standard \TeX{} view of the matter, which |
| 236 |
% is sometimes needed in \verb'nrc2'-class papers. |
| 237 |
% \begin{macrocode} |
| 238 |
\newif\iflefteqnos |
| 239 |
\DeclareOption{leqno}{\lefteqnostrue} |
| 240 |
\DeclareOption{reqno}{\lefteqnosfalse} |
| 241 |
% \end{macrocode} |
| 242 |
% \end{macro} |
| 243 |
% \end{environment} |
| 244 |
% \end{environment} |
| 245 |
% |
| 246 |
% Now control of the labels in the bibliography. |
| 247 |
% |
| 248 |
% \begin{environment}{numbib} |
| 249 |
% \begin{environment}{nonumbib} |
| 250 |
% \begin{macro}{\ifNRC@numbib} |
| 251 |
% These options merely switch |
| 252 |
% \begin{macrocode} |
| 253 |
\newif\ifNRC@numbib |
| 254 |
\DeclareOption{numbib}{\NRC@numbibtrue} |
| 255 |
\DeclareOption{nonumbib}{\NRC@numbibfalse} |
| 256 |
% \end{macrocode} |
| 257 |
% \end{macro} |
| 258 |
% \end{environment} |
| 259 |
% \end{environment} |
| 260 |
% |
| 261 |
% |
| 262 |
% \begin{environment}{author} |
| 263 |
% \begin{macro}{\ifNRC@author@use} |
| 264 |
% If the class is being used by an author to prepare a paper, there |
| 265 |
% are things that can't be entered: for example, final volume, issue, |
| 266 |
% or page number, and NRC file number. The |author| class option |
| 267 |
% (which will almost never be executed other than by way of |
| 268 |
% \cs{ExecuteOptions}) forewarns the class that such commands should |
| 269 |
% not be expected. |
| 270 |
% \begin{macrocode} |
| 271 |
\newif\ifNRC@author@use |
| 272 |
\NRC@author@usefalse |
| 273 |
\DeclareOption{author}{\NRC@author@usetrue} |
| 274 |
% \end{macrocode} |
| 275 |
% \end{macro} |
| 276 |
% \end{environment} |
| 277 |
% |
| 278 |
% |
| 279 |
% The next two control the preprint/production state of the paper. |
| 280 |
% |
| 281 |
% \begin{environment}{preprint} |
| 282 |
% \begin{environment}{production} |
| 283 |
% \begin{macro}{\ifNRC@preprint} |
| 284 |
% Option \verb|preprint| causes the page styles to change (omit dates, |
| 285 |
% page numbers, etc.), while option \verb|production| (the default) |
| 286 |
% sets page styles as required in the production process. Note that |
| 287 |
% \verb|preprint| is really `incompatible' (i.e., makes no sense) with |
| 288 |
% \verb|trimmarks|, but we don't diagnose the two together. |
| 289 |
% \begin{macrocode} |
| 290 |
\newif\ifNRC@preprint |
| 291 |
\DeclareOption{preprint}{\NRC@preprinttrue} |
| 292 |
\DeclareOption{production}{\NRC@preprintfalse} |
| 293 |
% \end{macrocode} |
| 294 |
% \end{macro} |
| 295 |
% \end{environment} |
| 296 |
% \end{environment} |
| 297 |
% |
| 298 |
% Then two that control decorations in page footers. |
| 299 |
% |
| 300 |
% \begin{environment}{proof} |
| 301 |
% \begin{environment}{pagnf} |
| 302 |
% \begin{macro}{\NRC@footer@defd} |
| 303 |
% Notices that this is a proof printing only, or that it is a printing |
| 304 |
% (e.g., on the web) whose pagination differs from the final |
| 305 |
% pagination in the journal. |
| 306 |
% |
| 307 |
% \cs{NRC@footer@defd} records which of these options has been given |
| 308 |
% (0 for neither, 1 for |proof|, 2 for |pagnf|); it's used for |
| 309 |
% diagnostics here, and (in `original' style) when deciding whether to |
| 310 |
% set up the title page footer centre, later. |
| 311 |
% \begin{macrocode} |
| 312 |
\newcommand{\NRC@footer@defd}{0} |
| 313 |
\DeclareOption{proof}{\ifcase\NRC@footer@defd |
| 314 |
\renewcommand\NRC@footer@centre{% |
| 315 |
\fontsize{14}{16}% |
| 316 |
\usefont\f@encoding\sfdefault cn% |
| 317 |
\NRC@text@proof |
| 318 |
}% |
| 319 |
%<newtplayout> \let\NRC@tpheader@centre\NRC@footer@centre |
| 320 |
%<!newtplayout> \let\NRC@tpfooter@centre\NRC@footer@centre |
| 321 |
\renewcommand{\NRC@footer@defd}{1}% |
| 322 |
\or |
| 323 |
\NRC@warning{"\CurrentOption" option repeated}% |
| 324 |
\or |
| 325 |
\NRC@warning{"\CurrentOption" option inconsistent |
| 326 |
with "pagnf" option}% |
| 327 |
\fi |
| 328 |
} |
| 329 |
\DeclareOption{pagnf}{\ifcase\NRC@footer@defd |
| 330 |
\renewcommand\NRC@footer@centre{% |
| 331 |
\fontsize\@xpt\@xiipt% |
| 332 |
\usefont\f@encoding\sfdefault mn% |
| 333 |
\NRC@text@pagination |
| 334 |
}% |
| 335 |
%<newtplayout> \let\NRC@tpheader@centre\NRC@footer@centre |
| 336 |
%<!newtplayout> \let\NRC@tpfooter@centre\NRC@footer@centre |
| 337 |
\renewcommand{\NRC@footer@defd}{2}% |
| 338 |
\or |
| 339 |
\NRC@warning{"\CurrentOption" option inconsistent |
| 340 |
with "proof" option}% |
| 341 |
\or |
| 342 |
\NRC@warning{"\CurrentOption" option repeated}% |
| 343 |
\fi |
| 344 |
} |
| 345 |
% \end{macrocode} |
| 346 |
% \end{macro} |
| 347 |
% \end{environment} |
| 348 |
% \end{environment} |
| 349 |
% |
| 350 |
% \begin{environment}{finalverso} |
| 351 |
% \begin{environment}{nofinalverso} |
| 352 |
% Option |finalverso| specifies that the paper should end on a recto |
| 353 |
% page (creating a blank, unnumbered page if the text doesn't for |
| 354 |
% itself; the blank page does \emph{not} appear in the paper's page |
| 355 |
% count). |
| 356 |
% \begin{macrocode} |
| 357 |
\newif\if@finalverso |
| 358 |
\DeclareOption{finalverso}{\@finalversotrue} |
| 359 |
\DeclareOption{nofinalverso}{\@finalversofalse} |
| 360 |
% \end{macrocode} |
| 361 |
% \end{environment} |
| 362 |
% \end{environment} |
| 363 |
% |
| 364 |
% |
| 365 |
% |
| 366 |
% \begin{environment}{notrimmarks} |
| 367 |
% \begin{environment}{trimmarks} |
| 368 |
% \begin{macro}{\NRC@toptrim} |
| 369 |
% \begin{macro}{\NRC@bottomtrim} |
| 370 |
% The next two options control the creation of trim marks. |
| 371 |
% |
| 372 |
% Option \verb|trimmarks| enables output of trim marks, which are |
| 373 |
% needed in the final production process. Option \verb|notrimmarks| |
| 374 |
% (the default) suppresses the trim marks. |
| 375 |
% \begin{macrocode} |
| 376 |
\DeclareOption{notrimmarks}{% |
| 377 |
\let\NRC@toptrim\relax |
| 378 |
\let\NRC@bottomtrim\relax |
| 379 |
} |
| 380 |
\DeclareOption{trimmarks}{% |
| 381 |
\AtEndOfClass{% |
| 382 |
\let\NRC@toptrim\NRC@dotoptrim |
| 383 |
\let\NRC@bottomtrim\NRC@dobottomtrim |
| 384 |
}% |
| 385 |
} |
| 386 |
% \end{macrocode} |
| 387 |
% \end{macro} |
| 388 |
% \end{macro} |
| 389 |
% \end{environment} |
| 390 |
% \end{environment} |
| 391 |
% |
| 392 |
% \begin{environment}{english} |
| 393 |
% Languages: we recognise the possibility English and French words in |
| 394 |
% the structural text of the paper. First, the English variants |
| 395 |
% (option \verb|english|, the default): |
| 396 |
% \begin{macrocode} |
| 397 |
\DeclareOption{english}{% |
| 398 |
% \end{macrocode} |
| 399 |
% |
| 400 |
% \begin{macro}{\ifNRC@french} |
| 401 |
% General flag for odds and ends |
| 402 |
% \begin{macrocode} |
| 403 |
\let\ifNRC@french\iffalse |
| 404 |
% \end{macrocode} |
| 405 |
% \end{macro} |
| 406 |
% |
| 407 |
% \begin{macro}{\NRC@DeclareText} |
| 408 |
% Establish the declaration of texts |
| 409 |
% \begin{macrocode} |
| 410 |
\def\NRC@DeclareText#1#2#3{\def#1{#2}} |
| 411 |
% \end{macrocode} |
| 412 |
% \end{macro} |
| 413 |
% |
| 414 |
% \begin{macro}{\NRC@text@journal} |
| 415 |
% Name of the journal for use in page headers and footers |
| 416 |
% \emph{Note}: this value is no longer preset; in the days when there |
| 417 |
% was \emph{only} a \texttt{cjp} class, the value was preset to `Can.\ |
| 418 |
% J.\ Phys.', but that setting is inappropriate in a class that can be |
| 419 |
% used for several different journals. |
| 420 |
% \end{macro} |
| 421 |
% |
| 422 |
% \begin{macro}{\refname} |
| 423 |
% \begin{macro}{\tablename} |
| 424 |
% These are \LaTeX\ original commands~--- the name for the references |
| 425 |
% section of the paper, and the names to use in float captions; these |
| 426 |
% have to be deferred to begin document, to avoid the ravages both of |
| 427 |
% \textsf{article.cls} and (if the user loads it) of |
| 428 |
% \textsf{babel.sty}: |
| 429 |
% \begin{macrocode} |
| 430 |
\AtBeginDocument{\renewcommand\refname{References}% |
| 431 |
\renewcommand\tablename{Table}} |
| 432 |
} |
| 433 |
% \end{macrocode} |
| 434 |
% \end{macro} |
| 435 |
% \end{macro} |
| 436 |
% \end{environment} |
| 437 |
% |
| 438 |
% \begin{environment}{french} |
| 439 |
% And now the same thing for French (option \verb|french|); note that |
| 440 |
% since option |english| is executed by default, all the names defined |
| 441 |
% by \cs{newcommand} in that option have to be redefined by |
| 442 |
% \cs{renewcommand} here\dots |
| 443 |
% \begin{macrocode} |
| 444 |
\DeclareOption{french}{% |
| 445 |
% \end{macrocode} |
| 446 |
% |
| 447 |
% \begin{macro}{\ifNRC@french} |
| 448 |
% General flag for odds and ends |
| 449 |
% \begin{macrocode} |
| 450 |
\let\ifNRC@french\iftrue |
| 451 |
% \end{macrocode} |
| 452 |
% \end{macro} |
| 453 |
% |
| 454 |
% \begin{macro}{\NRC@DeclareText} |
| 455 |
% Establish the declaration of texts |
| 456 |
% \begin{macrocode} |
| 457 |
\def\NRC@DeclareText#1#2#3{\def#1{#3}} |
| 458 |
% \end{macrocode} |
| 459 |
% \end{macro} |
| 460 |
% |
| 461 |
% \begin{macro}{\refname} |
| 462 |
% \begin{macro}{\tablename} |
| 463 |
% \begin{macrocode} |
| 464 |
\AtBeginDocument{\renewcommand\refname{Bibliographie}% |
| 465 |
\renewcommand\tablename{Tableau}% |
| 466 |
} |
| 467 |
} |
| 468 |
% \end{macrocode} |
| 469 |
% \end{macro} |
| 470 |
% \end{macro} |
| 471 |
% \end{environment} |
| 472 |
% |
| 473 |
% Execute the options that define our defaults: |
| 474 |
% \begin{macrocode} |
| 475 |
%<editors>\ExecuteOptions{type1fonts,YandY} |
| 476 |
%<*authors> |
| 477 |
\IfFileExists{times.sty}% |
| 478 |
{\ExecuteOptions{type1rest,genTeX,author}}% |
| 479 |
{\ExecuteOptions{cmfonts,genTeX,author}}% |
| 480 |
%</authors> |
| 481 |
\ExecuteOptions{nobreakaddress,notrimmarks,english,% |
| 482 |
numbib,nofinalverso% |
| 483 |
} |
| 484 |
%<nrc2>\ExecuteOptions{onecolid,leqno} |
| 485 |
%<nrc1>\ExecuteOptions{reqno} |
| 486 |
%</nrc1cls|nrc2cls> |
| 487 |
% \end{macrocode} |
| 488 |
% |
| 489 |
% \begin{environment}{finalbalance} |
| 490 |
% \begin{environment}{nofinalbalance} |
| 491 |
% \begin{macro}{\ifNRC@finalbalance} |
| 492 |
% For the \textsf{baltools} package, we provide just one option, and |
| 493 |
% its negation: whether or not to balance columns at the end of the |
| 494 |
% document. The default is to balance. |
| 495 |
% \begin{macrocode} |
| 496 |
%<*balance> |
| 497 |
\newif\ifNRC@finalbalance |
| 498 |
\DeclareOption{finalbalance}{\NRC@finalbalancetrue} |
| 499 |
\DeclareOption{nofinalbalance}{\NRC@finalbalancefalse} |
| 500 |
\DeclareOption*{\PackageError{baltools}% |
| 501 |
{Option \CurrentOption\space not recognised}} |
| 502 |
\ExecuteOptions{finalbalance} |
| 503 |
\ProcessOptions |
| 504 |
\ifNRC@finalbalance |
| 505 |
\AtEndDocument{\if@twocolumn\BalanceColumns\fi} |
| 506 |
\fi |
| 507 |
%</balance> |
| 508 |
% \end{macrocode} |
| 509 |
% \end{macro} |
| 510 |
% \end{environment} |
| 511 |
% \end{environment} |
| 512 |
% |
| 513 |
% Finally (back with the classes), dispose of any remaining options via |
| 514 |
% \textsf{article.cls}, tell it to use |leqno| if necessary, and |
| 515 |
% |fleqn|, and load it: |
| 516 |
% \begin{macrocode} |
| 517 |
%<*nrc1cls|nrc2cls> |
| 518 |
\DeclareOption*{\PassOptionsToClass\CurrentOption{article}} |
| 519 |
\ProcessOptions |
| 520 |
\iflefteqnos |
| 521 |
\PassOptionsToClass{leqno}{article} |
| 522 |
\fi |
| 523 |
\LoadClass[fleqn,twoside]{article} |
| 524 |
% \end{macrocode} |
| 525 |
% |
| 526 |
% \subsection{Tidying up after options} |
| 527 |
% |
| 528 |
% The \textsf{babel} package has the unfortunate habit of changing all |
| 529 |
% the structural text elements when the language changes: |
| 530 |
% `unfortunate' because we need to use text other than \textsf{babel} |
| 531 |
% chooses\dots |
| 532 |
% |
| 533 |
% We therefore have to arrange that enthusiasm of some of |
| 534 |
% \textsf{babel}'s commands is somewhat curtailed. However, at the |
| 535 |
% present stage we don't even know if \textsf{babel} is going to be |
| 536 |
% loaded, so we dump stuff into the token stream at begin document to |
| 537 |
% do the job for us. |
| 538 |
% |
| 539 |
% For English, the list is relatively straightforward: |
| 540 |
% \begin{macrocode} |
| 541 |
\AtBeginDocument{\NRC@stripdef{english}\figurename} |
| 542 |
% \end{macrocode} |
| 543 |
% |
| 544 |
% For French, the situation is complicated by the existence of three |
| 545 |
% different established language definition files: one distributed |
| 546 |
% with current babel itself (\textsf{frenchb}), one distributed with |
| 547 |
% the previous edition of babel (\textsf{francais}), and the one |
| 548 |
% distributed with the GUTenberg French language support bundle |
| 549 |
% (\textsf{french}). At this stage, the only way of determining |
| 550 |
% what's going to be loaded, if it does get loaded, is to look for the |
| 551 |
% file it will be loaded from: so we have three paths through the code, |
| 552 |
% distinguishing on the existence of the various \texttt{*.ldf} files. |
| 553 |
% |
| 554 |
% The GUTenberg \textsf{french} style does various unamendable things |
| 555 |
% that clash with the NRC's requirements, so we warn of the |
| 556 |
% possibility of slight confusion if it proves to be present. (The |
| 557 |
% NRC themselves do not use the GUTenberg style in production, but |
| 558 |
% potential authors may.) |
| 559 |
% \begin{macrocode} |
| 560 |
\IfFileExists{french.ldf}{% |
| 561 |
\def\NRC@french@lang{french}% |
| 562 |
\NRC@warning{GUTenberg Babel french style detected -- |
| 563 |
\MessageBreak |
| 564 |
some corruption of NRC-defined format may occur\@gobble |
| 565 |
}% |
| 566 |
}{% |
| 567 |
\IfFileExists{frenchb.ldf}{% |
| 568 |
\def\NRC@french@lang{frenchb}% |
| 569 |
% \end{macrocode} |
| 570 |
% |
| 571 |
% \textsf{frenchb.ldf} has these other odd ideas about how lists |
| 572 |
% should be formatted. |
| 573 |
% \begin{macrocode} |
| 574 |
\AtBeginDocument{% |
| 575 |
\@nameuse{bbl@nonfrenchlistspacing}% |
| 576 |
}% |
| 577 |
}{% |
| 578 |
\IfFileExists{francais.ldf}{% |
| 579 |
\def\NRC@french@lang{francais}% |
| 580 |
}{% |
| 581 |
\NRC@warning{No Babel french style detected -- |
| 582 |
\MessageBreak |
| 583 |
French sections of paper will not be correctly formatted\@gobble}% |
| 584 |
\let\NRC@french@lang\@empty |
| 585 |
}% |
| 586 |
}% |
| 587 |
} |
| 588 |
\ifx\NRC@french@lang\@empty |
| 589 |
\else |
| 590 |
\AtBeginDocument{% |
| 591 |
\expandafter\NRC@stripdef{\NRC@french@lang}\figurename |
| 592 |
\expandafter\NRC@stripdef{\NRC@french@lang}\tablename |
| 593 |
\expandafter\NRC@stripdef{\NRC@french@lang}\abstractname |
| 594 |
\expandafter\NRC@stripdef{\NRC@french@lang}\refname |
| 595 |
% \end{macrocode} |
| 596 |
% |
| 597 |
% We define our own list spacing and item label layouts, thank you |
| 598 |
% very much; this ensures that \textsf{babel}'s |french| option |
| 599 |
% doesn't interfere. |
| 600 |
% \begin{macrocode} |
| 601 |
\@ifpackageloaded{babel}{% |
| 602 |
\expandafter\addto\csname extras\NRC@french@lang\endcsname |
| 603 |
{\bbl@nonfrenchitemize}% |
| 604 |
}{}% |
| 605 |
} |
| 606 |
\fi |
| 607 |
% \end{macrocode} |
| 608 |
% |
| 609 |
% |
| 610 |
% \subsection{Auxiliary package requirements} |
| 611 |
% |
| 612 |
% Current thinking (at least) is that the \textsf{nrc2} class needs to |
| 613 |
% load the \textsf{multicol} package, so (in default of a better place) |
| 614 |
% we do that here. |
| 615 |
% \begin{macrocode} |
| 616 |
%<nrc2>\RequirePackage[infoshow]{multicol} |
| 617 |
% \end{macrocode} |
| 618 |
% |
| 619 |
% |
| 620 |
% \subsection{Declaring texts} |
| 621 |
% |
| 622 |
% A lot of `fixed' texts are used in the classes, and these are |
| 623 |
% declared using a \cs{NRC@DeclareText} command, which is established |
| 624 |
% during option processing to select the appropriate language for the |
| 625 |
% substitution text. |
| 626 |
% |
| 627 |
% \begin{macro}{\NRC@DeclareText} |
| 628 |
% Syntax: \cs{NRC@DeclareText}\marg{\cs{cmd}}\marg{english text}% |
| 629 |
% \marg{french text} |
| 630 |
% |
| 631 |
% Declares `\cs{cmd}' to have English or French substitution text. |
| 632 |
% This section of the classes makes use of the command. |
| 633 |
% \end{macro} |
| 634 |
% |
| 635 |
% \begin{macro}{\NRC@text@and} |
| 636 |
% Err, a conjunction |
| 637 |
% \begin{macrocode} |
| 638 |
\NRC@DeclareText{\NRC@text@and}{and}{et} |
| 639 |
% \end{macrocode} |
| 640 |
% \end{macro} |
| 641 |
% |
| 642 |
% \begin{macro}{\NRC@text@NRC} |
| 643 |
% The name for the National Research Council Canada, for use in page |
| 644 |
% footers |
| 645 |
% \begin{macrocode} |
| 646 |
\NRC@DeclareText{\NRC@text@NRC}{Published by NRC Research Press}% |
| 647 |
{Publi\'e par NRC Research Press} |
| 648 |
% \end{macrocode} |
| 649 |
% \end{macro} |
| 650 |
% |
| 651 |
% \begin{macro}{\NRC@text@vol} |
| 652 |
% The name for `volume', for use in page footers |
| 653 |
% \begin{macrocode} |
| 654 |
\NRC@DeclareText{\NRC@text@vol}{Vol.}{Vol.} |
| 655 |
% \end{macrocode} |
| 656 |
% \end{macro} |
| 657 |
% |
| 658 |
% \begin{macro}{\NRC@text@correspondAll} |
| 659 |
% The name for the author for correspondence, when no other |
| 660 |
% information is given |
| 661 |
% \begin{macrocode} |
| 662 |
\NRC@DeclareText{\NRC@text@correspondAll}{Author to whom all |
| 663 |
correspondence should be addressed.}{Auteur correspondant.} |
| 664 |
% \end{macrocode} |
| 665 |
% \end{macro} |
| 666 |
% |
| 667 |
% \begin{macro}{\NRC@text@correspond} |
| 668 |
% The text for the author for correspondence, when extra address, or |
| 669 |
% whatever, is given |
| 670 |
% \begin{macrocode} |
| 671 |
\NRC@DeclareText{\NRC@text@correspond}% |
| 672 |
{Corresponding author (e-mail: \@tempa).}% |
| 673 |
{Auteur correspondant (courriel~\string: \@tempa).} |
| 674 |
% \end{macrocode} |
| 675 |
% \end{macro} |
| 676 |
% |
| 677 |
% \begin{macro}{\NRC@text@present} |
| 678 |
% The text for the author's present address |
| 679 |
% \begin{macrocode} |
| 680 |
\NRC@DeclareText{\NRC@text@present}{Present Address:}% |
| 681 |
{Adresse actuelle~\string:} |
| 682 |
% \end{macrocode} |
| 683 |
% \end{macro} |
| 684 |
% |
| 685 |
% \begin{macro}{\NRC@text@telephone} |
| 686 |
% \begin{macro}{\NRC@text@fax} |
| 687 |
% \begin{macro}{\NRC@text@telefax} |
| 688 |
% \begin{macro}{\NRC@text@email} |
| 689 |
% Texts for telephone, fax, `telefax' and email |
| 690 |
% \begin{macrocode} |
| 691 |
\NRC@DeclareText{\NRC@text@telephone}{Telephone:}% |
| 692 |
{T\'el\'ephone\protect~\string:} |
| 693 |
\NRC@DeclareText{\NRC@text@fax}{FAX:}% |
| 694 |
{t\'el\'ecopie\protect~\string:} |
| 695 |
\NRC@DeclareText{\NRC@text@telefax}{Telephone/FAX:}% |
| 696 |
{T\'el\'ephone/t\'el\'ecopie\protect~\string:} |
| 697 |
\NRC@DeclareText{\NRC@text@email}{e-mail:}% |
| 698 |
{courriel\protect~\string:} |
| 699 |
% \end{macrocode} |
| 700 |
% \end{macro} |
| 701 |
% \end{macro} |
| 702 |
% \end{macro} |
| 703 |
% \end{macro} |
| 704 |
% |
| 705 |
% \begin{macro}{\NRC@text@received} |
| 706 |
% \begin{macro}{\NRC@text@accepted} |
| 707 |
% \begin{macro}{\NRC@text@revreceived} |
| 708 |
% \begin{macro}{\NRC@text@revaccepted} |
| 709 |
% Texts for `received' and `accepted' |
| 710 |
% \begin{macrocode} |
| 711 |
\NRC@DeclareText{\NRC@text@received}{Received}% |
| 712 |
{Re\c{c}u le} |
| 713 |
\NRC@DeclareText{\NRC@text@accepted}{Accepted}% |
| 714 |
{Accept\'e le} |
| 715 |
\NRC@DeclareText{\NRC@text@revreceived}{Revision received}% |
| 716 |
{R\'{e}vision re\c{c}u le} |
| 717 |
\NRC@DeclareText{\NRC@text@revaccepted}{Revision accepted}% |
| 718 |
{R\'{e}vision accepte\'{e} le} |
| 719 |
% \end{macrocode} |
| 720 |
% \end{macro} |
| 721 |
% \end{macro} |
| 722 |
% \end{macro} |
| 723 |
% \end{macro} |
| 724 |
% |
| 725 |
% \begin{macro}{\NRC@text@webpub} |
| 726 |
% \begin{macro}{\NRC@text@assoced} |
| 727 |
% \begin{macro}{\NRC@text@corred} |
| 728 |
% \begin{macro}{\NRC@text@commdate} |
| 729 |
% The web publication notice |
| 730 |
% \begin{macrocode} |
| 731 |
\NRC@DeclareText{\NRC@text@webpub}% |
| 732 |
{Published on the NRC Research Press Web site at |
| 733 |
\@tempa{} on \@tempb}% |
| 734 |
{Publi\'{e} sur le site Web des Presses |
| 735 |
scientifiques du CNRC, \`a \@tempa, le \@tempb} |
| 736 |
\NRC@DeclareText{\NRC@text@assoced}% |
| 737 |
{Paper handled by Associate Editor:}% |
| 738 |
{Production de l'article coordonn\'{e}e par |
| 739 |
le directeur scientifique associ\'{e}~\string:} |
| 740 |
\NRC@DeclareText{\NRC@text@corred}% |
| 741 |
{Corresponding Editor:}% |
| 742 |
{Directeur scientifique correspondant~\string:} |
| 743 |
\NRC@DeclareText{\NRC@text@commdate}% |
| 744 |
{Written discussion of this article is welcomed and |
| 745 |
will be received by the Editor until}% |
| 746 |
{Les commentaires sur le contenu de cet article |
| 747 |
doivent \^{e}tre envoy\'{e}s au directeur |
| 748 |
scientifique de la revue avant le} |
| 749 |
% \end{macrocode} |
| 750 |
% \end{macro} |
| 751 |
% \end{macro} |
| 752 |
% \end{macro} |
| 753 |
% \end{macro} |
| 754 |
% |
| 755 |
% \begin{macro}{\NRC@text@abbreviations} |
| 756 |
% Text for `abbreviations' |
| 757 |
% \begin{macrocode} |
| 758 |
\NRC@DeclareText{\NRC@text@abbreviations}{Abbreviations}% |
| 759 |
{Abbr\'eviations} |
| 760 |
% \end{macrocode} |
| 761 |
% \end{macro} |
| 762 |
% |
| 763 |
% \begin{macro}{\NRC@text@proof} |
| 764 |
% \begin{macro}{\NRC@text@pagination} |
| 765 |
% These two appear with both languages in their representation for |
| 766 |
% each language mode; doing them in this way makes it possible, |
| 767 |
% however, for us to change them to single-language forms with little |
| 768 |
% difficulty. |
| 769 |
% \begin{macrocode} |
| 770 |
\NRC@DeclareText{\NRC@text@proof}{Proof/\'Epreuve}% |
| 771 |
{Proof/\'Epreuve} |
| 772 |
\NRC@DeclareText{\NRC@text@pagination}{Pagination not final/% |
| 773 |
Pagination non finale}% |
| 774 |
{Pagination not final/% |
| 775 |
Pagination non finale} |
| 776 |
% \end{macrocode} |
| 777 |
% \end{macro} |
| 778 |
% \end{macro} |
| 779 |
% |
| 780 |
% \begin{macro}{\NRC@text@citation} |
| 781 |
% Citation information: used in the title page footer (in new title |
| 782 |
% page layout). |
| 783 |
% \begin{macrocode} |
| 784 |
%<*newtplayout> |
| 785 |
\NRC@DeclareText{\NRC@text@citation}% |
| 786 |
{Citation information:}% |
| 787 |
{Citation information\protect~\string:}% |
| 788 |
%</newtplayout> |
| 789 |
% \end{macrocode} |
| 790 |
% \end{macro} |
| 791 |
% |
| 792 |
% |
| 793 |
% \section{Font usage} |
| 794 |
% |
| 795 |
% The switch \texttt{@usecmfonts} tells us which fonts are to be used. |
| 796 |
% If we're going to use {\small CM} fonts (\cs{@usecmfontstrue}), we |
| 797 |
% need to define various things that enable us to use them at sizes |
| 798 |
% and in weights required for the use of Helvetica. If we're using |
| 799 |
% Times and Helvetica, we merely have to change the default families |
| 800 |
% to use (we assume that the |.fd| files carry all the weights we have |
| 801 |
% available, or at least those we need to use). |
| 802 |
% \begin{macrocode} |
| 803 |
\if@usecmfonts |
| 804 |
\DeclareFontShape{OT1}{cmss}{m}{n} |
| 805 |
{ |
| 806 |
<5><6><7><8>cmss8 |
| 807 |
<9>cmss9 |
| 808 |
<10><10.95>cmss10 |
| 809 |
<12><14.4><16>cmss12 |
| 810 |
<17.28><18><20.74><24.88>cmss17 |
| 811 |
}{} |
| 812 |
\DeclareFontShape{OT1}{cmss}{l}{n} |
| 813 |
{<->ssub*cmss/m/n}{} |
| 814 |
\DeclareFontShape{OT1}{cmss}{m}{sl} |
| 815 |
{ |
| 816 |
<5><6><7><8>cmssi8 <9> cmssi9 |
| 817 |
<10><10.95>cmssi10 |
| 818 |
<12><14.4><16>cmssi12 |
| 819 |
<17.28><18><20.74><24.88>cmssi17 |
| 820 |
}{} |
| 821 |
\DeclareFontShape{OT1}{cmss}{m}{it} |
| 822 |
{<->ssub*cmss/m/sl}{} |
| 823 |
\DeclareFontShape{OT1}{cmss}{l}{sl} |
| 824 |
{<->ssub*cmss/m/sl}{} |
| 825 |
\DeclareFontShape{OT1}{cmss}{l}{it} |
| 826 |
{<->ssub*cmss/m/sl}{} |
| 827 |
\DeclareFontShape{OT1}{cmss}{bx}{n} |
| 828 |
{ |
| 829 |
<5> <6> <7> <8> <9> cmssbx10 |
| 830 |
<10> <10.95> <12> <14.4> <16> <17.28> <18> <20.74> <24.88> cmssbx10 |
| 831 |
}{} |
| 832 |
\DeclareFontShape{OT1}{cmss}{c}{n} |
| 833 |
{<->ssub*cmss/bx/n}{} |
| 834 |
\DeclareFontShape{OT1}{cmss}{bx}{sl} |
| 835 |
{<->sub*cmss/m/sl}{} |
| 836 |
\DeclareFontShape{OT1}{cmss}{bx}{it} |
| 837 |
{<->sub*cmss/m/sl}{} |
| 838 |
\DeclareFontShape{OT1}{cmss}{c}{sl} |
| 839 |
{<->sub*cmss/m/sl}{} |
| 840 |
\DeclareFontShape{OT1}{cmss}{c}{it} |
| 841 |
{<->sub*cmss/m/sl}{} |
| 842 |
\else |
| 843 |
\renewcommand\rmdefault{ptm} |
| 844 |
\renewcommand\sfdefault{phv} |
| 845 |
\if@yandy |
| 846 |
\RequirePackage[LY1]{fontenc} |
| 847 |
\RequirePackage[LY1,mtbold]{mathtime} |
| 848 |
% \end{macrocode} |
| 849 |
% |
| 850 |
% we add the following here, for convenience: |
| 851 |
% \begin{macrocode} |
| 852 |
\PassOptionsToPackage{dvipsone}{graphics} |
| 853 |
\PassOptionsToPackage{dvipsone}{color} |
| 854 |
\fi |
| 855 |
% \end{macrocode} |
| 856 |
% |
| 857 |
% If we're using a restricted Type 1 set, establish substitutions that |
| 858 |
% can be used by those who haven't released any arms or legs for |
| 859 |
% Adobe's use\dots |
| 860 |
% \begin{macrocode} |
| 861 |
\if@restrictedtypeone |
| 862 |
\AtBeginDocument{{\sf |
| 863 |
\DeclareFontShape{OT1}{phv}{c}{n}% |
| 864 |
{<->ssub*phv/b/n}{}% |
| 865 |
\DeclareFontShape{OT1}{phv}{c}{sl}% |
| 866 |
{<->ssub*phv/b/sl}{}% |
| 867 |
\DeclareFontShape{OT1}{phv}{c}{it}% |
| 868 |
{<->ssub*phv/b/sl}{}% |
| 869 |
\DeclareFontShape{OT1}{phv}{l}{n}% |
| 870 |
{<->ssub*phv/m/n}{}% |
| 871 |
\DeclareFontShape{OT1}{phv}{l}{sl}% |
| 872 |
{<->ssub*phv/m/sl}{}% |
| 873 |
\DeclareFontShape{OT1}{phv}{l}{it}% |
| 874 |
{<->ssub*phv/m/sl}{}% |
| 875 |
}}% |
| 876 |
% \end{macrocode} |
| 877 |
% |
| 878 |
% If we're using restricted Type1, we assume we're in a puckah PSNFSS |
| 879 |
% system, and play safe with \cs{textcopyright} |
| 880 |
% \begin{macrocode} |
| 881 |
\providecommand\textcopyright{\textcircled{c}} |
| 882 |
\else |
| 883 |
% \end{macrocode} |
| 884 |
% |
| 885 |
% We'll assume that full Type1 is using the PC\TeX{} font encodings, |
| 886 |
% and proceed to declare symbols on that basis. Sadly, there are no |
| 887 |
% standard \LaTeX-style font encoding command sets for this |
| 888 |
% encoding\dots |
| 889 |
% \begin{macrocode} |
| 890 |
\DeclareTextSymbol{\textcopyright}{OT1}{169} |
| 891 |
\DeclareTextSymbolDefault{\textcopyright}{OT1} |
| 892 |
\DeclareTextSymbol{\textguillemetleft}{OT1}{171} |
| 893 |
\DeclareTextSymbolDefault{\textguillemetleft}{OT1} |
| 894 |
\DeclareTextSymbol{\textguillemetright}{OT1}{187} |
| 895 |
\DeclareTextSymbolDefault{\textguillemetright}{OT1} |
| 896 |
\fi |
| 897 |
\fi |
| 898 |
\providecommand\textcopyright{\textcircled{c}} |
| 899 |
% \end{macrocode} |
| 900 |
% |
| 901 |
% \section{General information} |
| 902 |
% |
| 903 |
% \begin{macro}{\volyear} |
| 904 |
% \begin{macro}{\NRC@volume} |
| 905 |
% \begin{macro}{\NRC@year} |
| 906 |
% \begin{macro}{\NRC@copyrightyear} |
| 907 |
% \begin{macro}{\NRC@years} |
| 908 |
% Syntax: \cs{volyear}\marg{volume}\oarg{copyright year}\marg{year} |
| 909 |
% |
| 910 |
% This volume's number (presumably derivable from the year\dots), |
| 911 |
% the year of publication and (optionally) the copyright year (which |
| 912 |
% may validly differ from the year of publication, but defaults to |
| 913 |
% that year if the optional argument isn't given). |
| 914 |
% \begin{macrocode} |
| 915 |
\newcommand*\NRC@volume{99} |
| 916 |
\newcommand*\NRC@year{} |
| 917 |
\edef\NRC@year{\the\year} |
| 918 |
\newcommand*\NRC@copyrightyear{} |
| 919 |
\let\NRC@copyrightyear\NRC@year |
| 920 |
\newcommand\volyear[1]{% |
| 921 |
\renewcommand*\NRC@volume{#1}% |
| 922 |
\@dblarg\NRC@years |
| 923 |
} |
| 924 |
\newcommand\NRC@years[2][]{% |
| 925 |
\renewcommand*\NRC@copyrightyear{#1} |
| 926 |
\renewcommand*\NRC@year{#2}% |
| 927 |
} |
| 928 |
% \end{macrocode} |
| 929 |
% \end{macro} |
| 930 |
% \end{macro} |
| 931 |
% \end{macro} |
| 932 |
% \end{macro} |
| 933 |
% \end{macro} |
| 934 |
% |
| 935 |
% \begin{macro}{\journal} |
| 936 |
% \begin{macro}{\NRC@text@journal} |
| 937 |
% \begin{macro}{\ifNRC@journalcommand} |
| 938 |
% \begin{macro}{\ifNRC@knownjournal} |
| 939 |
% Syntax: \cs{journal}\marg{journal-name} |
| 940 |
% |
| 941 |
% Sets up the journal name for use in running feet, etc. If we've |
| 942 |
% already had a \cs{journalcode} command that gave us a known journal code, we |
| 943 |
% now check for consistency between our journal name and the |
| 944 |
% journal code. This command (and \cs{journalcode}) sets up |
| 945 |
% \cs{ifNRC@journalcommand} to say at least one of them has been |
| 946 |
% processed, and \cs{ifNRC@knownjournal} to say that the argument was |
| 947 |
% acceptable. |
| 948 |
% \begin{macrocode} |
| 949 |
\newif\ifNRC@journalcommand \NRC@journalcommandfalse |
| 950 |
\newif\ifNRC@knownjournal |
| 951 |
\newcommand*{\journal}[1]{% |
| 952 |
\NRC@journalcommandtrue |
| 953 |
\renewcommand*\NRC@text@journal{#1}% |
| 954 |
\@ifundefined{NRC@jlist@text@journal}% |
| 955 |
{% |
| 956 |
\NRC@knownjournalfalse |
| 957 |
\expandafter\NRC@checkonejournal\NRC@journallist |
| 958 |
\ifNRC@knownjournal |
| 959 |
\edef\NRC@journal@linenumber{\the\inputlineno}% |
| 960 |
\else |
| 961 |
\NRC@warning{Journal "\NRC@text@journal" not recognised}% |
| 962 |
\fi |
| 963 |
}% |
| 964 |
{% |
| 965 |
\ifx\NRC@text@journal\NRC@jlist@text@journal |
| 966 |
\else |
| 967 |
\NRC@warning{Journal name inconsistent between\MessageBreak |
| 968 |
\string\journalcode\space command on line |
| 969 |
\NRC@journalcode@linenumber\space and\MessageBreak |
| 970 |
\string\journal\space command}% |
| 971 |
\fi |
| 972 |
}% |
| 973 |
} |
| 974 |
\newcommand*{\NRC@text@journal}{} |
| 975 |
\@onlypreamble\journal |
| 976 |
% \end{macrocode} |
| 977 |
% \end{macro} |
| 978 |
% \end{macro} |
| 979 |
% \end{macro} |
| 980 |
% \end{macro} |
| 981 |
% |
| 982 |
% \begin{macro}{\filenumber} |
| 983 |
% \begin{macro}{\NRC@a@filenumber} |
| 984 |
% \begin{macro}{\NRC@filenumber} |
| 985 |
% \begin{macro}{\ifNRC@pagewithfile} |
| 986 |
% \begin{macro}{\ifNRC@hadfilenumber} |
| 987 |
% \begin{macro}{\NRC@tpfooter@centre} |
| 988 |
% Syntax: \cs{NRCfilenumber}\texttt{[*]}\marg{file number string} |
| 989 |
% |
| 990 |
% Sets the file number to be used in the title page footer and |
| 991 |
% (optionally) in printed page numbers. Authors aren't expected to |
| 992 |
% know this, so we provide a default; diagnostic code to spot that |
| 993 |
% editors haven't provided the command is not yet available. |
| 994 |
% |
| 995 |
% If the optional \texttt{*} is present, page numbers in the paper |
| 996 |
% will be prefixed by the file number. |
| 997 |
% \begin{macrocode} |
| 998 |
\newif\ifNRC@pagewithfile |
| 999 |
\newif\ifNRC@hadfilenumber |
| 1000 |
\newcommand*{\filenumber}{\@ifstar |
| 1001 |
{\NRC@pagewithfiletrue\NRC@a@filenumber}% |
| 1002 |
{\NRC@pagewithfilefalse\NRC@a@filenumber}% |
| 1003 |
} |
| 1004 |
\newcommand*{\NRC@a@filenumber}[1]{% |
| 1005 |
\NRC@hadfilenumbertrue |
| 1006 |
\renewcommand*{\NRC@filenumber}{#1}% |
| 1007 |
} |
| 1008 |
\newcommand*{\NRC@filenumber}{\emph{Zxx-xxx}} |
| 1009 |
% \end{macrocode} |
| 1010 |
% |
| 1011 |
% in case we're not doing a \texttt{proof} or \texttt{pagnf} paper, |
| 1012 |
% define the centre item of the title page footer; the only |
| 1013 |
% significant information in it is the file number\dots |
| 1014 |
% \begin{macrocode} |
| 1015 |
%<*!newtplayout> |
| 1016 |
\ifcase\NRC@footer@defd |
| 1017 |
\renewcommand*{\NRC@tpfooter@centre}{% |
| 1018 |
\fontsize\@viiipt\@xpt |
| 1019 |
\usefont\f@encoding\rmdefault mn% |
| 1020 |
DOI:\ 10.1139/\NRC@filenumber |
| 1021 |
}% |
| 1022 |
\fi |
| 1023 |
%</!newtplayout> |
| 1024 |
% \end{macrocode} |
| 1025 |
% \end{macro} |
| 1026 |
% \end{macro} |
| 1027 |
% \end{macro} |
| 1028 |
% \end{macro} |
| 1029 |
% \end{macro} |
| 1030 |
% \end{macro} |
| 1031 |
% |
| 1032 |
% \begin{macro}{\journalcode} |
| 1033 |
% \begin{macro}{\jcode} |
| 1034 |
% \begin{macro}{\NRC@journalcode} |
| 1035 |
% Syntax: \cs{journalcode}\marg{journal code}, or |
| 1036 |
% \par\noindent\phantom{Syntax: }\cs{jcode}\marg{journal code} |
| 1037 |
% |
| 1038 |
% Defines the code of the journal this paper is aimed at. |
| 1039 |
% \begin{macrocode} |
| 1040 |
\newcommand*{\journalcode}[1]{% |
| 1041 |
\NRC@journalcommandtrue |
| 1042 |
\renewcommand*{\NRC@journalcode}{#1}% |
| 1043 |
\NRC@knownjournalfalse |
| 1044 |
\expandafter\NRC@checkonejournalcode\NRC@journallist |
| 1045 |
\ifNRC@knownjournal |
| 1046 |
\ifx\NRC@text@journal\@empty |
| 1047 |
\let\NRC@text@journal\NRC@jlist@text@journal |
| 1048 |
\edef\NRC@journalcode@linenumber{\the\inputlineno}% |
| 1049 |
\else |
| 1050 |
\ifx\NRC@text@journal\NRC@jlist@text@journal |
| 1051 |
\else |
| 1052 |
\NRC@warning{Journal name inconsistent between\MessageBreak |
| 1053 |
\string\journal\space command on line |
| 1054 |
\NRC@journal@linenumber\space and \MessageBreak |
| 1055 |
\string\journalcode\space command% |
| 1056 |
}% |
| 1057 |
\fi |
| 1058 |
\fi |
| 1059 |
\else |
| 1060 |
\NRC@warning{Journal code \NRC@journalcode\space not recognised}% |
| 1061 |
\fi |
| 1062 |
} |
| 1063 |
\newcommand{\jcode}{} |
| 1064 |
\let\jcode\journalcode |
| 1065 |
\newcommand*{\NRC@journalcode}{} |
| 1066 |
% \end{macrocode} |
| 1067 |
% \end{macro} |
| 1068 |
% \end{macro} |
| 1069 |
% \end{macro} |
| 1070 |
% |
| 1071 |
% \begin{macro}{\issuenumber} |
| 1072 |
% \begin{macro}{\NRC@issuenumber} |
| 1073 |
% \begin{macro}{\NRC@issuenumber@parens} |
| 1074 |
% Syntax: \cs{issuenumber}\marg{issue number} |
| 1075 |
% |
| 1076 |
% The issue number is used in new-style citation information |
| 1077 |
% \begin{macrocode} |
| 1078 |
%<*newtplayout> |
| 1079 |
\newcommand*{\issuenumber}[1]{% |
| 1080 |
\renewcommand{\issuenumber}{#1}% |
| 1081 |
} |
| 1082 |
\newcommand*{\NRC@issuenumber}{} |
| 1083 |
\newcommand{\NRC@issuenumber@parens}{% |
| 1084 |
\ifx\NRC@issuenumber\@empty |
| 1085 |
\else |
| 1086 |
(\NRC@issuenumber)% |
| 1087 |
\fi |
| 1088 |
} |
| 1089 |
%</newtplayout> |
| 1090 |
% \end{macrocode} |
| 1091 |
% \end{macro} |
| 1092 |
% \end{macro} |
| 1093 |
% \end{macro} |
| 1094 |
% |
| 1095 |
% |
| 1096 |
% \begin{macro}{\NRC@journallist} |
| 1097 |
% A list of journal names, their journal codes and web site addresses. |
| 1098 |
% Each journal appears as a triple: |
| 1099 |
% \begin{center} |
| 1100 |
% \marg{journal code}\marg{English site address}% |
| 1101 |
%\marg{French site address}\marg{Journal abbrev.} |
| 1102 |
% \end{center} |
| 1103 |
% The ``addresses'' here are the first component of the journal's web |
| 1104 |
% site, to be quoted (by default) in \cs{webpub} |
| 1105 |
% \begin{macrocode} |
| 1106 |
\newcommand{\NRC@journallist}{% |
| 1107 |
{bcb}{bcb}{bbc}{Biochem. Cell Biol.}% |
| 1108 |
{cgj}{cgj}{rcg}{Can. Geotech. J.}% |
| 1109 |
{cjb}{canjbot}{revcanbot}{Can. J. Bot.}% |
| 1110 |
{cjc}{canjchem}{revcanchim}{Can. J. Chem.}% |
| 1111 |
{cjce}{cjce}{rcgc}{Can. J. Civ. Eng.}% |
| 1112 |
{cjes}{cjes}{rcst}{Can. J. Earth Sci.}% |
| 1113 |
{cjfas}{cjfas}{jcsha}{Can. J. Fish. Aquat. Sci.}% |
| 1114 |
{cjfr}{cjfr}{rcrf}{Can. J. For. Res.}% |
| 1115 |
{cjm}{cjm}{rcm}{Can. J. Microbiol.}% |
| 1116 |
{cjp}{cjp}{rcp}{Can. J. Phys.}% |
| 1117 |
{cjpp}{cjpp}{rcpp}{Can. J. Physiol. Pharmacol.}% |
| 1118 |
{cjz}{cjz}{rcz}{Can. J. Zool.}% |
| 1119 |
{er}{er}{de}{Environ. Rev.}% |
| 1120 |
{gen}{genome}{genome}{Genome}% |
| 1121 |
{jees}{jees}{rgse}{J. Environ. Eng. Sci.}% |
| 1122 |
{}{}{}{}% |
| 1123 |
} |
| 1124 |
\@onlypreamble\NRC@journallist |
| 1125 |
% \end{macrocode} |
| 1126 |
% \end{macro} |
| 1127 |
% |
| 1128 |
% \begin{macro}{\NRC@checkonejournal} |
| 1129 |
% \begin{macro}{\NRC@checkonejournalcode} |
| 1130 |
% \begin{macro}{\NRC@jlist@text@journal} |
| 1131 |
% \begin{macro}{\NRC@def@webaddress} |
| 1132 |
% Syntax: \cs{NRC@checkonejournal}\marg{journal short code}% |
| 1133 |
%\marg{english web addr}\par\noindent |
| 1134 |
%\phantom{Syntax: \cs{NRC@checkonejournal}}\marg{french web addr}% |
| 1135 |
%\marg{running foot abbrev.}\par\noindent |
| 1136 |
%\phantom{Syntax: }\cs{NRC@checkonejournalcode} identical |
| 1137 |
% |
| 1138 |
% The \cs{check*} commands are actually called with a sequence of |
| 1139 |
% short codes, web addresses and abbreviations, and munches through |
| 1140 |
% the lot. This isn't as efficient as it might be, but it's no big |
| 1141 |
% deal when the job only happens at most three times\dots |
| 1142 |
% \begin{macrocode} |
| 1143 |
\newcommand{\NRC@checkonejournal}[4]{% |
| 1144 |
\def\reserved@a{#4}% |
| 1145 |
\ifx\reserved@a\@empty |
| 1146 |
\else |
| 1147 |
\ifx\reserved@a\NRC@text@journal |
| 1148 |
\NRC@knownjournaltrue |
| 1149 |
\def\NRC@jlist@journalcode{#1}% |
| 1150 |
\def\NRC@def@webaddress{% |
| 1151 |
http://\ifNRC@french#3.cnrc\else#2.nrc\fi.ca/% |
| 1152 |
}% |
| 1153 |
\fi |
| 1154 |
\expandafter\NRC@checkonejournal |
| 1155 |
\fi |
| 1156 |
} |
| 1157 |
\newcommand{\NRC@checkonejournalcode}[4]{% |
| 1158 |
\def\reserved@a{#1}% |
| 1159 |
\ifx\reserved@a\@empty |
| 1160 |
\else |
| 1161 |
\ifx\reserved@a\NRC@journalcode |
| 1162 |
\NRC@knownjournaltrue |
| 1163 |
\def\NRC@jlist@text@journal{#4}% |
| 1164 |
\def\NRC@def@webaddress{% |
| 1165 |
http://\ifNRC@french#3.cnrc\else#2.nrc\fi.ca/% |
| 1166 |
}% |
| 1167 |
\fi |
| 1168 |
\expandafter\NRC@checkonejournalcode |
| 1169 |
\fi |
| 1170 |
} |
| 1171 |
% \end{macrocode} |
| 1172 |
% \end{macro} |
| 1173 |
% \end{macro} |
| 1174 |
% \end{macro} |
| 1175 |
% \end{macro} |
| 1176 |
% |
| 1177 |
% \begin{macro}{\NRC@setupdefaults} |
| 1178 |
% Now diagnose the absence of either sort of journal command, and |
| 1179 |
% provide default values; also diagnose missing \cs{filenumber} |
| 1180 |
% command here, for good measure |
| 1181 |
% \begin{macrocode} |
| 1182 |
\AtBeginDocument{\NRC@setupdefaults} |
| 1183 |
\newcommand*{\NRC@setupdefaults}{% |
| 1184 |
\providecommand\NRC@def@webaddress{% |
| 1185 |
http://www.\ifNRC@french cnrc\else nrc\fi.ca/% |
| 1186 |
}% |
| 1187 |
\ifNRC@journalcommand |
| 1188 |
\else |
| 1189 |
\NRC@warning{No \string\journal\space or \string\journalcode\space |
| 1190 |
command given\@gobble |
| 1191 |
}% |
| 1192 |
\fi |
| 1193 |
\ifx\NRC@text@journal\@empty |
| 1194 |
\def\NRC@text@journal{\texttt{\emph{unknown}}}% |
| 1195 |
\fi |
| 1196 |
%<*!newtplayout> |
| 1197 |
\ifx\NRC@journalcode\@empty |
| 1198 |
\def\NRC@journalcode{???}% |
| 1199 |
\fi |
| 1200 |
%</!newtplayout> |
| 1201 |
\ifNRC@hadfilenumber |
| 1202 |
\else |
| 1203 |
\ifNRC@author@use |
| 1204 |
\else |
| 1205 |
\NRC@warning{No \string\filenumber\space command given\@gobble}% |
| 1206 |
\fi |
| 1207 |
\fi |
| 1208 |
} |
| 1209 |
\@onlypreamble{\journalcode} |
| 1210 |
% \end{macrocode} |
| 1211 |
% \end{macro} |
| 1212 |
% |
| 1213 |
% \begin{macro}{\NRC@tpfooter@centre} |
| 1214 |
% \begin{macro}{\NRC@tpfooter@left} |
| 1215 |
% \emph{\textbf{Note:}} This code is for the proposed title page |
| 1216 |
% layout: it is not used in current papers. |
| 1217 |
% |
| 1218 |
% Define the footer texts for use on the title page, in terms of |
| 1219 |
% the things that have been defined in the commands above. |
| 1220 |
% \begin{macrocode} |
| 1221 |
%<*newtplayout> |
| 1222 |
\newcommand*{\NRC@tpfooter@centre}{% |
| 1223 |
\fontsize\@viiipt\@xpt |
| 1224 |
\usefont\f@encoding\rmdefault mn% |
| 1225 |
DOI:\ 10.1139/\NRC@filenumber.% |
| 1226 |
}% |
| 1227 |
\newcommand*{\NRC@tpfooter@left}{% |
| 1228 |
\fontsize\@viiipt\@xpt |
| 1229 |
\usefont\f@encoding\rmdefault mn% |
| 1230 |
\NRC@text@citation\ \NRC@text@journal\ % |
| 1231 |
\textbf{\NRC@volume}\NRC@issuenumber@parens:\ % |
| 1232 |
(\NRC@year).% |
| 1233 |
} |
| 1234 |
%</newtplayout> |
| 1235 |
% \end{macrocode} |
| 1236 |
% \end{macro} |
| 1237 |
% \end{macro} |
| 1238 |
% |
| 1239 |
% \section{Page layout, etc.} |
| 1240 |
% \subsection{Page dimensions} |
| 1241 |
% |
| 1242 |
% \begin{macro}{\hoffset} |
| 1243 |
% \begin{macro}{\voffset} |
| 1244 |
% We cancel the curious enforced one-inch-margins\dots |
| 1245 |
% \begin{macrocode} |
| 1246 |
\hoffset -1in |
| 1247 |
\voffset -1in |
| 1248 |
% \end{macrocode} |
| 1249 |
% \end{macro} |
| 1250 |
% \end{macro} |
| 1251 |
% |
| 1252 |
% \begin{macro}{\NRC@columnwidth} |
| 1253 |
% Horizontal layout: we treat this fairly `trivially', |
| 1254 |
% \begin{macrocode} |
| 1255 |
%<nrc1> \textwidth 34pc |
| 1256 |
%<*nrc2> |
| 1257 |
\newdimen\NRC@columnwidth |
| 1258 |
\paperwidth 51pc |
| 1259 |
\textwidth 43pc |
| 1260 |
\NRC@columnwidth 20.75pc |
| 1261 |
\columnsep 1.5pc |
| 1262 |
\columnseprule \z@ |
| 1263 |
%</nrc2> |
| 1264 |
\hsize \textwidth |
| 1265 |
\@tempdima \paperwidth |
| 1266 |
\advance \@tempdima -\textwidth |
| 1267 |
\evensidemargin 0.5\@tempdima |
| 1268 |
\oddsidemargin 0.5\@tempdima |
| 1269 |
% \end{macrocode} |
| 1270 |
% \end{macro} |
| 1271 |
% |
| 1272 |
% Height of text on page is unambiguously defined in NRC1 class: |
| 1273 |
% \begin{macrocode} |
| 1274 |
%<nrc1> \textheight 49.5pc |
| 1275 |
% \end{macrocode} |
| 1276 |
% |
| 1277 |
% but is a bit of an ephemeral concept in NRC2 class, since it's |
| 1278 |
% supposed to be variable within a quoted range. The specification |
| 1279 |
% says 56pc \ensuremath{\pm} 0.5pc; but \TeX{} doesn't have a concept |
| 1280 |
% of a limited stretch so we make the basic height 55.5pc, and then |
| 1281 |
% add a 1pc skip that can shrink to zero at the bottom of the page. |
| 1282 |
% \begin{macrocode} |
| 1283 |
%<*nrc2> |
| 1284 |
\textheight 55.5pc |
| 1285 |
\def\@textbottom{\vskip 1pc \@minus 1pc} |
| 1286 |
%</nrc2> |
| 1287 |
% \end{macrocode} |
| 1288 |
% |
| 1289 |
% The head height and separation, and foot skip are set `wrongly' for |
| 1290 |
% us in \textsf{size10.clo}: |
| 1291 |
% \begin{macro}{\headheight} |
| 1292 |
% \begin{macro}{\headsep} |
| 1293 |
% \begin{macro}{\footskip} |
| 1294 |
% \begin{macrocode} |
| 1295 |
\setlength\headheight{10\p@} |
| 1296 |
%<nrc1>\setlength\headsep {14\p@} |
| 1297 |
%<nrc2>\setlength\headsep {17\p@} |
| 1298 |
\setlength\footskip {20\p@} |
| 1299 |
% \end{macrocode} |
| 1300 |
% \end{macro} |
| 1301 |
% \end{macro} |
| 1302 |
% \end{macro} |
| 1303 |
% |
| 1304 |
% We don't change \cs{topskip} and \cs{maxdepth} (which \LaTeX{} |
| 1305 |
% inscrutably relates to one another\dots) |
| 1306 |
% |
| 1307 |
% Now, generate \cs{topmargin} |
| 1308 |
% \begin{macrocode} |
| 1309 |
\setlength\topmargin{\paperheight} |
| 1310 |
\addtolength\topmargin{-\headheight} |
| 1311 |
\addtolength\topmargin{-\headsep} |
| 1312 |
\addtolength\topmargin{-\textheight} |
| 1313 |
\addtolength\topmargin{-\footskip} |
| 1314 |
\addtolength\topmargin{-.5\topmargin} |
| 1315 |
% \end{macrocode} |
| 1316 |
% |
| 1317 |
% However, that's not quite good enough for letter paper (where we |
| 1318 |
% seem only to have about \ensuremath{\frac{1}{12}''} to spare when the |
| 1319 |
% trim marks are there)\dots |
| 1320 |
% |
| 1321 |
% Therefore, we boil some sugar, cream and butter to create this nice |
| 1322 |
% little fudge: |
| 1323 |
% \begin{macrocode} |
| 1324 |
\addtolength\topmargin{7.5pt} |
| 1325 |
% \end{macrocode} |
| 1326 |
% |
| 1327 |
% \begin{macro}{\textfloatsep} |
| 1328 |
% \begin{macro}{\dbltextfloatsep} |
| 1329 |
% Float separations are quoted relative to the baseline. We achieve |
| 1330 |
% this using a notional value for \cs{baselineskip}: this is fairly |
| 1331 |
% safe, given the NRC's style of setting tables, which more-or-less |
| 1332 |
% guarantees that floats have zero depth. There \emph{is} the slight |
| 1333 |
% problem of the section head (with attendant larger skip) immediately |
| 1334 |
% below a float, but there's nothing we can do about that. |
| 1335 |
% \begin{macrocode} |
| 1336 |
\setlength{\textfloatsep} |
| 1337 |
%<nrc1>{3pc} |
| 1338 |
%<nrc2>{20\p@} |
| 1339 |
\addtolength{\textfloatsep}{-10\p@} |
| 1340 |
%<nrc2>\setlength{\dbltextfloatsep}{\textfloatsep} |
| 1341 |
% \end{macrocode} |
| 1342 |
% \end{macro} |
| 1343 |
% \end{macro} |
| 1344 |
% |
| 1345 |
% \begin{macro}{\NRC@restore@dbltextfloatsep} |
| 1346 |
% Syntax: \cs{NRC@restore@dbltextfloatsep} |
| 1347 |
% |
| 1348 |
% For use in pagestyle commands to restore the text float separation |
| 1349 |
% (currently, just for the first page, where it has been zapped by |
| 1350 |
% two-column version of \cs{maketitle} |
| 1351 |
% \begin{macrocode} |
| 1352 |
%<*nrc2> |
| 1353 |
\edef\NRC@restore@dbltextfloatsep{% |
| 1354 |
\global\noexpand\dbltextfloatsep \the\dbltextfloatsep} |
| 1355 |
%</nrc2> |
| 1356 |
% \end{macrocode} |
| 1357 |
% \end{macro} |
| 1358 |
% |
| 1359 |
% |
| 1360 |
% \subsection{Page Styles} |
| 1361 |
% |
| 1362 |
% \begin{macro}{\ps@nrctitlepage} |
| 1363 |
% Syntax: \cs{thispagestyle}|{nrctitlepage}| |
| 1364 |
% |
| 1365 |
% Establishes the page layout for the title page of a paper. The |
| 1366 |
% definition is not needed for \verb'nrc1' preprints, but (because the |
| 1367 |
% page style is used when creating one-column IDboxes) it is defined |
| 1368 |
% for \verb'nrc2' preprints, in a form that doesn't differ much from |
| 1369 |
% the body style \cs{ps@nrc} |
| 1370 |
% \begin{macrocode} |
| 1371 |
\ifNRC@preprint |
| 1372 |
\newcommand\ps@nrctitlepage{% |
| 1373 |
\let\@evenhead\@empty |
| 1374 |
\let\@oddhead\@empty |
| 1375 |
\def\@evenfoot{% |
| 1376 |
{% |
| 1377 |
% \end{macrocode} |
| 1378 |
% |
| 1379 |
% pull the one-column IDbox into the text area if necessary |
| 1380 |
% \begin{macrocode} |
| 1381 |
%<*nrc2> |
| 1382 |
\if@onecolid\else |
| 1383 |
\NRC@restorefootskip |
| 1384 |
\raise\footskip\hb@xt@\z@{% |
| 1385 |
\vbox to\z@{\vss\box\NRC@theIDbox}% |
| 1386 |
\hss |
| 1387 |
}% |
| 1388 |
\fi |
| 1389 |
%</nrc2> |
| 1390 |
%<newtplayout> \rlap{\NRC@tpfooter@left}% |
| 1391 |
\hfill\NRC@xlap{\NRC@tpfooter@centre}% |
| 1392 |
\hfill\llap{% |
| 1393 |
\fontsize\@viiipt\@xpt |
| 1394 |
\usefont\f@encoding\rmdefault mn% |
| 1395 |
\NRC@text@NRC% |
| 1396 |
}% |
| 1397 |
}% |
| 1398 |
}% |
| 1399 |
\let\@oddfoot\@evenfoot |
| 1400 |
\let\@mkboth\@gobbletwo |
| 1401 |
\let\sectionmark\@gobble |
| 1402 |
\let\subsectionmark\@gobble |
| 1403 |
\let\appendixmark\@gobble |
| 1404 |
} |
| 1405 |
\else |
| 1406 |
\newcommand\ps@nrctitlepage{% |
| 1407 |
\renewcommand\@oddhead{% |
| 1408 |
{% |
| 1409 |
\NRC@toptrim |
| 1410 |
\hfill |
| 1411 |
{% |
| 1412 |
%<*newtplayout> |
| 1413 |
\hfill |
| 1414 |
\NRC@xlap{\NRC@tpheader@centre}% |
| 1415 |
\hfill\llap{% |
| 1416 |
%</newtplayout> |
| 1417 |
\fontsize\@ixpt\@xiipt |
| 1418 |
\usefont\f@encoding\sfdefault ln% |
| 1419 |
\ifNRC@pagewithfile\NRC@filenumber-\fi\thepage |
| 1420 |
%<newtplayout> }% |
| 1421 |
}% |
| 1422 |
%<nrc2> \NRC@restore@dbltextfloatsep |
| 1423 |
}% |
| 1424 |
}% |
| 1425 |
\renewcommand\@evenhead{% |
| 1426 |
{% |
| 1427 |
\NRC@toptrim |
| 1428 |
{% |
| 1429 |
%<newtplayout> \rlap{% |
| 1430 |
\fontsize\@ixpt\@xiipt |
| 1431 |
\usefont\f@encoding\sfdefault ln% |
| 1432 |
\ifNRC@pagewithfile\NRC@filenumber-\fi\thepage |
| 1433 |
%<*newtplayout> |
| 1434 |
}% |
| 1435 |
\hfill |
| 1436 |
\NRC@xlap{\NRC@tpheader@centre}% |
| 1437 |
\hfill |
| 1438 |
%</newtplayout> |
| 1439 |
}% |
| 1440 |
%<nrc2> \NRC@restore@dbltextfloatsep |
| 1441 |
}% |
| 1442 |
}% |
| 1443 |
\renewcommand\@oddfoot{% |
| 1444 |
{% |
| 1445 |
\NRC@bottomtrim |
| 1446 |
%<*nrc2> |
| 1447 |
% \end{macrocode} |
| 1448 |
% |
| 1449 |
% If we have a column-spanning ID box, we insert it here, raised into |
| 1450 |
% the position it would (ought to) be if it had appeared as a bottom |
| 1451 |
% float\dots |
| 1452 |
% \begin{macrocode} |
| 1453 |
\if@onecolid\else |
| 1454 |
\NRC@restorefootskip |
| 1455 |
\raise\footskip\hb@xt@\z@{% |
| 1456 |
\vbox to\z@{\vss\box\NRC@theIDbox}% |
| 1457 |
\hss |
| 1458 |
}% |
| 1459 |
\fi |
| 1460 |
%</nrc2> |
| 1461 |
%<newtplayout> \rlap{\NRC@tpfooter@left}% |
| 1462 |
%<*!newtplayout> |
| 1463 |
\rlap{% |
| 1464 |
\fontsize\@viiipt\@xpt |
| 1465 |
\usefont\f@encoding\rmdefault mn% |
| 1466 |
\NRC@text@journal\ \textbf{\NRC@volume}% |
| 1467 |
\ifNRC@french\ \fi: |
| 1468 |
\ifNRC@pagewithfile\NRC@filenumber-\fi |
| 1469 |
\pageref{\jobname.start.page}--% |
| 1470 |
\ifNRC@pagewithfile\NRC@filenumber-\fi |
| 1471 |
\pageref{\jobname.end.page} |
| 1472 |
(\NRC@year)% |
| 1473 |
}% |
| 1474 |
%</!newtplayout> |
| 1475 |
\hfill\NRC@xlap{\NRC@tpfooter@centre}% |
| 1476 |
\hfill\llap{% |
| 1477 |
\fontsize\@viiipt\@xpt |
| 1478 |
\usefont\f@encoding\rmdefault mn% |
| 1479 |
\NRC@text@NRC% |
| 1480 |
}% |
| 1481 |
}% |
| 1482 |
}% |
| 1483 |
\let\@evenfoot\@oddfoot |
| 1484 |
\let\@mkboth\@gobbletwo |
| 1485 |
\let\sectionmark\@gobble |
| 1486 |
\let\subsectionmark\@gobble |
| 1487 |
\let\appendixmark\@gobble |
| 1488 |
} |
| 1489 |
\fi |
| 1490 |
% \end{macrocode} |
| 1491 |
% \end{macro} |
| 1492 |
% |
| 1493 |
% The above uses two labels, one each for the start and the end of the |
| 1494 |
% paper. We need to arrange that they get defined (note that the |
| 1495 |
% start page has to be defined \cs{AtBeginDocument} because typically |
| 1496 |
% the start page isn't even set until then, and in any case its number |
| 1497 |
% has to be written to the \verb'.aux' output which isn't open until |
| 1498 |
% just before \cs{AtBeginDocument}). |
| 1499 |
% |
| 1500 |
% \begin{macrocode} |
| 1501 |
\AtBeginDocument{\immediate\write\@auxout{\string\newlabel |
| 1502 |
{\jobname.start.page}{{}{\thepage}}}} |
| 1503 |
\AtEndDocument{\clearpage |
| 1504 |
\@tempcnta\c@page |
| 1505 |
\advance\@tempcnta-1 |
| 1506 |
\immediate\write\@auxout{\string\newlabel{\jobname.end.page}% |
| 1507 |
{{}{\number\@tempcnta}}}% |
| 1508 |
\if@finalverso\thispagestyle{nrcempty}\cleardoublepage\fi |
| 1509 |
} |
| 1510 |
% \end{macrocode} |
| 1511 |
% |
| 1512 |
% [The code for the last page is derived from \texttt{lastpage.sty} by |
| 1513 |
% Jeff Goldberg, which is available on CTAN.] |
| 1514 |
% |
| 1515 |
% \begin{macro}{\ps@nrc} |
| 1516 |
% Syntax: \cs{pagestyle}|{nrc}| |
| 1517 |
% |
| 1518 |
% Establishes the page layout for the body of a paper (or, in the case |
| 1519 |
% of a preprint, for all of a paper, since a preprint has no |
| 1520 |
% distinctions\dots) |
| 1521 |
% \begin{macrocode} |
| 1522 |
\ifNRC@preprint |
| 1523 |
\newcommand\ps@nrc{% |
| 1524 |
\def\@evenhead{% |
| 1525 |
{% |
| 1526 |
\fontsize\@ixpt\@xiipt |
| 1527 |
\usefont\f@encoding\sfdefault ln% |
| 1528 |
\hfill |
| 1529 |
\NRC@text@journal |
| 1530 |
}% |
| 1531 |
}% |
| 1532 |
\def\@oddhead{% |
| 1533 |
{% |
| 1534 |
\fontsize\@ixpt\@xiipt |
| 1535 |
\usefont\f@encoding\sfdefault ln% |
| 1536 |
\@shortauthor\hfill |
| 1537 |
}% |
| 1538 |
}% |
| 1539 |
\def\@evenfoot{% |
| 1540 |
{% |
| 1541 |
\hfill\NRC@xlap{\NRC@footer@centre}% |
| 1542 |
\hfill\llap{% |
| 1543 |
\fontsize\@viiipt\@xpt |
| 1544 |
\usefont\f@encoding\rmdefault mn% |
| 1545 |
\NRC@text@NRC% |
| 1546 |
}% |
| 1547 |
}% |
| 1548 |
}% |
| 1549 |
\let\@oddfoot\@evenfoot |
| 1550 |
\let\@mkboth\@gobbletwo |
| 1551 |
\let\sectionmark\@gobble |
| 1552 |
\let\subsectionmark\@gobble |
| 1553 |
\let\appendixmark\@gobble |
| 1554 |
} |
| 1555 |
\else |
| 1556 |
\newcommand\ps@nrc{% |
| 1557 |
\def\@evenhead{% |
| 1558 |
{% |
| 1559 |
\NRC@toptrim |
| 1560 |
\fontsize\@ixpt\@xiipt |
| 1561 |
\usefont\f@encoding\sfdefault ln% |
| 1562 |
\ifNRC@pagewithfile\NRC@filenumber-\fi\thepage\hfill |
| 1563 |
\NRC@text@journal\ \NRC@text@vol\ \NRC@volume, \NRC@year |
| 1564 |
}% |
| 1565 |
}% |
| 1566 |
\def\@oddhead{% |
| 1567 |
{% |
| 1568 |
\NRC@toptrim |
| 1569 |
\fontsize\@ixpt\@xiipt |
| 1570 |
\usefont\f@encoding\sfdefault ln% |
| 1571 |
\@shortauthor\hfill |
| 1572 |
\ifNRC@pagewithfile\NRC@filenumber-\fi\thepage |
| 1573 |
}% |
| 1574 |
}% |
| 1575 |
\def\@evenfoot{% |
| 1576 |
{% |
| 1577 |
\NRC@bottomtrim |
| 1578 |
\hfill\NRC@xlap{\NRC@footer@centre}% |
| 1579 |
\hfill\llap{% |
| 1580 |
\fontsize\@viiipt\@xpt |
| 1581 |
\usefont\f@encoding\rmdefault mn% |
| 1582 |
\NRC@text@NRC% |
| 1583 |
}% |
| 1584 |
}% |
| 1585 |
}% |
| 1586 |
\let\@oddfoot\@evenfoot |
| 1587 |
\let\@mkboth\@gobbletwo |
| 1588 |
\let\sectionmark\@gobble |
| 1589 |
\let\subsectionmark\@gobble |
| 1590 |
\let\appendixmark\@gobble |
| 1591 |
} |
| 1592 |
\fi |
| 1593 |
% \end{macrocode} |
| 1594 |
% \end{macro} |
| 1595 |
% |
| 1596 |
% |
| 1597 |
% \begin{macro}{\ps@nrcplain} |
| 1598 |
% Syntax: \cs{pagestyle}|{nrcplain}| |
| 1599 |
% |
| 1600 |
% The page style for special title (only) pages (i.e., those |
| 1601 |
% containing a \cs{specialtitle*} command). |
| 1602 |
% \begin{macrocode} |
| 1603 |
\ifNRC@preprint |
| 1604 |
\newcommand\ps@nrcplain{% |
| 1605 |
\let\@evenhead\@empty |
| 1606 |
\let\@oddhead\@evenhead |
| 1607 |
\def\@evenfoot{% |
| 1608 |
{% |
| 1609 |
\hfill |
| 1610 |
\fontsize\@ixpt\@xiipt |
| 1611 |
\usefont\f@encoding\rmdefault mn% |
| 1612 |
\ifNRC@pagewithfile\NRC@filenumber-\fi\thepage |
| 1613 |
\hfill |
| 1614 |
}% |
| 1615 |
}% |
| 1616 |
\let\@oddfoot\@evenfoot |
| 1617 |
\let\@mkboth\@gobbletwo |
| 1618 |
\let\sectionmark\@gobble |
| 1619 |
\let\subsectionmark\@gobble |
| 1620 |
\let\appendixmark\@gobble |
| 1621 |
} |
| 1622 |
\else |
| 1623 |
\newcommand\ps@nrcplain{% |
| 1624 |
\def\@evenhead{% |
| 1625 |
\NRC@toptrim |
| 1626 |
\hfill |
| 1627 |
}% |
| 1628 |
\let\@oddhead\@evenhead |
| 1629 |
\def\@evenfoot{% |
| 1630 |
{% |
| 1631 |
\NRC@bottomtrim |
| 1632 |
\hfill |
| 1633 |
\fontsize\@ixpt\@xiipt |
| 1634 |
\usefont\f@encoding\rmdefault mn% |
| 1635 |
\ifNRC@pagewithfile\NRC@filenumber-\fi\thepage |
| 1636 |
\hfill |
| 1637 |
}% |
| 1638 |
}% |
| 1639 |
\let\@oddfoot\@evenfoot |
| 1640 |
\let\@mkboth\@gobbletwo |
| 1641 |
\let\sectionmark\@gobble |
| 1642 |
\let\subsectionmark\@gobble |
| 1643 |
\let\appendixmark\@gobble |
| 1644 |
} |
| 1645 |
\fi |
| 1646 |
% \end{macrocode} |
| 1647 |
% \end{macro} |
| 1648 |
% |
| 1649 |
% |
| 1650 |
% \begin{macro}{\ps@nrcempty} |
| 1651 |
% Syntax: \cs{pagestyle}|{nrcempty}| |
| 1652 |
% |
| 1653 |
% The page style for blank final (uncounted) verso pages |
| 1654 |
% \begin{macrocode} |
| 1655 |
\ifNRC@preprint |
| 1656 |
\let\ps@nrcempty\ps@empty |
| 1657 |
\else |
| 1658 |
\newcommand\ps@nrcempty{% |
| 1659 |
\def\@evenhead{% |
| 1660 |
\NRC@toptrim |
| 1661 |
\hfill |
| 1662 |
}% |
| 1663 |
\let\@oddhead\@evenhead |
| 1664 |
\def\@evenfoot{% |
| 1665 |
\NRC@bottomtrim |
| 1666 |
\hfill |
| 1667 |
}% |
| 1668 |
\let\@oddfoot\@evenfoot |
| 1669 |
\let\@mkboth\@gobbletwo |
| 1670 |
\let\sectionmark\@gobble |
| 1671 |
\let\subsectionmark\@gobble |
| 1672 |
\let\appendixmark\@gobble |
| 1673 |
} |
| 1674 |
\fi |
| 1675 |
% \end{macrocode} |
| 1676 |
% \end{macro} |
| 1677 |
% |
| 1678 |
% |
| 1679 |
% |
| 1680 |
% The default page style is that for the body of journal\dots |
| 1681 |
% \begin{macrocode} |
| 1682 |
\pagestyle{nrc} |
| 1683 |
% \end{macrocode} |
| 1684 |
% |
| 1685 |
% \subsection{Trim marks} |
| 1686 |
% |
| 1687 |
% \begin{macro}{\NRC@dotoptrim} |
| 1688 |
% \begin{macro}{\NRC@dobottomtrim} |
| 1689 |
% |
| 1690 |
% These commands generate the trim marks, and are for use |
| 1691 |
% (respectively) in the headers and footers of pages |
| 1692 |
% \begin{macrocode} |
| 1693 |
\newcommand\NRC@dotoptrim{% |
| 1694 |
\hb@xt@\z@{% |
| 1695 |
\vbox to\z@{% |
| 1696 |
\vss |
| 1697 |
\hb@xt@\textwidth{% |
| 1698 |
\llap{% |
| 1699 |
\NRC@left@trimrule |
| 1700 |
\NRC@up@trimrule |
| 1701 |
\hskip\NRC@trimhsep |
| 1702 |
}% |
| 1703 |
\hss |
| 1704 |
\rlap{% |
| 1705 |
\hskip\NRC@trimhsep |
| 1706 |
\NRC@up@trimrule |
| 1707 |
\NRC@right@trimrule |
| 1708 |
}% |
| 1709 |
}% |
| 1710 |
\vskip\NRC@trimtopsep |
| 1711 |
}% |
| 1712 |
\hss |
| 1713 |
}% |
| 1714 |
} |
| 1715 |
\newcommand\NRC@dobottomtrim{% |
| 1716 |
\hb@xt@\z@{% |
| 1717 |
\vbox to\z@{% |
| 1718 |
\vskip\NRC@trimbotsep |
| 1719 |
\hb@xt@\textwidth{% |
| 1720 |
\llap{% |
| 1721 |
\NRC@left@trimrule |
| 1722 |
\NRC@down@trimrule |
| 1723 |
\hskip\NRC@trimhsep |
| 1724 |
}% |
| 1725 |
\hss |
| 1726 |
\rlap{% |
| 1727 |
\hskip\NRC@trimhsep |
| 1728 |
\NRC@down@trimrule |
| 1729 |
\NRC@right@trimrule |
| 1730 |
}% |
| 1731 |
}% |
| 1732 |
\vss |
| 1733 |
}% |
| 1734 |
\hss |
| 1735 |
}% |
| 1736 |
} |
| 1737 |
% \end{macrocode} |
| 1738 |
% \end{macro} |
| 1739 |
% \end{macro} |
| 1740 |
% |
| 1741 |
% \begin{macro}{\NRC@trimhsep} |
| 1742 |
% \begin{macro}{\NRC@trimtopsep} |
| 1743 |
% \begin{macro}{\NRC@trimbotsep} |
| 1744 |
% |
| 1745 |
% These macros define separations of the trim marks from the body of |
| 1746 |
% the text of the page. Note that \cs{NRC@trimhsep} is as specified, |
| 1747 |
% but \cs{NRC@trimtopsep} and \cs{NRC@trimbotsep} are specified in |
| 1748 |
% terms of distances from the text body, and so have \cs{headsep} and |
| 1749 |
% \cs{footskip} (respectively) subtracted from them. |
| 1750 |
% \begin{macrocode} |
| 1751 |
\newcommand\NRC@trimhsep{4pc} |
| 1752 |
\newcommand\NRC@trimtopsep{54pt} |
| 1753 |
\newcommand\NRC@trimbotsep{30pt} |
| 1754 |
% \end{macrocode} |
| 1755 |
% \end{macro} |
| 1756 |
% \end{macro} |
| 1757 |
% \end{macro} |
| 1758 |
% |
| 1759 |
% \begin{macro}{\NRC@up@trimrule} |
| 1760 |
% \begin{macro}{\NRC@down@trimrule} |
| 1761 |
% \begin{macro}{\NRC@left@trimrule} |
| 1762 |
% \begin{macro}{\NRC@right@trimrule} |
| 1763 |
% |
| 1764 |
% These macros construct the constituent bits of the trim marks |
| 1765 |
% \begin{macrocode} |
| 1766 |
\newcommand\NRC@up@trimrule{% |
| 1767 |
\vrule\@height\NRC@trimvsize |
| 1768 |
\@depth\NRC@trimvgap |
| 1769 |
\@width\NRC@trimthickness |
| 1770 |
} |
| 1771 |
\newcommand\NRC@down@trimrule{% |
| 1772 |
\vrule\@height\NRC@trimvgap |
| 1773 |
\@depth\NRC@trimvsize |
| 1774 |
\@width\NRC@trimthickness |
| 1775 |
} |
| 1776 |
\newcommand\NRC@left@trimrule{% |
| 1777 |
\vrule\@height\NRC@trimhalfthick |
| 1778 |
\@depth\NRC@trimhalfthick |
| 1779 |
\@width\NRC@trimhsize |
| 1780 |
\hskip\NRC@trimhgap |
| 1781 |
} |
| 1782 |
\newcommand\NRC@right@trimrule{% |
| 1783 |
\hskip\NRC@trimhgap |
| 1784 |
\vrule\@height\NRC@trimhalfthick |
| 1785 |
\@depth\NRC@trimhalfthick |
| 1786 |
\@width\NRC@trimhsize |
| 1787 |
} |
| 1788 |
% \end{macrocode} |
| 1789 |
% \end{macro} |
| 1790 |
% \end{macro} |
| 1791 |
% \end{macro} |
| 1792 |
% \end{macro} |
| 1793 |
% |
| 1794 |
% \begin{macro}{\NRC@trimhsize} |
| 1795 |
% \begin{macro}{\NRC@trimvsize} |
| 1796 |
% \begin{macro}{\NRC@trimhalfthick} |
| 1797 |
% \begin{macro}{\NRC@trimthickness} |
| 1798 |
% \begin{macro}{\NRC@trimhgap} |
| 1799 |
% \begin{macro}{\NRC@trimvgap} |
| 1800 |
% |
| 1801 |
% These macros specify the dimensions of trim marks; requirements are: |
| 1802 |
% \begin{itemize} |
| 1803 |
% \item \cs{NRC@trimhalfthick} should be half \cs{NRC@trimthickness} |
| 1804 |
% \item \cs{NRC@trim*size} are \emph{nominally} 3pc each |
| 1805 |
% \item \cs{NRC@trimvsize} should incorporate \cs{NRC@trimvgap} |
| 1806 |
% \end{itemize} |
| 1807 |
% \begin{macrocode} |
| 1808 |
\newcommand\NRC@trimhsize{36\p@} |
| 1809 |
\newcommand\NRC@trimvsize{39\p@} |
| 1810 |
\newcommand\NRC@trimhalfthick{0.1\p@} |
| 1811 |
\newcommand\NRC@trimthickness{0.2\p@} |
| 1812 |
\newcommand\NRC@trimhgap{3\p@} |
| 1813 |
\newcommand\NRC@trimvgap{-3\p@} |
| 1814 |
% \end{macrocode} |
| 1815 |
% \end{macro} |
| 1816 |
% \end{macro} |
| 1817 |
% \end{macro} |
| 1818 |
% \end{macro} |
| 1819 |
% \end{macro} |
| 1820 |
% \end{macro} |
| 1821 |
% |
| 1822 |
% |
| 1823 |
% \subsection{Parallel setting of multilingual text} |
| 1824 |
% |
| 1825 |
% \begin{environment}{par-text} |
| 1826 |
% \begin{macro}{\NRC@enclosingenv} |
| 1827 |
% Syntax: \cs{begin}\verb|{par-text}|\oarg{right language}\oarg{left |
| 1828 |
% width}\oarg{separation}\oarg{right width} |
| 1829 |
% |
| 1830 |
% Set parallel (bilingual) text. |
| 1831 |
% |
| 1832 |
% If \meta{right language} is present, it will be selected as a |
| 1833 |
% language (using Babel commands) in the right column. If \meta{left |
| 1834 |
% width} is present, it will be used as the width of the left column; |
| 1835 |
% otherwise the width will be set to \texttt{15.5pc} (nrc1), or |
| 1836 |
% \texttt{20.75pc} (nrc2). If |
| 1837 |
% \meta{separation} is present, it will be used as the separation |
| 1838 |
% between the two columns; otherwise that separation will be set to |
| 1839 |
% \texttt{1.5pc}. If \meta{right width} is present, it will be used as |
| 1840 |
% the width of the right column; otherwise the width will be set to |
| 1841 |
% \cs{textwidth}\(-\)\meta{left width}\(-\)\meta{separation}. |
| 1842 |
% |
| 1843 |
% Thus the two `standard' ways of using the environment start with the |
| 1844 |
% commands: |
| 1845 |
% \begin{itemize} |
| 1846 |
% \item\verb|\begin{par-text}[french]| |
| 1847 |
% |
| 1848 |
% Which assumes that Babel has been loaded, and that the main language |
| 1849 |
% in the document is English. In this case, the left column will be |
| 1850 |
% in English, the right column in French. |
| 1851 |
% \item\verb|\begin{par-text}[english][17pc]| |
| 1852 |
% |
| 1853 |
% Which assumes that Babel has been loaded, and the surrounding text |
| 1854 |
% is in French. En ce cas, la colonne gauche se presente en fran\c cais, |
| 1855 |
% la colonne droite en anglais. |
| 1856 |
% \end{itemize} |
| 1857 |
% |
| 1858 |
% We start by grabbing the first argument. If it's present, we |
| 1859 |
% transform it to a \textsf{babel} \cs{select@language} command. |
| 1860 |
% (Note that the `natural' \cs{selectlanguage} command would write |
| 1861 |
% language selection guff to the \verb|.aux| file, which causes havoc |
| 1862 |
% with box alignment, so we use the internal command instead.) |
| 1863 |
% \begin{macrocode} |
| 1864 |
\newenvironment{par-text}[1][]{% |
| 1865 |
% \end{macrocode} |
| 1866 |
% |
| 1867 |
% If we're in a two-column class, ensure we've got the full width |
| 1868 |
% available to us\dots |
| 1869 |
% \begin{macrocode} |
| 1870 |
%<*nrc2> |
| 1871 |
\if@twocolumn |
| 1872 |
\BalanceColumns[0.5]% |
| 1873 |
\fi |
| 1874 |
%</nrc2> |
| 1875 |
\def\@rightlanguage{#1}% |
| 1876 |
\ifx\@rightlanguage\@empty |
| 1877 |
\else |
| 1878 |
\edef\@rightlanguage{% |
| 1879 |
\noexpand\select@language{\@rightlanguage}% |
| 1880 |
}% |
| 1881 |
\fi |
| 1882 |
% \end{macrocode} |
| 1883 |
% |
| 1884 |
% Now we set \cs{NRC@enclosingenv} and look for the second, third and |
| 1885 |
% fourth optional arguments. This is boring code indeed\dots |
| 1886 |
% \begin{macrocode} |
| 1887 |
\let\NRC@enclosingenv\@currenvir |
| 1888 |
\@ifnextchar[%] |
| 1889 |
\NRC@partext@a |
| 1890 |
%<nrc1> {\NRC@partext@a[15.5pc][1.5pc][17pc]}% |
| 1891 |
%<nrc2> {\NRC@partext@a[20.75pc][1.5pc][20.75pc]}% |
| 1892 |
}% |
| 1893 |
{\par} |
| 1894 |
% \end{macrocode} |
| 1895 |
% |
| 1896 |
% \cs{NRC@enclosingenv} is set either to \cs{relax} or to the |
| 1897 |
% enclosing \verb|par-text| environment name. |
| 1898 |
% \begin{macrocode} |
| 1899 |
\let\NRC@enclosingenv\relax |
| 1900 |
% \end{macrocode} |
| 1901 |
% \end{macro} |
| 1902 |
% \end{environment} |
| 1903 |
% |
| 1904 |
% Three syntax support commands follow. |
| 1905 |
% |
| 1906 |
% \begin{macro}{\NRC@partext@a} |
| 1907 |
% \begin{macro}{\NRC@par@leftwidth} |
| 1908 |
% Syntax: \cs{NRC@partext@a}\oarg{left |
| 1909 |
% width}\oarg{separation}\oarg{right width} |
| 1910 |
% \begin{macrocode} |
| 1911 |
\def\NRC@partext@a[#1]{% |
| 1912 |
\def\NRC@par@leftwidth{#1}% |
| 1913 |
\@ifnextchar[%] |
| 1914 |
\NRC@partext@b |
| 1915 |
{\NRC@partext@b[1.5pc][\z@]}% |
| 1916 |
} |
| 1917 |
% \end{macrocode} |
| 1918 |
% \end{macro} |
| 1919 |
% \end{macro} |
| 1920 |
% |
| 1921 |
% \begin{macro}{\NRC@partext@b} |
| 1922 |
% \begin{macro}{\NRC@par@separation} |
| 1923 |
% Syntax: \cs{NRC@partext@b}\oarg{separation}\oarg{right width} |
| 1924 |
% \begin{macrocode} |
| 1925 |
\def\NRC@partext@b[#1]{% |
| 1926 |
\def\NRC@par@separation{#1}% |
| 1927 |
\NRC@partext@c |
| 1928 |
} |
| 1929 |
% \end{macrocode} |
| 1930 |
% \end{macro} |
| 1931 |
% \end{macro} |
| 1932 |
% |
| 1933 |
% \begin{macro}{\NRC@partext@c} |
| 1934 |
% \begin{macro}{\NRC@par@rightwidth} |
| 1935 |
% \begin{macro}{\NRC@warning@inconpar} |
| 1936 |
% Syntax: \cs{NRC@partext@c}\oarg{right width} |
| 1937 |
% \begin{macrocode} |
| 1938 |
\newcommand\NRC@partext@c[1][\z@]{% |
| 1939 |
\@tempdima#1\relax |
| 1940 |
\ifdim\@tempdima>\z@ |
| 1941 |
\def\NRC@par@rightwidth{#1}% |
| 1942 |
\@tempdima #1\relax |
| 1943 |
\advance\@tempdima \NRC@par@separation\relax |
| 1944 |
\advance\@tempdima \NRC@par@leftwidth\relax |
| 1945 |
\ifdim\@tempdima > \textwidth |
| 1946 |
\NRC@warning@inconpar |
| 1947 |
\fi |
| 1948 |
\else |
| 1949 |
\@tempdima\textwidth |
| 1950 |
\advance\@tempdima -\NRC@par@leftwidth\relax |
| 1951 |
\advance\@tempdima -\NRC@par@separation\relax |
| 1952 |
\ifdim\@tempdima>\z@ |
| 1953 |
\else |
| 1954 |
\NRC@warning@inconpar |
| 1955 |
\fi |
| 1956 |
\edef\NRC@par@rightwidth{\the\@tempdima}% |
| 1957 |
\fi |
| 1958 |
\NRC@last@parparafalse |
| 1959 |
\par |
| 1960 |
} |
| 1961 |
\def\NRC@warning@inconpar{% |
| 1962 |
\NRC@warning{Inconsistent parameters for environment par-text}% |
| 1963 |
} |
| 1964 |
% \end{macrocode} |
| 1965 |
% \end{macro} |
| 1966 |
% \end{macro} |
| 1967 |
% \end{macro} |
| 1968 |
% |
| 1969 |
% \begin{macro}{\ifNRC@last@parpara} |
| 1970 |
% \begin{macro}{\NRC@last@parparatrue} |
| 1971 |
% \begin{macro}{\NRC@last@parparafalse} |
| 1972 |
% Controlling vertical spacing in between blocks of parallel |
| 1973 |
% paragraphs |
| 1974 |
% \begin{macrocode} |
| 1975 |
\def\NRC@last@parparatrue{\global\let\ifNRC@last@parpara\iftrue} |
| 1976 |
\def\NRC@last@parparafalse{\global\let\ifNRC@last@parpara\iffalse} |
| 1977 |
% \end{macrocode} |
| 1978 |
% \end{macro} |
| 1979 |
% \end{macro} |
| 1980 |
% \end{macro} |
| 1981 |
% |
| 1982 |
% \begin{macro}{\parallelparsep} |
| 1983 |
% \begin{macro}{\NRC@parpara@sep} |
| 1984 |
% Syntax: \cs{parallelparsep}\marg{paragraph separation} |
| 1985 |
% |
| 1986 |
% Sets the separation between paragraphs in a \verb|par-text| |
| 1987 |
% environment to the argument (which is a rubber length) |
| 1988 |
% \begin{macrocode} |
| 1989 |
\newcommand\parallelparsep[1]{\gdef\NRC@parpara@sep{#1}} |
| 1990 |
\parallelparsep{1pc} |
| 1991 |
% \end{macrocode} |
| 1992 |
% \end{macro} |
| 1993 |
% \end{macro} |
| 1994 |
% |
| 1995 |
% Now the original environments for setting left and right columns |
| 1996 |
% separately. |
| 1997 |
% |
| 1998 |
% \begin{environment}{leftcolumn} |
| 1999 |
% \begin{macro}{\ifNRC@firstleftcolumn} |
| 2000 |
% \begin{macro}{\NRC@checknesting} |
| 2001 |
% Set the left-hand column of the bilingual text. The left column is |
| 2002 |
% presumed to be in the base language of the document. |
| 2003 |
% \begin{macrocode} |
| 2004 |
\newif\ifNRC@firstleftcolumn \global\NRC@firstleftcolumntrue |
| 2005 |
\newenvironment{leftcolumn}{% |
| 2006 |
\ifNRC@last@parpara |
| 2007 |
\vskip\NRC@parpara@sep\relax |
| 2008 |
\else |
| 2009 |
\NRC@last@parparatrue |
| 2010 |
\fi |
| 2011 |
\NRC@checknesting |
| 2012 |
\noindent |
| 2013 |
\begin{minipage}[t]{\NRC@par@leftwidth}% |
| 2014 |
\NRC@sectragged |
| 2015 |
\usefont\f@encoding\sfdefault mn% |
| 2016 |
\ifNRC@firstleftcolumn |
| 2017 |
\global\NRC@firstleftcolumnfalse |
| 2018 |
\else |
| 2019 |
\hspace*{\NRC@par@parindent}% |
| 2020 |
\fi |
| 2021 |
\strut\ignorespaces |
| 2022 |
}{% |
| 2023 |
\strut |
| 2024 |
\end{minipage}% |
| 2025 |
\NRC@insertignore\NRC@colsepskip |
| 2026 |
}% |
| 2027 |
\def\NRC@checknesting{% |
| 2028 |
\def\@tempa{par-text}% |
| 2029 |
\ifx\@tempa\NRC@enclosingenv |
| 2030 |
\else |
| 2031 |
\NRC@warning{\@currenvir\space environment may only be used% |
| 2032 |
\MessageBreak |
| 2033 |
within a \@tempa\space environment}% |
| 2034 |
\fi |
| 2035 |
} |
| 2036 |
% \end{macrocode} |
| 2037 |
% \end{macro} |
| 2038 |
% \end{macro} |
| 2039 |
% \end{environment} |
| 2040 |
% |
| 2041 |
% \begin{environment}{rightcolumn} |
| 2042 |
% \begin{macro}{\ifNRC@firstrightcolumn} |
| 2043 |
% Set the right-hand column of the bilingual text. This is set either |
| 2044 |
% in the \meta{right language} (if that argument was given), or in the |
| 2045 |
% base language. |
| 2046 |
% \begin{macrocode} |
| 2047 |
\newif\ifNRC@firstrightcolumn \global\NRC@firstrightcolumntrue |
| 2048 |
\newenvironment{rightcolumn}{% |
| 2049 |
\NRC@checknesting |
| 2050 |
\noindent |
| 2051 |
\begin{minipage}[t]{\NRC@par@rightwidth}% |
| 2052 |
\NRC@sectragged |
| 2053 |
\usefont\f@encoding\sfdefault mn% |
| 2054 |
\@rightlanguage |
| 2055 |
\ifNRC@firstrightcolumn |
| 2056 |
\global\NRC@firstrightcolumnfalse |
| 2057 |
\else |
| 2058 |
\hspace*{\NRC@par@parindent}% |
| 2059 |
\fi |
| 2060 |
\strut\ignorespaces |
| 2061 |
}{% |
| 2062 |
\strut |
| 2063 |
\end{minipage}% |
| 2064 |
\NRC@insertignore\par |
| 2065 |
}% |
| 2066 |
% \end{macrocode} |
| 2067 |
% \end{macro} |
| 2068 |
% \end{environment} |
| 2069 |
% |
| 2070 |
% |
| 2071 |
% \begin{macro}{\NRC@par@parindent} |
| 2072 |
% Simply defined to be the `paragraph' indentation in parallel text |
| 2073 |
% \begin{macrocode} |
| 2074 |
\def\NRC@par@parindent{\@xiipt\p@} |
| 2075 |
% \end{macrocode} |
| 2076 |
% \end{macro} |
| 2077 |
% |
| 2078 |
% \begin{macro}{\NRC@colsepskip} |
| 2079 |
% Syntax: \cs{NRC@colsepskip} |
| 2080 |
% |
| 2081 |
% Skip to separate the columns in a 2-column section. Default is |
| 2082 |
% \texttt{2pc}: this value is programmed into \cs{NRC@par@separation} |
| 2083 |
% at the time the arguments to the \verb|par-para| environment are |
| 2084 |
% decoded |
| 2085 |
% \begin{macrocode} |
| 2086 |
\def\NRC@colsepskip{\hskip\NRC@par@separation\relax} |
| 2087 |
% \end{macrocode} |
| 2088 |
% \end{macro} |
| 2089 |
% |
| 2090 |
% \begin{environment}{par-para} |
| 2091 |
% \begin{macro}{\othercol} |
| 2092 |
% \begin{macro}{\NRC@leftbox} |
| 2093 |
% \begin{macro}{\NRC@rightbox} |
| 2094 |
% Syntax: \cs{begin}\verb|{par-para}| \meta{left text} \cs{othercol} |
| 2095 |
% \meta{right text} \cs{end}\verb|{par-para}| |
| 2096 |
% |
| 2097 |
% Set a pair of paragraphs of parallel text |
| 2098 |
% \begin{macrocode} |
| 2099 |
\newbox\NRC@leftbox |
| 2100 |
\newbox\NRC@rightbox |
| 2101 |
\newenvironment{par-para}{% |
| 2102 |
\ifNRC@last@parpara |
| 2103 |
\vskip\NRC@parpara@sep\relax |
| 2104 |
\else |
| 2105 |
\NRC@last@parparatrue |
| 2106 |
\fi |
| 2107 |
\NRC@checknesting |
| 2108 |
\NRC@ignorespacesandpars\NRC@gatherleft |
| 2109 |
}% |
| 2110 |
% \end{macrocode} |
| 2111 |
% So here we are, with the left paragraph in \cs{NRC@leftbox} and an |
| 2112 |
% unterminated right paragraph being set into \cs{NRC@rightbox} |
| 2113 |
% \begin{macrocode} |
| 2114 |
{% |
| 2115 |
\unskip |
| 2116 |
\egroup |
| 2117 |
% \end{macrocode} |
| 2118 |
% |
| 2119 |
% Now we've got both paragraphs in their boxes, so we have to play |
| 2120 |
% them out into single lines of parallel text. |
| 2121 |
% \begin{macrocode} |
| 2122 |
{% |
| 2123 |
\vbadness\@M |
| 2124 |
\vfuzz5ex |
| 2125 |
\let\@tempa\p@ |
| 2126 |
\par |
| 2127 |
\loop |
| 2128 |
\ifvoid\NRC@leftbox |
| 2129 |
\ifvoid\NRC@rightbox |
| 2130 |
\let\@tempa\z@ |
| 2131 |
\fi |
| 2132 |
\fi |
| 2133 |
\ifdim\@tempa>\z@ |
| 2134 |
\hb@xt@\textwidth{% |
| 2135 |
\vbox{\ifvoid\NRC@leftbox |
| 2136 |
\hrule\@width\NRC@par@leftwidth\@height\z@\@depth\z@ |
| 2137 |
\else |
| 2138 |
\setbox\@tempboxa\vsplit\NRC@leftbox to\p@ |
| 2139 |
\unvbox\@tempboxa |
| 2140 |
\fi}% |
| 2141 |
\NRC@colsepskip |
| 2142 |
\vbox{\ifvoid\NRC@rightbox |
| 2143 |
\hrule\@width\NRC@par@rightwidth\@height\z@\@depth\z@ |
| 2144 |
\else |
| 2145 |
\setbox\@tempboxa\vsplit\NRC@rightbox to\p@ |
| 2146 |
\unvbox\@tempboxa |
| 2147 |
\fi}% |
| 2148 |
}% |
| 2149 |
\repeat |
| 2150 |
}% |
| 2151 |
\par |
| 2152 |
} |
| 2153 |
% \end{macrocode} |
| 2154 |
% |
| 2155 |
% \begin{macro}{NRC@gatherleft} |
| 2156 |
% \cs{NRC@gatherleft} sets up gathering the left column paragraph of a |
| 2157 |
% \verb|par-para| environment into its box. The process is terminated |
| 2158 |
% in \cs{othercol} |
| 2159 |
% \begin{macrocode} |
| 2160 |
\newcommand\NRC@gatherleft{% |
| 2161 |
\setbox\NRC@leftbox\vbox\bgroup |
| 2162 |
\hsize\NRC@par@leftwidth\relax |
| 2163 |
\usefont\f@encoding\sfdefault mn% |
| 2164 |
\noindent |
| 2165 |
\ifNRC@firstleftcolumn |
| 2166 |
\global\NRC@firstleftcolumnfalse |
| 2167 |
\else |
| 2168 |
\hspace*{\NRC@parallelparindent}% |
| 2169 |
\fi |
| 2170 |
\NRC@sectragged |
| 2171 |
}% |
| 2172 |
% \end{macrocode} |
| 2173 |
% |
| 2174 |
% \begin{macro}{\othercol} |
| 2175 |
% \cs{othercol} terminates the collection that \cs{NRC@gatherleft} |
| 2176 |
% started, and then initiates the collection of the right column via |
| 2177 |
% \cs{NRC@gatherright} |
| 2178 |
% paragraph (which collection is completed in the |
| 2179 |
% \cs{end}\verb|{par-para}| `macro'). |
| 2180 |
% \begin{macrocode} |
| 2181 |
\newcommand\othercol{% |
| 2182 |
\unskip |
| 2183 |
\egroup |
| 2184 |
\NRC@ignorespacesandpars\NRC@gatherright |
| 2185 |
} |
| 2186 |
% \end{macrocode} |
| 2187 |
% |
| 2188 |
% \begin{macro}{\NRC@gatherright} |
| 2189 |
% \cs{NRC@gatherright} completes the |par-para| environment, by |
| 2190 |
% initiating collection of the right hand column of the pair, which |
| 2191 |
% collection is terminated in the \cs{end}|{par-para}| `macro' |
| 2192 |
% \begin{macrocode} |
| 2193 |
\newcommand\NRC@gatherright{% |
| 2194 |
\setbox\NRC@rightbox\vbox\bgroup |
| 2195 |
\hsize\NRC@par@rightwidth\relax |
| 2196 |
\usefont\f@encoding\sfdefault mn% |
| 2197 |
\@rightlanguage |
| 2198 |
\noindent |
| 2199 |
\ifNRC@firstrightcolumn |
| 2200 |
\global\NRC@firstrightcolumnfalse |
| 2201 |
\else |
| 2202 |
\hspace*{\NRC@parallelparindent}% |
| 2203 |
\fi |
| 2204 |
\NRC@ignorespacesandpars\NRC@sectragged |
| 2205 |
} |
| 2206 |
% \end{macrocode} |
| 2207 |
% \end{macro} |
| 2208 |
% \end{macro} |
| 2209 |
% \end{macro} |
| 2210 |
% \end{macro} |
| 2211 |
% \end{macro} |
| 2212 |
% \end{macro} |
| 2213 |
% \end{environment} |
| 2214 |
% |
| 2215 |
% \begin{macro}{\NRC@parallelparindent} |
| 2216 |
% Simply defined to be the `paragraph' indentation in parallel text |
| 2217 |
% \begin{macrocode} |
| 2218 |
\def\NRC@parallelparindent{10\p@} |
| 2219 |
% \end{macrocode} |
| 2220 |
% \end{macro} |
| 2221 |
% |
| 2222 |
% |
| 2223 |
% \subsection{Full-width intervals in two-column papers} |
| 2224 |
% |
| 2225 |
% Naturally, this code is not provided in the one-column class, just |
| 2226 |
% the 2-column class and the column-balancing package. |
| 2227 |
% \begin{macrocode} |
| 2228 |
%</nrc1cls|nrc2cls> |
| 2229 |
%<*nrc2cls|balance> |
| 2230 |
% \end{macrocode} |
| 2231 |
% |
| 2232 |
% \begin{macro}{\BalanceColumns} |
| 2233 |
% \begin{macro}{\@tempboxb} |
| 2234 |
% |
| 2235 |
% Syntax: \cs{BalanceColumns}\oarg{epsilon} |
| 2236 |
% |
| 2237 |
% Balances what's left as contributions to the final page, subject to |
| 2238 |
% fudge-factor \emph{epsilon} in the final balancing: the default |
| 2239 |
% factor is \texttt{0.5}, and it's multiplied by \cs{baselineskip} and |
| 2240 |
% then added to the `target' height of the left column which is passed |
| 2241 |
% to the \cs{vsplit} primitive |
| 2242 |
% |
| 2243 |
% A spare temporary box, needed for \cs{BalanceColumns}~\dots\ or could |
| 2244 |
% we use \cs{@holdpg}? |
| 2245 |
% \begin{macrocode} |
| 2246 |
\newbox\@tempboxb |
| 2247 |
% \end{macrocode} |
| 2248 |
% |
| 2249 |
% \begin{macrocode} |
| 2250 |
\newcommand\BalanceColumns[1][0.5]{% |
| 2251 |
% \end{macrocode} |
| 2252 |
% |
| 2253 |
% ensure we're in vertical mode |
| 2254 |
% \begin{macrocode} |
| 2255 |
\par |
| 2256 |
% \end{macrocode} |
| 2257 |
% |
| 2258 |
% insert a zero penalty to ensure that the penultimate page is output |
| 2259 |
% properly |
| 2260 |
% \begin{macrocode} |
| 2261 |
\penalty\z@ |
| 2262 |
% \end{macrocode} |
| 2263 |
% |
| 2264 |
% define a dummy output routine for gathering up what's left at the |
| 2265 |
% end of the last page: |
| 2266 |
% \begin{macrocode} |
| 2267 |
\def\@dummy@balance@output{% |
| 2268 |
\if@firstcolumn |
| 2269 |
\ifx\@toplist\@empty |
| 2270 |
\global\setbox\@tempboxa \vbox{\unvbox\@cclv}% |
| 2271 |
\else |
| 2272 |
% 1. (?) get rid of \topskip glue at the top of \@cclv |
| 2273 |
% 2. insert the top float(s) and the appropriate separations |
| 2274 |
% 3. adjust \@colroom and so on |
| 2275 |
\global\setbox\@tempboxa \vbox{% |
| 2276 |
\@tempswatrue |
| 2277 |
\NRC@return@floats\@toplist\@toproom\@topnum\@empty |
| 2278 |
\vspace\textfloatsep |
| 2279 |
\unvbox\@cclv |
| 2280 |
}% |
| 2281 |
% 4. (?) warn about potential problems? |
| 2282 |
% ... or ... |
| 2283 |
% moan about the thing being there in the first place? |
| 2284 |
\fi |
| 2285 |
\else |
| 2286 |
% \end{macrocode} |
| 2287 |
% |
| 2288 |
% we were in the right-hand column, so box 255 has (at this stage) got |
| 2289 |
% a \cs{topskip} glue in it (which we definitely don't want), so we |
| 2290 |
% stick in a penalty and \cs{vsplit} if off again, which loses the |
| 2291 |
% glue for us\dots |
| 2292 |
% \begin{macrocode} |
| 2293 |
\setbox\@cclv \vbox{% |
| 2294 |
\penalty-\@M |
| 2295 |
\unvbox\@cclv}% |
| 2296 |
\splittopskip\topskip |
| 2297 |
\splitmaxdepth\maxdepth |
| 2298 |
\setbox\@tempboxa \vsplit\@cclv to\z@ |
| 2299 |
% \end{macrocode} |
| 2300 |
% |
| 2301 |
% now reassemble the two columns into one, in \cs{@tempboxa} |
| 2302 |
% \begin{macrocode} |
| 2303 |
\ifx\@toplist\@empty |
| 2304 |
% insert top floats in the right column here? |
| 2305 |
% ... or ... |
| 2306 |
\else |
| 2307 |
% moan at their very existence? |
| 2308 |
%<balance> \PackageWarning{baltools}{% |
| 2309 |
%<nrc2> \NRC@warning{% |
| 2310 |
Top float(s) (2nd column) lost in balancing}% |
| 2311 |
\@tempswafalse |
| 2312 |
\NRC@return@floats\@toplist\@toproom\@topnum\@empty |
| 2313 |
\fi |
| 2314 |
\global\setbox\@tempboxa \vbox{% |
| 2315 |
\unvbox\@leftcolumn |
| 2316 |
\unskip |
| 2317 |
\unvbox\@cclv}% |
| 2318 |
\fi |
| 2319 |
}% |
| 2320 |
% \end{macrocode} |
| 2321 |
% |
| 2322 |
% now check if there are outstanding floats, and moan if so (I'm not |
| 2323 |
% in the slightest particular sure whether the presence of floats can |
| 2324 |
% be dealt with at all without major restructuring, so we complain |
| 2325 |
% instead\dots). |
| 2326 |
% |
| 2327 |
% Note, we \emph{don't}, now, complain about deferred floats (they're |
| 2328 |
% the user's problem), but bottom floats have me stumped. (In-text |
| 2329 |
% floats have already been committed by the time we get to this stage, |
| 2330 |
% and it's acceptable simply to return them): |
| 2331 |
% \begin{macrocode} |
| 2332 |
\ifx\@botlist\@empty\else |
| 2333 |
%<balance> \PackageWarning{baltools}{% |
| 2334 |
%<nrc2> \NRC@warning{% |
| 2335 |
Bottom floats outstanding when balancing may be lost\MessageBreak |
| 2336 |
What's more, balancing may be invalid}% |
| 2337 |
\fi |
| 2338 |
\xdef\@freelist{\@freelist\@midlist} |
| 2339 |
% \end{macrocode} |
| 2340 |
% |
| 2341 |
% Acquire the output contributions so far, by exercising our little |
| 2342 |
% dummy output routine |
| 2343 |
% \begin{macrocode} |
| 2344 |
{% |
| 2345 |
\output{\@dummy@balance@output}% |
| 2346 |
\eject |
| 2347 |
}% |
| 2348 |
% \end{macrocode} |
| 2349 |
% |
| 2350 |
% Establish the total height of the boxes we've thereby acquired |
| 2351 |
% \begin{macrocode} |
| 2352 |
{% |
| 2353 |
\@tempdima .5\ht\@tempboxa |
| 2354 |
\advance\@tempdima .5\dp\@tempboxa |
| 2355 |
\splittopskip\topskip |
| 2356 |
\splitmaxdepth\maxdepth |
| 2357 |
%<balance> \PackageInfo{baltools}{% |
| 2358 |
%<nrc2> \ClassInfo\NRC@clsname{% |
| 2359 |
\string\BalanceColumns: total height of page is |
| 2360 |
\the\@tempdima\space--\MessageBreak |
| 2361 |
\string\vsplit\space to half of that |
| 2362 |
(plus #1\string\baselineskip)}% |
| 2363 |
\advance\@tempdima #1\baselineskip |
| 2364 |
\vbadness\@M |
| 2365 |
\setbox\@tempboxb \vsplit\@tempboxa to\@tempdima |
| 2366 |
% \end{macrocode} |
| 2367 |
% |
| 2368 |
% Log what we've done\dots |
| 2369 |
% \begin{macrocode} |
| 2370 |
%<balance> \PackageInfo{baltools}{% |
| 2371 |
%<nrc2> \ClassInfo\NRC@clsname{% |
| 2372 |
Column balance: left column height |
| 2373 |
\the\ht\@tempboxb+\the\dp\@tempboxb |
| 2374 |
\MessageBreak |
| 2375 |
right column height \the\ht\@tempboxa+\the\dp\@tempboxa}% |
| 2376 |
% \end{macrocode} |
| 2377 |
% |
| 2378 |
% Reassemble the two columns we now have into the `top of the page' |
| 2379 |
% \begin{macrocode} |
| 2380 |
\@tempdima \ht\@tempboxa |
| 2381 |
\advance\@tempdima \dp\@tempboxa |
| 2382 |
\dimen@ \ht\@tempboxb |
| 2383 |
\advance\dimen@ \dp\@tempboxb |
| 2384 |
\ifdim \dimen@ < \@tempdima |
| 2385 |
\dimen@ \@tempdima |
| 2386 |
\fi |
| 2387 |
\global\setbox\@tempboxa \vbox {% |
| 2388 |
\ifx\@dbltoplist\@empty |
| 2389 |
\else |
| 2390 |
\@tempswatrue |
| 2391 |
\NRC@return@floats\@dbltoplist\@dbltoproom\@dbltopnum{dbl}% |
| 2392 |
\vspace\dbltextfloatsep |
| 2393 |
\fi |
| 2394 |
\hb@xt@\textwidth {% |
| 2395 |
\hb@xt@\columnwidth {% |
| 2396 |
\vbox to\dimen@{% |
| 2397 |
\unvbox\@tempboxb |
| 2398 |
\vfill |
| 2399 |
}% |
| 2400 |
\hss |
| 2401 |
}% |
| 2402 |
\hfill |
| 2403 |
\vrule \@width\columnseprule |
| 2404 |
\hfill |
| 2405 |
\hb@xt@\columnwidth {% |
| 2406 |
\vbox to\dimen@{% |
| 2407 |
\unvbox\@tempboxa |
| 2408 |
\vfill |
| 2409 |
}% |
| 2410 |
\hss |
| 2411 |
}% |
| 2412 |
}% |
| 2413 |
}% |
| 2414 |
% \end{macrocode} |
| 2415 |
% |
| 2416 |
% Preserve the value of the \cs{columnwidth} for use in the |
| 2417 |
% \cs{*ColumnBar} commands |
| 2418 |
% \begin{macrocode} |
| 2419 |
\xdef\NRC@narrow@width{\the\columnwidth} |
| 2420 |
% \end{macrocode} |
| 2421 |
% |
| 2422 |
% We now have the two columns, nestling happily together, in (global) |
| 2423 |
% \cs{@tempboxa}, so we simulate a \cs{onecolumn} command, so that we |
| 2424 |
% can proceed as if we've now given up on this two column game\dots |
| 2425 |
% \begin{macrocode} |
| 2426 |
\global\columnwidth\textwidth |
| 2427 |
\global\hsize\columnwidth |
| 2428 |
\global\linewidth\columnwidth |
| 2429 |
\global\@twocolumnfalse |
| 2430 |
\col@number \@ne |
| 2431 |
% \end{macrocode} |
| 2432 |
% |
| 2433 |
% Finally, dump the contents of the \@tempboxa we prepared earlier |
| 2434 |
% into this new one-columned environment |
| 2435 |
% \begin{macrocode} |
| 2436 |
\unvbox\@tempboxa |
| 2437 |
}% |
| 2438 |
} |
| 2439 |
% \end{macrocode} |
| 2440 |
% |
| 2441 |
% \end{macro} |
| 2442 |
% \end{macro} |
| 2443 |
% |
| 2444 |
% \begin{macro}{\NRC@return@floats} |
| 2445 |
% Syntax: \cs{NRC@return@floats}\marg{flt list}\marg{flt room}^^A |
| 2446 |
% \marg{flt cnt}\marg{dbl ind} |
| 2447 |
% |
| 2448 |
% `Return' a list of floats that existed for the present page, and |
| 2449 |
% recover the space they would have occupied in the present column; |
| 2450 |
% note that since this operation redefines the float list \cs{@elt} |
| 2451 |
% macro, it operates inside a group, and all its external actions need |
| 2452 |
% to be done \cs{global}. \cs{if@tempswa}, the body(ies) of the |
| 2453 |
% float(s) is(are) inserted; otherwise they're simply lost. It is the |
| 2454 |
% responsibility of the calling routine to add \cs{textfloatsep} (or |
| 2455 |
% whatever), where necessary, to ensure the floats are properly |
| 2456 |
% positioned with respect to the rest of the matter in the column. |
| 2457 |
% |
| 2458 |
% The \meta{dble ind} parameter is either \verb'dbl' (if we're |
| 2459 |
% returning a double-top list) or empty (it's used to determine which |
| 2460 |
% separation to use in calculations (and in the case of returning |
| 2461 |
% multiple floats, even when making inter-float skips) |
| 2462 |
% \begin{macrocode} |
| 2463 |
\newcommand{\NRC@return@floats}[4]{{% |
| 2464 |
% \end{macrocode} |
| 2465 |
% |
| 2466 |
% \cs{@elt} macro for returning the first float in the list. Note |
| 2467 |
% that it doesn't insert any separation of its own\dots |
| 2468 |
% \begin{macrocode} |
| 2469 |
\def\@elt##1{% |
| 2470 |
\global\advance#3\@ne |
| 2471 |
\global\advance\@colnum\@ne |
| 2472 |
\@tempdima\ht##1% |
| 2473 |
\advance\@tempdima\dp##1% |
| 2474 |
\advance\@tempdima\csname#4textfloatsep\endcsname |
| 2475 |
\csname NRC@advance@#4colspace\endcsname{#2}% |
| 2476 |
\if@tempswa\vbox{\unvbox##1}\fi |
| 2477 |
% \end{macrocode} |
| 2478 |
% |
| 2479 |
% now the \cs{@elt} macro for returning subsequent floats in the |
| 2480 |
% list. Since we know that at least one float has already been added, |
| 2481 |
% we insert \cs{\#4floatsep} before inserting the float's actual body. |
| 2482 |
% \begin{macrocode} |
| 2483 |
\def\@elt####1{% |
| 2484 |
\global\advance#3\@ne |
| 2485 |
\global\advance\@colnum\@ne |
| 2486 |
\@tempdima\ht####1% |
| 2487 |
\advance\@tempdima\dp####1% |
| 2488 |
\advance\@tempdima\csname#4floatsep\endcsname |
| 2489 |
\csname NRC@advance@#4colspace\endcsname{#2}% |
| 2490 |
\if@tempswa |
| 2491 |
\vskip\csname#4floatsep\endcsname% |
| 2492 |
\vbox{\unvbox####1}% |
| 2493 |
\fi |
| 2494 |
}% |
| 2495 |
}% |
| 2496 |
% \end{macrocode} |
| 2497 |
% |
| 2498 |
% Now we simply execute the list, and it will self-insert. |
| 2499 |
% \begin{macrocode} |
| 2500 |
#1% |
| 2501 |
}% |
| 2502 |
% \end{macrocode} |
| 2503 |
% |
| 2504 |
% Having closed the group in which \cs{@elt} was defined, we can |
| 2505 |
% safely do the following to return the list to the free list, since |
| 2506 |
% \cs{@elt} \emph{should} always be \cs{let} to \cs{relax} |
| 2507 |
% \begin{macrocode} |
| 2508 |
\let\@elt\relax |
| 2509 |
\xdef\@freelist{\@freelist#1}% |
| 2510 |
\xdef#1{}% |
| 2511 |
\global\vsize\@colroom |
| 2512 |
} |
| 2513 |
% \end{macrocode} |
| 2514 |
% \end{macro} |
| 2515 |
% |
| 2516 |
% |
| 2517 |
% \begin{macro}{\NRC@advance@colspace} |
| 2518 |
% \begin{macro}{\NRC@advance@dblcolspace} |
| 2519 |
% |
| 2520 |
% Add \cs{@tempdima} to the space available in the column(s). The |
| 2521 |
% version for double-column floats also restores space to \cs{@colht}. |
| 2522 |
% \begin{macrocode} |
| 2523 |
\newcommand{\NRC@advance@colspace}[1]{% |
| 2524 |
\global\advance\@colroom\@tempdima |
| 2525 |
\global\advance#1\@tempdima |
| 2526 |
} |
| 2527 |
\newcommand{\NRC@advance@dblcolspace}[1]{% |
| 2528 |
\global\advance\@colroom\@tempdima |
| 2529 |
\global\advance#1\@tempdima |
| 2530 |
\global\advance\@colht\@tempdima |
| 2531 |
% \end{macrocode} |
| 2532 |
% |
| 2533 |
% \cs{@topnum} gets advanced in the \cs{@elt} macros and shouldn't be |
| 2534 |
% in this case |
| 2535 |
% \begin{macrocode} |
| 2536 |
\global\advance\@topnum\m@ne |
| 2537 |
} |
| 2538 |
% \end{macrocode} |
| 2539 |
% \end{macro} |
| 2540 |
% \end{macro} |
| 2541 |
% |
| 2542 |
% Now code for restarting double columns\dots |
| 2543 |
% |
| 2544 |
% \begin{macro}{\RestartDouble} |
| 2545 |
% |
| 2546 |
% \begin{macrocode} |
| 2547 |
\newcommand{\RestartDouble}{% |
| 2548 |
\penalty\z@ |
| 2549 |
{% |
| 2550 |
\output{\NRC@gather@top} |
| 2551 |
\vfill |
| 2552 |
\eject |
| 2553 |
}% |
| 2554 |
\twocolumn[\unvbox\@tempboxb]% |
| 2555 |
\NRC@restorefootskip |
| 2556 |
} |
| 2557 |
% \end{macrocode} |
| 2558 |
% \end{macro} |
| 2559 |
% |
| 2560 |
% \begin{environment}{FullWidth} |
| 2561 |
% Syntax: \cs{begin}\verb'{FullWidth}'\oarg{epsilon} |
| 2562 |
% |
| 2563 |
% This environment encapsulates \cs{BalanceColumns} and |
| 2564 |
% \cs{RestartDouble} in a single user-friendly, hyper-buzz-word, |
| 2565 |
% package. |
| 2566 |
% |
| 2567 |
% The optional \emph{epsilon} argument is the same as that to |
| 2568 |
% \cs{BalanceColumns} and should not ordinarily be required. |
| 2569 |
% \begin{macrocode} |
| 2570 |
\newenvironment{FullWidth}[1][0.5]% |
| 2571 |
{\BalanceColumns[#1]}% |
| 2572 |
{\RestartDouble} |
| 2573 |
% \end{macrocode} |
| 2574 |
% \end{environment} |
| 2575 |
% |
| 2576 |
% \begin{macro}{\NRC@gather@top} |
| 2577 |
% |
| 2578 |
% Another dummy output routine, whose sole task is to salt away the |
| 2579 |
% contents of a (nominally) single-column output-page-so-far |
| 2580 |
% \begin{macrocode} |
| 2581 |
\newcommand{\NRC@gather@top}{% |
| 2582 |
\global\setbox\@tempboxb\vbox{\unvbox\@cclv}% |
| 2583 |
} |
| 2584 |
% \end{macrocode} |
| 2585 |
% \end{macro} |
| 2586 |
% |
| 2587 |
% \begin{macro}{\LeftColumnBar} |
| 2588 |
% \begin{macro}{\RightColumnBar} |
| 2589 |
% |
| 2590 |
% \cs{LeftColumnBar} and \cs{RightColumnBar} place bars across |
| 2591 |
% columns, as are required to separate the two-column portion of the |
| 2592 |
% text from interposed full-width material. They are to be used |
| 2593 |
% \emph{within} the full-width material, in vertical mode |
| 2594 |
% \begin{macrocode} |
| 2595 |
\newcommand{\LeftColumnBar}{% |
| 2596 |
\addvspace{0.75\baselineskip}% |
| 2597 |
\hbox{\rule{\NRC@narrow@width}{\p@}}% |
| 2598 |
\addvspace{0.75\baselineskip}% |
| 2599 |
} |
| 2600 |
\newcommand{\RightColumnBar}{% |
| 2601 |
\par |
| 2602 |
\addvspace{0.75\baselineskip}% |
| 2603 |
\hb@xt@\textwidth{\hfill\rule{\NRC@narrow@width}{\p@}}% |
| 2604 |
\addvspace{0.75\baselineskip}% |
| 2605 |
} |
| 2606 |
% \end{macrocode} |
| 2607 |
% \end{macro} |
| 2608 |
% \end{macro} |
| 2609 |
% |
| 2610 |
% \begin{environment}{WideText} |
| 2611 |
% \begin{macro}{\NRC@widetext@i} |
| 2612 |
% \begin{macro}{\NRC@widetext@ii} |
| 2613 |
% |
| 2614 |
% Syntax: \verb'\begin{WideText}'\oarg{left indent}\oarg{right indent} |
| 2615 |
% |
| 2616 |
% The \verb'WideText' environment allows variation of the text margins |
| 2617 |
% for a short period. It will typically be used to narrow the right |
| 2618 |
% margin of full-width text in the two-column style, hence the default |
| 2619 |
% values for the argument of \emph{left}:~\verb'0pc', |
| 2620 |
% \emph{right}:~\verb'3pc'. |
| 2621 |
% |
| 2622 |
% \begin{macrocode} |
| 2623 |
\newenvironment{WideText}{% |
| 2624 |
\@testopt{\NRC@widetext@i}{\z@}% |
| 2625 |
}{% |
| 2626 |
\endlist |
| 2627 |
} |
| 2628 |
\def\NRC@widetext@i[#1]{% |
| 2629 |
\@testopt{\NRC@widetext@ii{#1}}{3pc}% |
| 2630 |
} |
| 2631 |
\def\NRC@widetext@ii#1[#2]{% |
| 2632 |
\list{}{% |
| 2633 |
\topsep\z@ |
| 2634 |
\leftmargin#1\relax |
| 2635 |
\rightmargin#2\relax |
| 2636 |
\listparindent\parindent |
| 2637 |
\parsep\parskip |
| 2638 |
}% |
| 2639 |
\item[]% |
| 2640 |
} |
| 2641 |
% \end{macrocode} |
| 2642 |
% \end{macro} |
| 2643 |
% \end{macro} |
| 2644 |
% \end{environment} |
| 2645 |
% |
| 2646 |
% \noindent At the going down of the sun, and in the morning, we will |
| 2647 |
% remember them. |
| 2648 |
% |
| 2649 |
% \noindent 11:02 {\small GMT\@}, 8\textsuperscript{th} November |
| 2650 |
% 1998 (Remembrance Sunday). |
| 2651 |
% \begin{macrocode} |
| 2652 |
%</nrc2cls|balance> |
| 2653 |
%<*nrc1cls|nrc2cls> |
| 2654 |
% \end{macrocode} |
| 2655 |
% |
| 2656 |
% |
| 2657 |
% \subsection{Other miscellaneous layout} |
| 2658 |
% |
| 2659 |
% \begin{macro}{\frenchspacing} |
| 2660 |
% We use \cs{frenchspacing} throughout. Fortunately, \textsf{babel} |
| 2661 |
% respects our wishes, and doesn't reset \cs{nonfrenchspacing} every |
| 2662 |
% time we select English from within French. (\textsf{babel} accords |
| 2663 |
% English a haughty position whereby every other language is required |
| 2664 |
% to restore the original English state, so that the selection of |
| 2665 |
% English doesn't give us a problem here.) |
| 2666 |
% \begin{macrocode} |
| 2667 |
\frenchspacing |
| 2668 |
% \end{macrocode} |
| 2669 |
% \end{macro} |
| 2670 |
% |
| 2671 |
% \begin{macro}{\parindent} |
| 2672 |
% Paragraph indentation is smaller than normal in the the two-column |
| 2673 |
% classes: |
| 2674 |
% \begin{macrocode} |
| 2675 |
%<*nrc2> |
| 2676 |
\parindent 10pt |
| 2677 |
% \end{macrocode} |
| 2678 |
% \end{macro} |
| 2679 |
% |
| 2680 |
% \begin{macro}{\parskip} |
| 2681 |
% And the inter-paragraph skip contributes to the stretchability of |
| 2682 |
% vertical lists: |
| 2683 |
% \begin{macrocode} |
| 2684 |
\parskip 0pt plus 2pt |
| 2685 |
%</nrc2> |
| 2686 |
% \end{macrocode} |
| 2687 |
% \end{macro} |
| 2688 |
% |
| 2689 |
% |
| 2690 |
% \section{Support macros} |
| 2691 |
% |
| 2692 |
% Pseudo-counters are implemented in \cs{NRC@c@*} macros. The |
| 2693 |
% following bits of code manipulate these macros. We refer to these |
| 2694 |
% things via the name part (the |*|, as it were). |
| 2695 |
% |
| 2696 |
% \begin{macro}{\NRC@definecounter} |
| 2697 |
% Syntax: \cs{NRC@definecounter}\marg{macro-name} |
| 2698 |
% |
| 2699 |
% \cs{NRC@definecounter} creates and zeroes a counter macro |#1|: |
| 2700 |
% \begin{macrocode} |
| 2701 |
\newcommand\NRC@definecounter[1]{% |
| 2702 |
\global\expandafter\newcommand\csname NRC@c@#1\endcsname{0}} |
| 2703 |
% \end{macrocode} |
| 2704 |
% \end{macro} |
| 2705 |
% |
| 2706 |
% \begin{macro}{\NRC@addtocounter} |
| 2707 |
% Syntax: \cs{NRC@addtocounter}\marg{macro-name}\marg{increment} |
| 2708 |
% |
| 2709 |
% \cs{NRC@addtocounter} adds |#2| to counter macro |#1|: |
| 2710 |
% \begin{macrocode} |
| 2711 |
\newcommand\NRC@addtocounter[2]{\bgroup |
| 2712 |
\expandafter\@tempcnta\csname NRC@c@#1\endcsname\relax |
| 2713 |
\advance\@tempcnta#2\relax |
| 2714 |
\expandafter\xdef\csname NRC@c@#1\endcsname{\the\@tempcnta}% |
| 2715 |
\egroup |
| 2716 |
} |
| 2717 |
% \end{macrocode} |
| 2718 |
% \end{macro} |
| 2719 |
% |
| 2720 |
% \begin{macro}{\NRC@stepcounter} |
| 2721 |
% Syntax: \cs{NRC@stepcounter}\marg{counter-name} |
| 2722 |
% |
| 2723 |
% Advance a counter by 1 |
| 2724 |
% \begin{macrocode} |
| 2725 |
\newcommand\NRC@stepcounter[1]{\NRC@addtocounter{#1}1} |
| 2726 |
% \end{macrocode} |
| 2727 |
% \end{macro} |
| 2728 |
% |
| 2729 |
% \begin{macro}{\if@NRCcounter} |
| 2730 |
% Syntax: |
| 2731 |
% \cs{if@NRCcounter}\marg{counter-name}\meta{condition}\meta{integer-value} |
| 2732 |
% |
| 2733 |
% \cs{if@NRCcounter} establishes an \cs{ifnum} test on the contents of |
| 2734 |
% a counter |
| 2735 |
% \begin{macrocode} |
| 2736 |
\newcommand\if@NRCcounter[1]{\expandafter\ifnum\csname |
| 2737 |
NRC@c@#1\endcsname} |
| 2738 |
% \end{macrocode} |
| 2739 |
% \end{macro} |
| 2740 |
% |
| 2741 |
% \begin{macro}{\NRC@valcounter} |
| 2742 |
% Syntax: \cs{NRC@valcounter}\marg{counter-name} |
| 2743 |
% |
| 2744 |
% \cs{NRC@valcounter} simply inserts the value of a counter into the |
| 2745 |
% token stream |
| 2746 |
% \begin{macrocode} |
| 2747 |
\newcommand\NRC@valcounter[1]{\csname NRC@c@#1\endcsname} |
| 2748 |
% \end{macrocode} |
| 2749 |
% \end{macro} |
| 2750 |
% |
| 2751 |
% \begin{macro}{\NRC@condgobble} |
| 2752 |
% Syntax: \cs{NRC@condgobble}\marg{ignore}, or just |
| 2753 |
% \cs{NRC@condgobble} |
| 2754 |
% |
| 2755 |
% \cs{NRC@condgobble} looks to see if it's got an `argument' and if |
| 2756 |
% so, gobbles it |
| 2757 |
% \begin{macrocode} |
| 2758 |
\def\NRC@condgobble{\futurelet\reserved@a\NRC@relayto@gobble} |
| 2759 |
\def\NRC@relayto@gobble{\ifx\reserved@a\bgroup\expandafter\@gobble\fi} |
| 2760 |
% \end{macrocode} |
| 2761 |
% \end{macro} |
| 2762 |
% |
| 2763 |
% A few odds and ends for the parallel-text setting\dots |
| 2764 |
% |
| 2765 |
% \begin{macro}{\NRC@insertignore} |
| 2766 |
% \begin{macro}{\@@ignorespaces} |
| 2767 |
% Syntax: \cs{NRC@insertignore}\marg{execute next} |
| 2768 |
% |
| 2769 |
% Insert \cs{NRC@ignorespacesandpars}\marg{execute next} after the |
| 2770 |
% current environment by mucking about with \cs{if@ignore} and |
| 2771 |
% \cs{ignorespaces} |
| 2772 |
% \begin{macrocode} |
| 2773 |
\newcommand\NRC@insertignore[1]{% |
| 2774 |
\@ignoretrue |
| 2775 |
\gdef\ignorespaces{% |
| 2776 |
\global\let\ignorespaces\@@ignorespaces |
| 2777 |
\def\@tempa{\NRC@ignorespacesandpars{#1}}% |
| 2778 |
\expandafter\@tempa |
| 2779 |
}% |
| 2780 |
} |
| 2781 |
\let\@@ignorespaces\ignorespaces |
| 2782 |
% \end{macrocode} |
| 2783 |
% \end{macro} |
| 2784 |
% \end{macro} |
| 2785 |
% |
| 2786 |
% \begin{macro}{\NRC@ignorespacesandpars} |
| 2787 |
% Syntax: \cs{NRC@ignorespacesandpars}\marg{execute next} |
| 2788 |
% |
| 2789 |
% Ignore any blank space following the present environment, then |
| 2790 |
% ignore any \cs{par} tokens, then execute our argument |
| 2791 |
% \begin{macrocode} |
| 2792 |
\newcommand\NRC@ignorespacesandpars[1]{% |
| 2793 |
\def\@tempb\par{\@tempa}% |
| 2794 |
\def\@tempa{\@long@ifnextchar\par\@tempb{#1}}% |
| 2795 |
\@tempa |
| 2796 |
} |
| 2797 |
% \end{macrocode} |
| 2798 |
% \end{macro} |
| 2799 |
% |
| 2800 |
% \begin{macro}{\@long@ifnextchar} |
| 2801 |
% Syntax: \cs{@long@ifnextchar}\marg{token}\marg{match}\marg{no match} |
| 2802 |
% |
| 2803 |
% As \cs{@ifnextchar} (from which the code is derived), but |
| 2804 |
% \marg{token} is allowed to be \cs{par}\dots |
| 2805 |
% \begin{macrocode} |
| 2806 |
\long\def\@long@ifnextchar#1#2#3{% |
| 2807 |
\let\reserved@d=#1% |
| 2808 |
\def\reserved@a{#2}\def\reserved@b{#3}% |
| 2809 |
\futurelet\@let@token\@ifnch} |
| 2810 |
% \end{macrocode} |
| 2811 |
% \end{macro} |
| 2812 |
% |
| 2813 |
% \begin{macro}{\NRC@stripdef} |
| 2814 |
% \begin{macro}{\NRC@stripdef@} |
| 2815 |
% Syntax: \cs{NRC@stripdef}\cs{\emph{defining}}\cs{\emph{defined}} |
| 2816 |
% |
| 2817 |
% Strip the defnition of \cs{\emph{defined}} from the definition of |
| 2818 |
% \cs{captions\meta{defining}}, if it proves that |
| 2819 |
% \cs{captions\meta{defining}} actually exists |
| 2820 |
% \begin{macrocode} |
| 2821 |
\newcommand\NRC@stripdef[2]{% |
| 2822 |
\@ifundefined{captions#1}{}{% |
| 2823 |
\def\NRC@stripdef@##1\def#2##2##3\NRC@stripdef@{% |
| 2824 |
\@namedef{captions#1}{##1##3}% |
| 2825 |
}% |
| 2826 |
\edef\@tempa{\noexpand\expandafter |
| 2827 |
\noexpand\NRC@stripdef@ |
| 2828 |
\expandafter\noexpand\csname captions#1\endcsname |
| 2829 |
\noexpand\NRC@stripdef@ |
| 2830 |
}% |
| 2831 |
\@tempa |
| 2832 |
}% |
| 2833 |
} |
| 2834 |
% \end{macrocode} |
| 2835 |
% \end{macro} |
| 2836 |
% \end{macro} |
| 2837 |
% |
| 2838 |
% |
| 2839 |
% \section{Titles and origins} |
| 2840 |
% |
| 2841 |
% \subsection{Title material} |
| 2842 |
% |
| 2843 |
% The number of authors is a counter macro; it is used as an index in |
| 2844 |
% the author number definitions, too: |
| 2845 |
% \begin{macrocode} |
| 2846 |
\NRC@definecounter{author} |
| 2847 |
% \end{macrocode} |
| 2848 |
% |
| 2849 |
% \begin{macro}{\author} |
| 2850 |
% \begin{macro}{\@NRC@dblauthor} |
| 2851 |
% Syntax: \cs{author}\oarg{author initials}\marg{author name} |
| 2852 |
% |
| 2853 |
% A new author is defined by the \cs{author} macro. The mandatory |
| 2854 |
% argument is the author's `full' name; the optional argument gives |
| 2855 |
% the author's name in abbreviated form, which will be used in the |
| 2856 |
% IDbox on the title page in place of the full name.\footnote{In |
| 2857 |
% principal, this short name could be used to derive an author |
| 2858 |
% `list' for the running head (saving the editor the use of the |
| 2859 |
% \cs{shortauthor} command if there are sufficiently few authors) |
| 2860 |
% but this facility has not yet been implemented.} |
| 2861 |
% \begin{macrocode} |
| 2862 |
\renewcommand\author{\@dblarg\@NRC@dblauthor} |
| 2863 |
\newcommand\@NRC@dblauthor[2][]{% |
| 2864 |
\if@NRCcounter{author}>0 |
| 2865 |
\expandafter\ifx\csname NRC@addr\NRC@c@author\endcsname\relax |
| 2866 |
% \end{macrocode} |
| 2867 |
% |
| 2868 |
% If no address was given for the previous author, things are going to |
| 2869 |
% fall apart unless we allocate a (spurious) one. |
| 2870 |
% \begin{macrocode} |
| 2871 |
\NRC@warning{No address given for author \NRC@c@author}% |
| 2872 |
\address{(\emph{\texttt{address missing}})}% |
| 2873 |
\fi |
| 2874 |
\fi |
| 2875 |
\let\NRC@tempb\NRC@c@author% |
| 2876 |
\NRC@stepcounter{author}% |
| 2877 |
\NRC@definecounter{AN\NRC@c@author} |
| 2878 |
\@namedef{NRC@author\NRC@c@author}{#2}% |
| 2879 |
\@namedef{NRC@initialsonly\NRC@c@author}{#1}% |
| 2880 |
\ifnum\NRC@tempb=0 |
| 2881 |
% \end{macrocode} |
| 2882 |
% |
| 2883 |
% We explicitly \cs{let} the first address to \cs{relax}, in case that |
| 2884 |
% we're on the second or subsequent paper of an issue of the journal: |
| 2885 |
% otherwise, we're in danger of picking up an address from the |
| 2886 |
% previous paper in the error case where the address has been omitted. |
| 2887 |
% \begin{macrocode} |
| 2888 |
\expandafter\let\csname NRC@addr\NRC@c@author\endcsname\relax |
| 2889 |
\else |
| 2890 |
% \end{macrocode} |
| 2891 |
% |
| 2892 |
% Otherwise, we start by assuming that the address is the same as that |
| 2893 |
% of the previous author. An explicit address command is needed |
| 2894 |
% somewhere or other, though. (Of course\dots) |
| 2895 |
% \begin{macrocode} |
| 2896 |
\expandafter\edef\csname NRC@addr\NRC@c@author\endcsname |
| 2897 |
{\csname NRC@addr\NRC@tempb\endcsname} |
| 2898 |
\fi |
| 2899 |
} |
| 2900 |
% \end{macrocode} |
| 2901 |
% \end{macro} |
| 2902 |
% \end{macro} |
| 2903 |
% |
| 2904 |
% \begin{macro}{\shortauthor} |
| 2905 |
% \begin{macro}{\@shortauthor} |
| 2906 |
% Syntax: \cs{shortauthor}\marg{author-spec} |
| 2907 |
% |
| 2908 |
% Defines the reference to be made to the authors in the running |
| 2909 |
% heads, in the case where it's not derivable from the author |
| 2910 |
% specifications.\footnote{There's currently no provision for deriving |
| 2911 |
% `\cs{shortauthor}' from the names given (in either argument) to |
| 2912 |
% \cs{author} commands.} |
| 2913 |
% \begin{macrocode} |
| 2914 |
\newcommand\shortauthor[1]{\newcommand\@shortauthor{#1}} |
| 2915 |
% \end{macrocode} |
| 2916 |
% \end{macro} |
| 2917 |
% \end{macro} |
| 2918 |
% |
| 2919 |
% An author's address is defined by the \cs{address} macro. The |
| 2920 |
% mandatory argument is the address defined; the optional argument (if |
| 2921 |
% present) allows the address to be tagged for future reference from |
| 2922 |
% other authors. |
| 2923 |
% |
| 2924 |
% For each author \meta{n} there's an \cs{NRC@addr\meta{n}} which |
| 2925 |
% expands to the address label. If an address is defined by |
| 2926 |
% \cs{address}\marg{address}, the label is simply `the current author |
| 2927 |
% number'; otherwise, it's \cs{address}'s optional argument. If an |
| 2928 |
% author isn't given an explicit address, she is assumed to be at the |
| 2929 |
% same place as the previous author (which all falls apart if there's |
| 2930 |
% been no author defined yet). |
| 2931 |
% |
| 2932 |
% For each address \meta{label}, there's an |
| 2933 |
% \cs{NRC@addr@\meta{label}} that expands to the actual address. |
| 2934 |
% \begin{macrocode} |
| 2935 |
\newcommand\address{\@ifnextchar[%] |
| 2936 |
\NRC@address@l \NRC@address@nl |
| 2937 |
} |
| 2938 |
% \end{macrocode} |
| 2939 |
% |
| 2940 |
% If there's no optional argument, the command simply defines the |
| 2941 |
% current author's address to be that in the argument: |
| 2942 |
% \begin{macrocode} |
| 2943 |
\newcommand\NRC@address@nl[1]{% |
| 2944 |
% \end{macrocode} |
| 2945 |
% |
| 2946 |
% First, define the address for label `author number' |
| 2947 |
% \begin{macrocode} |
| 2948 |
\@namedef{NRC@addr@\NRC@c@author}{#1}% |
| 2949 |
% \end{macrocode} |
| 2950 |
% |
| 2951 |
% And then allocate `this author's number' as this author's label |
| 2952 |
% \begin{macrocode} |
| 2953 |
\expandafter\edef\csname NRC@addr\NRC@c@author\endcsname |
| 2954 |
{\NRC@c@author}% |
| 2955 |
% \end{macrocode} |
| 2956 |
% |
| 2957 |
% Finally, register the empty tree of |
| 2958 |
% author\ensuremath{\rightarrow}address mappings: |
| 2959 |
% \begin{macrocode} |
| 2960 |
\NRC@allocaddr\NRC@c@author% |
| 2961 |
} |
| 2962 |
% \end{macrocode} |
| 2963 |
% |
| 2964 |
% The optional argument could represent two forms, according to |
| 2965 |
% whether the `mandatory' (-seeming) argument is present. Preserve |
| 2966 |
% the optional (label) argument and split on whether we're actually |
| 2967 |
% defining an address, or merely referring to one. Whatever, we |
| 2968 |
% define the current author's address label. |
| 2969 |
% \begin{macrocode} |
| 2970 |
\def\NRC@address@l[#1]{% |
| 2971 |
\@namedef{NRC@addr\NRC@c@author}{#1}% |
| 2972 |
\def\NRC@tempa{#1}% |
| 2973 |
\futurelet\reserved@a\NRC@address@lsw |
| 2974 |
} |
| 2975 |
% \end{macrocode} |
| 2976 |
% |
| 2977 |
% If we now enter with \cs{reserved@a} the same as \cs{bgroup}, we've |
| 2978 |
% got an address definition, and a label definition to go with it. |
| 2979 |
% Otherwise, we merely have a label reference |
| 2980 |
% \begin{macrocode} |
| 2981 |
\def\NRC@address@lsw{% |
| 2982 |
\ifx\reserved@a\bgroup |
| 2983 |
\expandafter\NRC@address@ldef |
| 2984 |
\fi |
| 2985 |
} |
| 2986 |
% \end{macrocode} |
| 2987 |
% |
| 2988 |
% |
| 2989 |
% Address with label definition: set up the address itself, and |
| 2990 |
% allocate an entry in the tree of addresses |
| 2991 |
% \begin{macrocode} |
| 2992 |
\def\NRC@address@ldef#1{% |
| 2993 |
\@namedef{NRC@addr@\NRC@tempa}{#1}% |
| 2994 |
\NRC@allocaddr\NRC@tempa% |
| 2995 |
} |
| 2996 |
% \end{macrocode} |
| 2997 |
% |
| 2998 |
% \begin{macro}{\NRC@addresses} |
| 2999 |
% \begin{macro}{\NRC@allocaddr} |
| 3000 |
% Syntax: \cs{NRC@allocaddr}\marg{addr-label} |
| 3001 |
% |
| 3002 |
% Allocate a root of a tree and register it in the list \cs{NRC@addresses} |
| 3003 |
% \begin{macrocode} |
| 3004 |
\gdef\NRC@addresses{} |
| 3005 |
\newcommand\NRC@allocaddr[1]{% |
| 3006 |
\expandafter\gdef\csname NRC@addrlist#1\endcsname{}% |
| 3007 |
\NRC@definecounter{addr@#1}% |
| 3008 |
\NRC@addtolist\NRC@addresses{#1}% |
| 3009 |
} |
| 3010 |
% \end{macrocode} |
| 3011 |
% \end{macro} |
| 3012 |
% \end{macro} |
| 3013 |
% |
| 3014 |
% \begin{macro}{\NRC@addtolist} |
| 3015 |
% Syntax: \cs{NRC@addtolist}\marg{list-cs-name}\marg{list-element} |
| 3016 |
% |
| 3017 |
% Adds an element |#2| to list |#1| |
| 3018 |
% \begin{macrocode} |
| 3019 |
\newcommand\NRC@addtolist[2]{\bgroup |
| 3020 |
\let\do\relax |
| 3021 |
\xdef#1{#1\do{#2}}% |
| 3022 |
\egroup |
| 3023 |
} |
| 3024 |
% \end{macrocode} |
| 3025 |
% \end{macro} |
| 3026 |
% |
| 3027 |
% \begin{macro}{\NRC@addauthortoaddress} |
| 3028 |
% Syntax: \cs{NRC@addauthortoaddress}\marg{author-count} |
| 3029 |
% |
| 3030 |
% Adds the author specified by the \emph{count} to the relevant |
| 3031 |
% address list, and counts the author in the counter |
| 3032 |
% \texttt{@addr@\meta{addr-label}} |
| 3033 |
% \begin{macrocode} |
| 3034 |
\newcommand\NRC@addauthortoaddress[1]{% |
| 3035 |
\expandafter\edef\expandafter\@tempa\expandafter{% |
| 3036 |
\csname NRC@addr#1\endcsname}% |
| 3037 |
\expandafter\NRC@addtolist |
| 3038 |
\csname NRC@addrlist\@tempa\endcsname{#1}% |
| 3039 |
\NRC@stepcounter{addr@\@tempa}% |
| 3040 |
} |
| 3041 |
% \end{macrocode} |
| 3042 |
% \end{macro} |
| 3043 |
% |
| 3044 |
% \begin{macro}{\correspond} |
| 3045 |
% \begin{macro}{\@correspond} |
| 3046 |
% \begin{macro}{\@correspond@a} |
| 3047 |
% Syntax: \cs{correspond}\marg{correspondence-details} (argument, |
| 3048 |
% despite looking as if it's mandatory, is in fact optional) |
| 3049 |
% |
| 3050 |
% Designate one author as the target for correspondence: |
| 3051 |
% \begin{macrocode} |
| 3052 |
\newcommand\correspond{% |
| 3053 |
\futurelet\reserved@a\@correspond |
| 3054 |
} |
| 3055 |
% \end{macrocode} |
| 3056 |
% |
| 3057 |
% Now, if there actually is an argument, \cs{reserved@a} will contain an |
| 3058 |
% opening brace |
| 3059 |
% \begin{macrocode} |
| 3060 |
\newcommand\@correspond{% |
| 3061 |
\ifx\reserved@a\bgroup |
| 3062 |
\expandafter\@correspond@a |
| 3063 |
\else |
| 3064 |
\AddressNote{\NRC@text@correspondAll}% |
| 3065 |
\fi |
| 3066 |
} |
| 3067 |
% \end{macrocode} |
| 3068 |
% |
| 3069 |
% Deal with a \cs{correspond} command with arguments |
| 3070 |
% \begin{macrocode} |
| 3071 |
\newcommand\@correspond@a[1]{% |
| 3072 |
\def\@tempa{#1}% |
| 3073 |
\protected@xdef\@tempa{\noexpand\AddressNote{\NRC@text@correspond}} |
| 3074 |
\@tempa |
| 3075 |
} |
| 3076 |
% \end{macrocode} |
| 3077 |
% \end{macro} |
| 3078 |
% \end{macro} |
| 3079 |
% \end{macro} |
| 3080 |
% |
| 3081 |
% \begin{macro}{\present} |
| 3082 |
% Syntax: \cs{present}\marg{address} |
| 3083 |
% |
| 3084 |
% Record that this author has an alternative address. |
| 3085 |
% \begin{macrocode} |
| 3086 |
\newcommand\present[1]{% |
| 3087 |
\AddressNote{\NRC@text@present\ #1}% |
| 3088 |
} |
| 3089 |
% \end{macrocode} |
| 3090 |
% \end{macro} |
| 3091 |
% |
| 3092 |
% \begin{macro}{\AddressNote} |
| 3093 |
% \begin{macro}{\IDnote} |
| 3094 |
% Syntax: \cs{AddressNote}\marg{note} |
| 3095 |
% |
| 3096 |
% Define an anonymous address note (\cs{IDnote} is a synonym). |
| 3097 |
% \begin{macrocode} |
| 3098 |
\newcommand\AddressNote[1]{% |
| 3099 |
\NRC@stepcounter{AN\NRC@c@author} |
| 3100 |
\bgroup |
| 3101 |
\@NRC@AddressCommands |
| 3102 |
\expandafter\protected@xdef |
| 3103 |
\csname NRC@AN\NRC@c@author.% |
| 3104 |
\@nameuse{NRC@c@AN\NRC@c@author}\endcsname{% |
| 3105 |
\noexpand\NRC@addrfnote{#1}% |
| 3106 |
}% |
| 3107 |
\egroup |
| 3108 |
} |
| 3109 |
\let\IDnote\AddressNote |
| 3110 |
% \end{macrocode} |
| 3111 |
% \end{macro} |
| 3112 |
% \end{macro} |
| 3113 |
% |
| 3114 |
% \begin{macro}{\@NRC@AddressCommands} |
| 3115 |
% \begin{macro}{\phone} |
| 3116 |
% \begin{macro}{\fax} |
| 3117 |
% \begin{macro}{\telefax} |
| 3118 |
% \begin{macro}{\email} |
| 3119 |
% |
| 3120 |
% Define the auxiliary address commands for use in the arguments of |
| 3121 |
% \cs{AddressNote} and \cs{address} commands. The commands are |
| 3122 |
% themselves declared as null robust commands, and their expansions |
| 3123 |
% are only declared within the groups where the commands are going to |
| 3124 |
% be used |
| 3125 |
% \begin{macrocode} |
| 3126 |
\def\@NRC@AddressCommands{% |
| 3127 |
\expandafter\def\csname phone \endcsname##1{% |
| 3128 |
\NRC@text@telephone\protect~##1}% |
| 3129 |
\expandafter\def\csname fax \endcsname##1{|% |
| 3130 |
\NRC@text@fax\protect~##1}% |
| 3131 |
\expandafter\def\csname telefax \endcsname##1{% |
| 3132 |
\NRC@text@telefax\protect~##1}% |
| 3133 |
\expandafter\def\csname email \endcsname##1{% |
| 3134 |
\mbox{\NRC@text@email}\protect~##1}% |
| 3135 |
} |
| 3136 |
\DeclareRobustCommand\phone[1]{} |
| 3137 |
\DeclareRobustCommand\fax[1]{} |
| 3138 |
\DeclareRobustCommand\telefax[1]{} |
| 3139 |
\DeclareRobustCommand\email[1]{} |
| 3140 |
% \end{macrocode} |
| 3141 |
% \end{macro} |
| 3142 |
% \end{macro} |
| 3143 |
% \end{macro} |
| 3144 |
% \end{macro} |
| 3145 |
% \end{macro} |
| 3146 |
% |
| 3147 |
% \begin{macro}{\received} |
| 3148 |
% \begin{macro}{\NRC@received} |
| 3149 |
% \begin{macro}{\NRC@received@sep} |
| 3150 |
% \begin{macro}{\accepted} |
| 3151 |
% \begin{macro}{\revreceived} |
| 3152 |
% \begin{macro}{\revaccepted} |
| 3153 |
% Syntax: \cs{received}\marg{received date}~\dots~\cs{accepted}\marg{accepted |
| 3154 |
% date} \dots\ \cs{revreceived}\marg{date revision received} |
| 3155 |
% \dots\ \cs{revaccepted}\marg{date revision accepted} |
| 3156 |
% |
| 3157 |
% Preserve the `received' and `accepted' dates (two sorts of each). |
| 3158 |
% |
| 3159 |
% The \cs{received} |[...| \cs{accepted}|]| |[...| \cs{revreceived}|]| |
| 3160 |
% |[...| \cs{revaccepted}|]| form is now preferred. |
| 3161 |
% \begin{macrocode} |
| 3162 |
\newcommand\NRC@received@sep{} |
| 3163 |
\def\NRC@received{} |
| 3164 |
\newcommand\received[1]{% |
| 3165 |
\protected@xdef\NRC@received{\NRC@received\NRC@received@sep |
| 3166 |
\protect\NRC@text@received\ #1.% |
| 3167 |
}% |
| 3168 |
\let\NRC@received@sep\space |
| 3169 |
} |
| 3170 |
\newcommand\accepted[1]{% |
| 3171 |
\protected@xdef\NRC@received{\NRC@received\NRC@received@sep |
| 3172 |
\protect\NRC@text@accepted\ #1.% |
| 3173 |
}% |
| 3174 |
\let\NRC@received@sep\space |
| 3175 |
} |
| 3176 |
\newcommand\revreceived[1]{% |
| 3177 |
\protected@xdef\NRC@received{\NRC@received\NRC@received@sep |
| 3178 |
\protect\NRC@text@revreceived\ #1.% |
| 3179 |
}% |
| 3180 |
\let\NRC@received@sep\space |
| 3181 |
} |
| 3182 |
\newcommand\revaccepted[1]{% |
| 3183 |
\protected@xdef\NRC@received{\NRC@received\NRC@received@sep |
| 3184 |
\protect\NRC@text@revaccepted\ #1.% |
| 3185 |
}% |
| 3186 |
\let\NRC@received@sep\space |
| 3187 |
} |
| 3188 |
% \end{macrocode} |
| 3189 |
% \end{macro} |
| 3190 |
% \end{macro} |
| 3191 |
% \end{macro} |
| 3192 |
% \end{macro} |
| 3193 |
% \end{macro} |
| 3194 |
% \end{macro} |
| 3195 |
% |
| 3196 |
% \begin{macro}{\IDdates} |
| 3197 |
% \begin{macro}{\IDdate} |
| 3198 |
% Syntax: \cs{IDdates}\marg{Date text} |
| 3199 |
% |
| 3200 |
% Provides the means of entering a more freely-specified date entry. |
| 3201 |
% If present, it's tagged on the end of the \cs{accepted} stuff, with |
| 3202 |
% a separating space if appropriate. Repeated \cs{IDdates} commands |
| 3203 |
% are acceptable, and their arguments are tagged on, one after |
| 3204 |
% another, with a separating space. (\cs{IDdate} is an alias for |
| 3205 |
% \cs{IDdates}.) |
| 3206 |
% \begin{macrocode} |
| 3207 |
\newcommand{\IDdates}[1]{% |
| 3208 |
\protected@xdef\NRC@received{\NRC@received\NRC@received@sep#1}% |
| 3209 |
\let\NRC@received@sep\space |
| 3210 |
} |
| 3211 |
\let\IDdate\IDdates |
| 3212 |
% \end{macrocode} |
| 3213 |
% \end{macro} |
| 3214 |
% \end{macro} |
| 3215 |
% |
| 3216 |
% \begin{macro}{\dedication} |
| 3217 |
% \begin{macro}{\NRC@dedication} |
| 3218 |
% \begin{macro}{\ifNRC@dedication} |
| 3219 |
% Syntax: \cs{dedication}\marg{pious words} |
| 3220 |
% |
| 3221 |
% Preserve a dedicatory text to be printed in the ident box at the |
| 3222 |
% bottom of the title page |
| 3223 |
% \begin{macrocode} |
| 3224 |
\newif\ifNRC@dedication \NRC@dedicationfalse |
| 3225 |
\newcommand\dedication[1]{\gdef\NRC@dedication{#1}% |
| 3226 |
\NRC@dedicationtrue |
| 3227 |
} |
| 3228 |
% \end{macrocode} |
| 3229 |
% \end{macro} |
| 3230 |
% \end{macro} |
| 3231 |
% \end{macro} |
| 3232 |
% |
| 3233 |
% \begin{macro}{\assoced} |
| 3234 |
% \begin{macro}{\NRC@assoced} |
| 3235 |
% \begin{macro}{\ifNRC@assoced} |
| 3236 |
% Syntax: \cs{assoced}\marg{details of associate editor} |
| 3237 |
% |
| 3238 |
% Preserve details of the associate editor, to be printed in the ident |
| 3239 |
% box at the bottom of the title page |
| 3240 |
% \begin{macrocode} |
| 3241 |
\newif\ifNRC@assoced \NRC@assocedfalse |
| 3242 |
\newcommand\assoced[1]{\gdef\NRC@assoced{\NRC@text@assoced{} #1.}% |
| 3243 |
\NRC@assocedtrue |
| 3244 |
} |
| 3245 |
% \end{macrocode} |
| 3246 |
% \end{macro} |
| 3247 |
% \end{macro} |
| 3248 |
% \end{macro} |
| 3249 |
% |
| 3250 |
% \begin{macro}{\corred} |
| 3251 |
% \begin{macro}{\NRC@corred} |
| 3252 |
% \begin{macro}{\ifNRC@corred} |
| 3253 |
% Syntax: \cs{corred}\marg{details of corresponding editor} |
| 3254 |
% |
| 3255 |
% Preserve details of the corresponding editor, to be printed in the ident |
| 3256 |
% box at the bottom of the title page |
| 3257 |
% \begin{macrocode} |
| 3258 |
\newif\ifNRC@corred \NRC@corredfalse |
| 3259 |
\newcommand\corred[1]{\gdef\NRC@corred{\NRC@text@corred{} #1.}% |
| 3260 |
\NRC@corredtrue |
| 3261 |
} |
| 3262 |
% \end{macrocode} |
| 3263 |
% \end{macro} |
| 3264 |
% \end{macro} |
| 3265 |
% \end{macro} |
| 3266 |
% |
| 3267 |
% \begin{macro}{\commdate} |
| 3268 |
% \begin{macro}{\NRC@commdate} |
| 3269 |
% \begin{macro}{\if@NRCcommdate} |
| 3270 |
% Syntax: \cs{commdate}\marg{comment date} |
| 3271 |
% |
| 3272 |
% Preserve the date by which comments should be received, to be |
| 3273 |
% printed in the ident box at the bottom of the title page |
| 3274 |
% \begin{macrocode} |
| 3275 |
\newif\ifNRC@commdate \NRC@commdatefalse |
| 3276 |
\newcommand\commdate[1]{\gdef\NRC@commdate{\NRC@text@commdate{} #1.}% |
| 3277 |
\NRC@commdatetrue |
| 3278 |
} |
| 3279 |
% \end{macrocode} |
| 3280 |
% \end{macro} |
| 3281 |
% \end{macro} |
| 3282 |
% \end{macro} |
| 3283 |
% |
| 3284 |
% \begin{macro}{\webpub} |
| 3285 |
% \begin{macro}{\NRCurl} |
| 3286 |
% \begin{macro}{\NRC@a@webpub} |
| 3287 |
% \begin{macro}{\NRC@webpub} |
| 3288 |
% \begin{macro}{\ifNRC@webpub} |
| 3289 |
% \begin{macro}{\NRC@def@webaddress} |
| 3290 |
% \begin{macro}{\NRC@url} |
| 3291 |
% \begin{macro}{\NRC@url@command} |
| 3292 |
% Syntax: \cs{webpub}\marg{web address}\marg{date of web publication}\par |
| 3293 |
% \noindent\phantom{Syntax: }\cs{NRCurl}\marg{url command name} |
| 3294 |
% |
| 3295 |
% \cs{webpub} preserves the location and date of publication on the WWW, to be |
| 3296 |
% printed in the ident box at the bottom of the title page. The |
| 3297 |
% \emph{first} `mandatory' argument may in fact be omitted: the |
| 3298 |
% presence of two such arguments is determined by there being a ``{'' % } |
| 3299 |
% immediately after the first argument. |
| 3300 |
% \begin{macrocode} |
| 3301 |
\newif\ifNRC@webpub \NRC@webpubfalse |
| 3302 |
\newcommand\webpub[1]{\@ifnextchar\bgroup |
| 3303 |
{\def\@tempa{#1}\NRC@a@webpub}% |
| 3304 |
{% |
| 3305 |
\def\@tempa{\protect\NRC@url{\protect\NRC@def@webaddress}}% |
| 3306 |
\NRC@a@webpub{#1}% |
| 3307 |
}% |
| 3308 |
} |
| 3309 |
\newcommand\NRC@a@webpub[1]{% |
| 3310 |
\def\@tempb{#1}% |
| 3311 |
\protected@xdef\NRC@webpub{\NRC@text@webpub.}% |
| 3312 |
\NRC@webpubtrue |
| 3313 |
} |
| 3314 |
\newcommand*{\NRC@def@webaddress}{\emph{unknown}} |
| 3315 |
% \end{macrocode} |
| 3316 |
% |
| 3317 |
% \cs{NRCurl} sets up typesetting of URLs in \cs{webpub}; there's a |
| 3318 |
% complicated sequence of protections and non-expansions and things |
| 3319 |
% whose real purpose is to ensure that \cs{NRC@def@webaddress} doesn't |
| 3320 |
% get expanded until the web address is actually put into the IDbox. |
| 3321 |
% \begin{macrocode} |
| 3322 |
\DeclareRobustCommand\NRCurl[1]{\expandafter\let\expandafter |
| 3323 |
\NRC@url@command\csname#1\endcsname} |
| 3324 |
\NRCurl{@firstofone} |
| 3325 |
\newcommand\NRC@url[1]{{% |
| 3326 |
\let\protect\@empty |
| 3327 |
\edef\@tempa{\noexpand\NRC@url@command{#1}}% |
| 3328 |
\@tempa |
| 3329 |
}} |
| 3330 |
% \end{macrocode} |
| 3331 |
% \end{macro} |
| 3332 |
% \end{macro} |
| 3333 |
% \end{macro} |
| 3334 |
% \end{macro} |
| 3335 |
% \end{macro} |
| 3336 |
% \end{macro} |
| 3337 |
% \end{macro} |
| 3338 |
% \end{macro} |
| 3339 |
% |
| 3340 |
% \begin{macro}{\abbreviations} |
| 3341 |
% \begin{macro}{\@abbreviations} |
| 3342 |
% \begin{macro}{\if@abbreviations} |
| 3343 |
% Syntax: \cs{abbreviations}\marg{set of abbrev.\ specs} |
| 3344 |
% |
| 3345 |
% Preserve a set of abbreviations to be printed in the ident box, |
| 3346 |
% between the dedication and list of authors. |
| 3347 |
% \begin{macrocode} |
| 3348 |
\newif\if@abbreviations \@abbreviationsfalse |
| 3349 |
\newcommand\abbreviations[1]{\gdef\@abbreviations{#1}% |
| 3350 |
\@abbreviationstrue |
| 3351 |
} |
| 3352 |
% \end{macrocode} |
| 3353 |
% \end{macro} |
| 3354 |
% \end{macro} |
| 3355 |
% \end{macro} |
| 3356 |
% |
| 3357 |
% \subsection{Support code for \cs{maketitle}} |
| 3358 |
% |
| 3359 |
% Make a list of all the authors |
| 3360 |
% \begin{macrocode} |
| 3361 |
\newcommand\NRC@defaultauthorlist{\bgroup |
| 3362 |
\let\correspond\NRC@condgobble |
| 3363 |
\expandafter\@tempcnta\NRC@c@author\relax |
| 3364 |
\advance\@tempcnta -2 |
| 3365 |
\@tempcntb 0 |
| 3366 |
\loop |
| 3367 |
\ifnum\@tempcnta>0 |
| 3368 |
\advance\@tempcntb 1 |
| 3369 |
\NRC@addauthortoaddress{\the\@tempcntb}% |
| 3370 |
\ignorespaces\csname NRC@author\number\@tempcntb\endcsname\unskip, |
| 3371 |
\advance\@tempcnta -1 |
| 3372 |
\repeat |
| 3373 |
\expandafter\@tempcnta\NRC@c@author\relax |
| 3374 |
\advance\@tempcnta -\@tempcntb |
| 3375 |
\expandafter\ifnum\NRC@c@author>0 |
| 3376 |
\ifnum\@tempcnta>1 |
| 3377 |
\expandafter\@tempcnta\NRC@c@author\relax |
| 3378 |
\advance\@tempcnta -1 |
| 3379 |
\NRC@addauthortoaddress{\the\@tempcnta}% |
| 3380 |
\ignorespaces\csname NRC@author\number\@tempcnta\endcsname\unskip |
| 3381 |
\expandafter\ifnum\NRC@c@author>2 |
| 3382 |
\ifNRC@french\else,\fi |
| 3383 |
\fi\ \NRC@text@and\ |
| 3384 |
\fi |
| 3385 |
\NRC@addauthortoaddress\NRC@c@author |
| 3386 |
\ignorespaces\csname NRC@author\NRC@c@author\endcsname\unskip |
| 3387 |
\fi |
| 3388 |
\egroup |
| 3389 |
} |
| 3390 |
% \end{macrocode} |
| 3391 |
% |
| 3392 |
% \begin{macro}{\NRC@default@authaddlist} |
| 3393 |
% Output the list of authors sorted by address, as in the ident box on |
| 3394 |
% the title page |
| 3395 |
% \begin{macrocode} |
| 3396 |
\newcommand\NRC@default@authaddlist{\bgroup |
| 3397 |
\let\do\NRC@output@authorline |
| 3398 |
\NRC@addresses |
| 3399 |
\egroup |
| 3400 |
} |
| 3401 |
% \end{macrocode} |
| 3402 |
% \end{macro} |
| 3403 |
% |
| 3404 |
% \begin{macro}{\NRC@output@authorline} |
| 3405 |
% Syntax: \cs{NRC@output@authorline}\marg{addr-label} |
| 3406 |
% |
| 3407 |
% Outputs all the authors associated with that address, then a full |
| 3408 |
% stop (having put the correspondence mark in place if required), then |
| 3409 |
% the address |
| 3410 |
% \begin{macrocode} |
| 3411 |
\newcommand\NRC@output@authorline[1]{\bgroup |
| 3412 |
\@tempswafalse |
| 3413 |
\expandafter\@tempcnta\NRC@valcounter{addr@#1}\relax |
| 3414 |
% \end{macrocode} |
| 3415 |
% |
| 3416 |
% Decide how to do separators between author names on the basis of how |
| 3417 |
% many there are: case 0 can't happen, and in case 1 the separator |
| 3418 |
% never gets used |
| 3419 |
% \begin{macrocode} |
| 3420 |
\ifcase\@tempcnta |
| 3421 |
\or |
| 3422 |
% \end{macrocode} |
| 3423 |
% |
| 3424 |
% in case 2, there's only one separator `` and '' |
| 3425 |
% \begin{macrocode} |
| 3426 |
\or \def\NRC@authorseparator{\NRC@optfnmark{} \NRC@text@and\ }% |
| 3427 |
% \end{macrocode} |
| 3428 |
% |
| 3429 |
% in case of 3 or more authors at the same address, we need an |
| 3430 |
% intelligent separator |
| 3431 |
% \begin{macrocode} |
| 3432 |
\else |
| 3433 |
\def\NRC@authorseparator{% |
| 3434 |
\ifnum\@tempcnta>0\relax |
| 3435 |
\ifNRC@french |
| 3436 |
\NRC@optfnmark, |
| 3437 |
\else |
| 3438 |
,\NRC@optfnmark{} |
| 3439 |
\fi |
| 3440 |
\advance\@tempcnta-1\relax |
| 3441 |
\else |
| 3442 |
\ifNRC@french |
| 3443 |
\NRC@optfnmark\ \NRC@text@and{} |
| 3444 |
\else |
| 3445 |
,\NRC@optfnmark{} \NRC@text@and{} |
| 3446 |
\fi |
| 3447 |
\fi |
| 3448 |
}% |
| 3449 |
\advance\@tempcnta-2\relax |
| 3450 |
\fi |
| 3451 |
\let\do\NRC@output@oneauthor |
| 3452 |
\noindent{\usefont\f@encoding\rmdefault {bx}n% |
| 3453 |
\csname NRC@addrlist#1\endcsname |
| 3454 |
\ifNRC@french |
| 3455 |
\NRC@optfnmark.% |
| 3456 |
\else |
| 3457 |
.\NRC@optfnmark |
| 3458 |
\fi} |
| 3459 |
\if@breakaddress\par\noindent\fi |
| 3460 |
\csname NRC@addr@#1\endcsname\par |
| 3461 |
\egroup |
| 3462 |
} |
| 3463 |
% \end{macrocode} |
| 3464 |
% \end{macro} |
| 3465 |
% |
| 3466 |
% \begin{macro}{\NRC@output@oneauthor} |
| 3467 |
% Syntax: \cs{NRC@output@oneauthor}\marg{author-number} |
| 3468 |
% |
| 3469 |
% Outputs one author: for use during processing lists of authors at |
| 3470 |
% one address. Switch |@tempswa| set true by first author, and |
| 3471 |
% subsequent ones get separated by a comma. |
| 3472 |
% \begin{macrocode} |
| 3473 |
\newcommand\NRC@output@oneauthor[1]{% |
| 3474 |
\if@tempswa\NRC@authorseparator\else\@tempswatrue\fi |
| 3475 |
\csname NRC@initialsonly#1\endcsname |
| 3476 |
\def\NRC@optfnmark{\NRC@processAN{#1}}% |
| 3477 |
} |
| 3478 |
% \end{macrocode} |
| 3479 |
% \end{macro} |
| 3480 |
% |
| 3481 |
% \begin{macro}{\NRC@addrfnote} |
| 3482 |
% \begin{macro}{\NRC@addrfnbody} |
| 3483 |
% Syntax: \cs{NRC@addrfnote}\marg{address footnote matter} |
| 3484 |
% |
| 3485 |
% This code (rather closely modelled on \cs{thanks}) saves up any |
| 3486 |
% `footnotes' (i.e., corresponding or present addresses) that may |
| 3487 |
% occur during typesetting of the ident box |
| 3488 |
% \begin{macrocode} |
| 3489 |
\newcommand\NRC@addrfnote[1]{% |
| 3490 |
\NRC@addrfnmark |
| 3491 |
\protected@xdef\NRC@addrfnbody{\NRC@addrfnbody |
| 3492 |
\protect\NRC@addrfntext[\the\c@footnote]{#1}\protect\par}% |
| 3493 |
} |
| 3494 |
\def\NRC@addrfnbody{} |
| 3495 |
% \end{macrocode} |
| 3496 |
% \end{macro} |
| 3497 |
% \end{macro} |
| 3498 |
% |
| 3499 |
% \begin{macro}{\NRC@addrfnmark} |
| 3500 |
% For use by \cs{NRC@addrfnote}; differs from standard |
| 3501 |
% \cs{footnotemark} only in that it uses current body font for the |
| 3502 |
% superscripted character. |
| 3503 |
% \begin{macrocode} |
| 3504 |
\newcommand{\NRC@addrfnmark}{% |
| 3505 |
{% |
| 3506 |
\stepcounter{footnote}% |
| 3507 |
\protected@xdef\@thefnmark{\thefootnote}% |
| 3508 |
}% |
| 3509 |
\leavevmode |
| 3510 |
\edef\@x@sf{\the\spacefactor}% |
| 3511 |
\nobreak |
| 3512 |
\hbox{\textsuperscript{\@thefnmark}}% |
| 3513 |
\spacefactor\@x@sf\relax |
| 3514 |
} |
| 3515 |
% \end{macrocode} |
| 3516 |
% \end{macro} |
| 3517 |
% |
| 3518 |
% \begin{macro}{\thanks} |
| 3519 |
% Syntax: \cs{thanks}\marg{comment} |
| 3520 |
% |
| 3521 |
% This redefinition of the standard \LaTeX{} command puts the notes |
| 3522 |
% into the IDbox. |
| 3523 |
% \begin{macrocode} |
| 3524 |
\let\thanks\NRC@addrfnote |
| 3525 |
% \end{macrocode} |
| 3526 |
% \end{macro} |
| 3527 |
% |
| 3528 |
% \begin{macro}{\NRC@addrfntext} |
| 3529 |
% Syntax: \cs{NRC@addrfntext}\oarg{mark}\marg{body} |
| 3530 |
% |
| 3531 |
% Does the slightly gutted footnotes we have in the ident block |
| 3532 |
% \begin{macrocode} |
| 3533 |
\def\NRC@addrfntext[#1]#2{% |
| 3534 |
\begingroup |
| 3535 |
\csname c@\@mpfn\endcsname #1\relax |
| 3536 |
\unrestored@protected@xdef\@thefnmark{\thempfn}% |
| 3537 |
\endgroup |
| 3538 |
\@makefntext{% |
| 3539 |
\rule\z@\footnotesep |
| 3540 |
\NRC@sectragged\ignorespaces |
| 3541 |
#2% |
| 3542 |
\@finalstrut\strutbox}% |
| 3543 |
} |
| 3544 |
% \end{macrocode} |
| 3545 |
% \end{macro} |
| 3546 |
% |
| 3547 |
% \begin{macro}{\NRC@processAN} |
| 3548 |
% Syntax: \cs{NRC@processAN}\marg{author number} |
| 3549 |
% |
| 3550 |
% Generate the \cs{AddressNote}s for this author; takes account of |
| 3551 |
% multiple notes for one author (placing a comma between the note |
| 3552 |
% numbers superscripted after the author's name) |
| 3553 |
% \begin{macrocode} |
| 3554 |
\newcommand\NRC@processAN[1]{% |
| 3555 |
\@tempcntb 0\relax |
| 3556 |
\loop |
| 3557 |
\if@NRCcounter{AN#1}>\@tempcntb |
| 3558 |
\advance\@tempcntb 1\relax |
| 3559 |
\csname NRC@AN#1.\the\@tempcntb\endcsname |
| 3560 |
% \end{macrocode} |
| 3561 |
% |
| 3562 |
% Note, we can't use \cs{if@NRCcounter} here, because we need to have |
| 3563 |
% something that the parser will cope with as being a conditional |
| 3564 |
% command |
| 3565 |
% \begin{macrocode} |
| 3566 |
\expandafter\ifnum\csname NRC@c@AN#1\endcsname>\@tempcntb |
| 3567 |
\textsuperscript{,}% |
| 3568 |
\fi |
| 3569 |
\repeat |
| 3570 |
} |
| 3571 |
% \end{macrocode} |
| 3572 |
% \end{macro} |
| 3573 |
% |
| 3574 |
% \begin{macro}{\specialtitle} |
| 3575 |
% \begin{macro}{\@specialtitle} |
| 3576 |
% \begin{macro}{\if@specialtitle} |
| 3577 |
% \begin{macro}{\if@specialonly} |
| 3578 |
% Syntax: \cs{specialtitle}\marg{title}, or |
| 3579 |
% \cs{specialtitle*}\marg{title} |
| 3580 |
% |
| 3581 |
% Declares a boxed reversed-colour box at the top of the page. The |
| 3582 |
% \marg{title} appears in the box. If the \texttt{*}-form of the |
| 3583 |
% command is used, no `regular' title block is expected, and the |
| 3584 |
% reversed box is the only title for this item; otherwise, a normal |
| 3585 |
% title box exists, with the special title block included within it. |
| 3586 |
% \begin{macrocode} |
| 3587 |
\newcommand\specialtitle{\@ifstar |
| 3588 |
{\@specialonlytrue\@specialtitle}% |
| 3589 |
{\@specialonlyfalse\@specialtitle}} |
| 3590 |
\newcommand\@specialtitle[1]{\gdef\@special@title{#1}\@specialtitletrue} |
| 3591 |
\newif\if@specialtitle \@specialtitlefalse |
| 3592 |
\newif\if@specialonly |
| 3593 |
% \end{macrocode} |
| 3594 |
% \end{macro} |
| 3595 |
% \end{macro} |
| 3596 |
% \end{macro} |
| 3597 |
% \end{macro} |
| 3598 |
% |
| 3599 |
% |
| 3600 |
% \subsection{Setting the title} |
| 3601 |
% |
| 3602 |
% \begin{macro}{\NRC@titleoffset} |
| 3603 |
% \cs{NRC@titleoffset} holds the offset of titles from the left margin |
| 3604 |
% (note, this is larger than the distance between the heavy left bar |
| 3605 |
% and the title, and is also the left margin used for the abstract/ |
| 3606 |
% r\'esum\'e) |
| 3607 |
% \begin{macrocode} |
| 3608 |
\def\NRC@titleoffset{5pc\relax} |
| 3609 |
% \end{macrocode} |
| 3610 |
% \end{macro} |
| 3611 |
% |
| 3612 |
% \begin{macro}{\ifNRC@IDbox} |
| 3613 |
% \begin{macro}{\NRC@theIDbox} |
| 3614 |
% \cs{ifNRC@IDbox} is globally set to determine whether an IDbox is |
| 3615 |
% needed (initially false: may be set true inside \cs{NRC@maketitle}). |
| 3616 |
% If we're doing a two-column IDbox, it gets set into \cs{NRC@theIDbox} |
| 3617 |
% \begin{macrocode} |
| 3618 |
\newif\ifNRC@IDbox |
| 3619 |
\global\NRC@IDboxfalse |
| 3620 |
%<nrc2>\newbox\NRC@theIDbox |
| 3621 |
% \end{macrocode} |
| 3622 |
% \end{macro} |
| 3623 |
% \end{macro} |
| 3624 |
% |
| 3625 |
% \begin{macro}{\maketitle} |
| 3626 |
% \begin{macro}{\ifNRC@closingrule} |
| 3627 |
% Syntax: \cs{maketitle}\meta{optional-asterisk} |
| 3628 |
% |
| 3629 |
% Simply use what's gone before. If the \meta{optional-asterisk} is |
| 3630 |
% present (two-column classes only), a 1pc rule is placed after the |
| 3631 |
% abstract/r\'esum\'e: this is required if the whole is so long that |
| 3632 |
% it runs over to a second page. |
| 3633 |
% |
| 3634 |
% First, let's define a flag for this closing rule |
| 3635 |
% \begin{macrocode} |
| 3636 |
%<*nrc2> |
| 3637 |
\newif\ifNRC@closingrule |
| 3638 |
\NRC@closingrulefalse |
| 3639 |
%</nrc2> |
| 3640 |
% \end{macrocode} |
| 3641 |
% |
| 3642 |
% Start the definition. There's not actually much code in common for |
| 3643 |
% the 1-column and the 2-column cases. The 1-column case is in |
| 3644 |
% fact \emph{much} simpler. |
| 3645 |
% \begin{macrocode} |
| 3646 |
\renewcommand\maketitle{% |
| 3647 |
% \end{macrocode} |
| 3648 |
% |
| 3649 |
% For 1-column setting, we start by adjusting the skip from the base of |
| 3650 |
% the headline (consisting, in this case, merely of the folio) to the |
| 3651 |
% baseline of the title. Flying blind (calculation doesn't seem to |
| 3652 |
% get this right, so this is an empirical separation)\dots |
| 3653 |
% \begin{macrocode} |
| 3654 |
%<*nrc1> |
| 3655 |
\NRC@maketitle |
| 3656 |
\vspace*{2pc}% |
| 3657 |
\ifNRC@IDbox\NRC@makeIDbox{\textwidth}\fi |
| 3658 |
} |
| 3659 |
%</nrc1> |
| 3660 |
% \end{macrocode} |
| 3661 |
% |
| 3662 |
% The other (2-column) journals set themselves with a title at the |
| 3663 |
% top, and the rest in 2 columns. First detect (and save the flag |
| 3664 |
% for) the closing rule; then continue |
| 3665 |
% \begin{macrocode} |
| 3666 |
%<*nrc2> |
| 3667 |
\@ifstar{\NRC@closingruletrue\NRC@iimaketitle}{\NRC@iimaketitle}% |
| 3668 |
} |
| 3669 |
\newcommand{\NRC@iimaketitle}{% |
| 3670 |
\NRC@maketitle |
| 3671 |
\ifNRC@IDbox\NRC@makeIDbox{% |
| 3672 |
\if@onecolid\NRC@columnwidth\else\textwidth\fi}% |
| 3673 |
\fi |
| 3674 |
\ifx\NRC@abstract@i\@undefined |
| 3675 |
\NRC@warning{Neither abstract nor resume given}% |
| 3676 |
\else |
| 3677 |
\begingroup |
| 3678 |
\the\NRC@abstract@i |
| 3679 |
\@topsepadd\z@ |
| 3680 |
\endtrivlist |
| 3681 |
\endgroup |
| 3682 |
\ifx\NRC@abstract@ii\@undefined |
| 3683 |
\NRC@warning{One of abstract and resume missing}% |
| 3684 |
\else |
| 3685 |
\gdef\NRC@absressep{8}% |
| 3686 |
\begingroup |
| 3687 |
\the\NRC@abstract@ii |
| 3688 |
\@topsepadd\z@ |
| 3689 |
\endtrivlist |
| 3690 |
\endgroup |
| 3691 |
\fi |
| 3692 |
\fi |
| 3693 |
% \end{macrocode} |
| 3694 |
% |
| 3695 |
% Now we insert the closing rule, if the user asked for it. The space |
| 3696 |
% above and below the rule is to be \texttt{1pc} nominal, but in a |
| 3697 |
% properly formatted paper, the abstract or r\'esum\'e (whichever |
| 3698 |
% came second) will have added \texttt{8pt} by way of \cs{topsep} at |
| 3699 |
% the bottom of the list. We therefore only add \texttt{4pt} above |
| 3700 |
% the rule. |
| 3701 |
% |
| 3702 |
% The spacing in the absence of the rule is still that derived from |
| 3703 |
% \texttt{nrc1.cls} --- it may need adjustment. |
| 3704 |
% \begin{macrocode} |
| 3705 |
\ifNRC@closingrule |
| 3706 |
\vskip 4\p@ |
| 3707 |
\noindent\rule{\textwidth}{\p@} |
| 3708 |
\vskip 1pc |
| 3709 |
\else |
| 3710 |
\vspace*{8\p@}% |
| 3711 |
\fi |
| 3712 |
\global\dbltextfloatsep \z@ |
| 3713 |
\RestartDouble |
| 3714 |
\if@onecolid |
| 3715 |
\ifNRC@IDbox |
| 3716 |
\@float{figure}[b!] |
| 3717 |
\box\NRC@theIDbox |
| 3718 |
\end@float |
| 3719 |
\fi |
| 3720 |
\fi |
| 3721 |
} |
| 3722 |
%</nrc2> |
| 3723 |
% \end{macrocode} |
| 3724 |
% \end{macro} |
| 3725 |
% \end{macro} |
| 3726 |
% |
| 3727 |
% \begin{macro}{\NRC@maketitle} |
| 3728 |
% Syntax: \cs{NRC@maketitle} |
| 3729 |
% |
| 3730 |
% Makes the title of a paper, which will reside at the top of the |
| 3731 |
% first page of the paper. |
| 3732 |
% |
| 3733 |
% First, do we have a reversed-box special title? If we do, and it's |
| 3734 |
% the only title we have, we create it now. |
| 3735 |
% \begin{macrocode} |
| 3736 |
\newcommand{\NRC@maketitle}{% |
| 3737 |
\vspace*{-6\p@}% |
| 3738 |
\if@specialtitle |
| 3739 |
\if@specialonly |
| 3740 |
\bgroup |
| 3741 |
\fboxsep\z@ |
| 3742 |
\noindent\hspace{\NRC@titleoffset}% |
| 3743 |
\colorbox{black}{% |
| 3744 |
\hskip 1pc\relax |
| 3745 |
%<*nrc2> |
| 3746 |
\parbox[t]{37pc}{%} match extra parbox opening |
| 3747 |
\fontsize{18}{28}% |
| 3748 |
%</nrc2> |
| 3749 |
%<*nrc1> |
| 3750 |
\parbox[t]{28pc}{% |
| 3751 |
\fontsize{16}{24}% |
| 3752 |
%</nrc1> |
| 3753 |
\usefont\f@encoding\sfdefault mn% |
| 3754 |
\NRC@sectragged |
| 3755 |
\advance\rightskip 1pc\relax |
| 3756 |
\textcolor{white}{% |
| 3757 |
\vrule \@height21\p@ \@depth\z@ \@width\z@ |
| 3758 |
\@special@title |
| 3759 |
\vrule \@height\z@ \@depth9\p@ \@width\z@}% |
| 3760 |
}% |
| 3761 |
}% |
| 3762 |
\par |
| 3763 |
\pagestyle{nrcplain}% |
| 3764 |
\thispagestyle{nrcplain}% |
| 3765 |
\egroup |
| 3766 |
% \end{macrocode} |
| 3767 |
% |
| 3768 |
% This article \emph{only} has a special title, so we're now |
| 3769 |
% done\dots\par\noindent\dots\ but how do we signal that? Pro tem, |
| 3770 |
% we'll do a touch of the \cs{if@tempswa} diddling |
| 3771 |
% \begin{macrocode} |
| 3772 |
\@tempswafalse |
| 3773 |
\else |
| 3774 |
\@tempswatrue |
| 3775 |
\fi |
| 3776 |
\else |
| 3777 |
\@tempswatrue |
| 3778 |
\fi |
| 3779 |
% \end{macrocode} |
| 3780 |
% |
| 3781 |
% Now, we know whether we're to do an `ordinary' paper title (possibly |
| 3782 |
% in addition to a reversed-box special title); this knowledge is |
| 3783 |
% encoded in \cs{if@tempswa}, which we now use. |
| 3784 |
% |
| 3785 |
% Thereafter, we're generating an `ordinary title'. Evaluate width |
| 3786 |
% for box to hold the title (allowing for indent but not left rule) |
| 3787 |
% \begin{macrocode} |
| 3788 |
\if@tempswa |
| 3789 |
\@tempdima\textwidth |
| 3790 |
\advance\@tempdima -\NRC@titleoffset |
| 3791 |
\setbox\@tempboxa\vbox{% |
| 3792 |
\hsize\@tempdima |
| 3793 |
% \end{macrocode} |
| 3794 |
% |
| 3795 |
% Is there an `ordinary' special title? If so, we put it in now, so |
| 3796 |
% as to get it into the bit with a vertical bar along its side |
| 3797 |
% \begin{macrocode} |
| 3798 |
\if@specialtitle |
| 3799 |
\bgroup |
| 3800 |
\fboxsep\z@ |
| 3801 |
\noindent |
| 3802 |
\colorbox{black}{% |
| 3803 |
\hskip 1pc\relax |
| 3804 |
%<*nrc2> |
| 3805 |
\parbox[t]{37pc}{%} match extra parbox opening |
| 3806 |
\fontsize{18}{28}% |
| 3807 |
%</nrc2> |
| 3808 |
%<*nrc1> |
| 3809 |
\parbox[t]{28pc}{% |
| 3810 |
\fontsize{16}{24}% |
| 3811 |
%</nrc1> |
| 3812 |
\usefont\f@encoding\sfdefault mn% |
| 3813 |
\NRC@sectragged |
| 3814 |
\advance\rightskip 1pc\relax |
| 3815 |
\textcolor{white}{% |
| 3816 |
\vrule \@height21\p@ \@depth\z@ \@width\z@ |
| 3817 |
\@special@title |
| 3818 |
\vrule \@height\z@ \@depth9\p@ \@width\z@}% |
| 3819 |
}% |
| 3820 |
}% |
| 3821 |
\par |
| 3822 |
\vspace*{2pc}% |
| 3823 |
\egroup |
| 3824 |
\fi |
| 3825 |
% \end{macrocode} |
| 3826 |
% |
| 3827 |
% Now the common-or-garden `ordinary' title |
| 3828 |
% \begin{macrocode} |
| 3829 |
\fontsize{18}{24}% |
| 3830 |
\usefont\f@encoding\sfdefault cn% |
| 3831 |
\NRC@sectragged |
| 3832 |
\noindent\@title\par |
| 3833 |
\@tempdima 2.5pc |
| 3834 |
\advance\@tempdima -\prevdepth |
| 3835 |
\advance\@tempdima -11pt% *** pragmatic value *** |
| 3836 |
\vspace\@tempdima |
| 3837 |
\fontsize{11}\@xiipt |
| 3838 |
\selectfont\NRC@sectragged |
| 3839 |
\noindent\NRC@defaultauthorlist\par |
| 3840 |
\@tempdima 17\p@% 1.5pc - 1pt |
| 3841 |
\advance\@tempdima -\prevdepth |
| 3842 |
\vspace\@tempdima |
| 3843 |
}% |
| 3844 |
\@tempdima \NRC@titleoffset |
| 3845 |
\advance\@tempdima -4\p@ |
| 3846 |
\bgroup |
| 3847 |
\noindent\hb@xt@\hsize{% |
| 3848 |
\vrule \@width4\p@ |
| 3849 |
\kern \@tempdima |
| 3850 |
\vbox{\box\@tempboxa}% |
| 3851 |
}% |
| 3852 |
\parskip\z@skip |
| 3853 |
\par |
| 3854 |
\noindent\hrule \@height\p@ |
| 3855 |
\egroup |
| 3856 |
\global\NRC@IDboxtrue |
| 3857 |
\fi |
| 3858 |
} |
| 3859 |
% \end{macrocode} |
| 3860 |
% \end{macro} |
| 3861 |
% |
| 3862 |
% \begin{macro}{\NRC@makeIDbox} |
| 3863 |
% Syntax: \cs{NRC@makeIDbox}\marg{width} |
| 3864 |
% |
| 3865 |
% Makes an `ident box' for a paper, in the given width (which will |
| 3866 |
% typically be \cs{textwidth} or \cs{columnwidth}) |
| 3867 |
% |
| 3868 |
% If we are doing the original sort of ID box (either for the 1-column |
| 3869 |
% case, or the 2-column classes in the one-column-only case), we set |
| 3870 |
% the box into a float at the bottom of the page. It being an |
| 3871 |
% unknown sort of float, we could allocate it a float classification, |
| 3872 |
% but that seems a little \emph{de trop}, so we call it a figure. |
| 3873 |
% \begin{macrocode} |
| 3874 |
\newcommand{\NRC@makeIDbox}[1]{% |
| 3875 |
%<!nrc2>\@float{figure}[b!] |
| 3876 |
%<*nrc2> |
| 3877 |
% \end{macrocode} |
| 3878 |
% |
| 3879 |
% For the 2-column classes, we |
| 3880 |
% simply stick the ID box into a (\TeX) box, for later use by the |
| 3881 |
% title-page page style (if it's a 2-column-wide box), or for putting |
| 3882 |
% into a float \emph{after} two-column typesetting has been |
| 3883 |
% established. |
| 3884 |
% \begin{macrocode} |
| 3885 |
\setbox\NRC@theIDbox\vbox\bgroup |
| 3886 |
\hsize #1 |
| 3887 |
%</nrc2> |
| 3888 |
\noindent\hrule \@height\p@ |
| 3889 |
\@tempdima #1 |
| 3890 |
\advance\@tempdima -1pc |
| 3891 |
\setbox\@tempboxa\hbox{% |
| 3892 |
\smallt\NRC@received |
| 3893 |
}% |
| 3894 |
\setbox\@tempboxa\vbox{% |
| 3895 |
\hsize \@tempdima |
| 3896 |
\@tempdima 1pc |
| 3897 |
\advance\@tempdima -\ht\@tempboxa |
| 3898 |
\vspace{\@tempdima}% |
| 3899 |
% \end{macrocode} |
| 3900 |
% |
| 3901 |
% If the IDbox is going to be set in two columns internally, start up |
| 3902 |
% multicols now; we zero the multicolumn separator to avoid excessive |
| 3903 |
% vertical spacing at the top of the IDbox (note that since we're |
| 3904 |
% inside a \cs{vbox} at this stage we can rely on grouping to restore |
| 3905 |
% the value for us) |
| 3906 |
% \begin{macrocode} |
| 3907 |
%<*nrc2> |
| 3908 |
\if@onecolid\else |
| 3909 |
\if@multcolid |
| 3910 |
\linewidth \hsize |
| 3911 |
\multicolsep\z@skip |
| 3912 |
\columnsep 1.5pc |
| 3913 |
\begin{multicols}{2} |
| 3914 |
\fi |
| 3915 |
\fi |
| 3916 |
%</nrc2> |
| 3917 |
% \end{macrocode} |
| 3918 |
% |
| 3919 |
% Insert the received/accepted/`other ID dates'/`published on the web |
| 3920 |
% site' line(s). The [rev]received/[rev]accepted commands sort out their |
| 3921 |
% own internal spacing, and a global marker (\cs{NRC@received@sep}) says |
| 3922 |
% whether a space is needed before the next thing in the ID box. |
| 3923 |
% \begin{macrocode} |
| 3924 |
\noindent |
| 3925 |
{% |
| 3926 |
\smallt |
| 3927 |
\NRC@received |
| 3928 |
\ifNRC@webpub |
| 3929 |
\NRC@received@sep |
| 3930 |
\NRC@webpub |
| 3931 |
\fi |
| 3932 |
\par |
| 3933 |
}% |
| 3934 |
\vspace{7\p@}% *** pragmatic value *** |
| 3935 |
% \end{macrocode} |
| 3936 |
% |
| 3937 |
% Change font size for the next few things |
| 3938 |
% \begin{macrocode} |
| 3939 |
\smallt |
| 3940 |
% \end{macrocode} |
| 3941 |
% |
| 3942 |
% Insert the associate editor's name, if there is one |
| 3943 |
% \begin{macrocode} |
| 3944 |
\ifNRC@assoced |
| 3945 |
\noindent\NRC@assoced\par |
| 3946 |
\vspace{7\p@}% *** pragmatic value *** |
| 3947 |
\fi |
| 3948 |
% \end{macrocode} |
| 3949 |
% |
| 3950 |
% Insert the corresponding editor's name, if there is one |
| 3951 |
% \begin{macrocode} |
| 3952 |
\ifNRC@corred |
| 3953 |
\noindent\NRC@corred\par |
| 3954 |
\vspace{7\p@}% *** pragmatic value *** |
| 3955 |
\fi |
| 3956 |
% \end{macrocode} |
| 3957 |
% |
| 3958 |
% Insert the dedication, if there is one |
| 3959 |
% \begin{macrocode} |
| 3960 |
\ifNRC@dedication |
| 3961 |
\bgroup |
| 3962 |
\NRC@sectragged |
| 3963 |
\noindent |
| 3964 |
\textit{\NRC@dedication}\par |
| 3965 |
\vspace{7\p@}% *** pragmatic value *** |
| 3966 |
\egroup |
| 3967 |
\fi |
| 3968 |
% \end{macrocode} |
| 3969 |
% |
| 3970 |
% Insert the list of abbreviations, if there is one |
| 3971 |
% \begin{macrocode} |
| 3972 |
\if@abbreviations |
| 3973 |
\bgroup |
| 3974 |
\NRC@sectragged |
| 3975 |
\noindent |
| 3976 |
\textbf{\NRC@text@abbreviations\ifNRC@french~\fi\string:}% |
| 3977 |
\ \@abbreviations\par |
| 3978 |
\vspace{7\p@}% *** pragmatic value *** |
| 3979 |
\egroup |
| 3980 |
\fi |
| 3981 |
% \end{macrocode} |
| 3982 |
% |
| 3983 |
% Now the list of authors and their |
| 3984 |
% addresses |
| 3985 |
% \begin{macrocode} |
| 3986 |
{% |
| 3987 |
\@NRC@AddressCommands |
| 3988 |
\NRC@default@authaddlist |
| 3989 |
% \end{macrocode} |
| 3990 |
% |
| 3991 |
% Add the comment deadline note |
| 3992 |
% \begin{macrocode} |
| 3993 |
\ifNRC@commdate |
| 3994 |
\vspace{7\p@}% pragmatic |
| 3995 |
\noindent\NRC@commdate\par |
| 3996 |
\fi |
| 3997 |
% \end{macrocode} |
| 3998 |
% |
| 3999 |
% and finally the footnote bodies, if there are any |
| 4000 |
% \begin{macrocode} |
| 4001 |
\ifx\NRC@addrfnbody\@empty |
| 4002 |
\else |
| 4003 |
\vspace{7\p@}% *** pragmatic value *** |
| 4004 |
\NRC@addrfnbody |
| 4005 |
\fi |
| 4006 |
}% |
| 4007 |
%<*nrc2> |
| 4008 |
\if@onecolid\else |
| 4009 |
\if@multcolid |
| 4010 |
\end{multicols} |
| 4011 |
\fi |
| 4012 |
\fi |
| 4013 |
%</nrc2> |
| 4014 |
}% |
| 4015 |
% \end{macrocode} |
| 4016 |
% (That brace closes the assignation to \cs{@tempboxa}.) |
| 4017 |
% |
| 4018 |
% And now finish off the float that makes up the ID box |
| 4019 |
% \begin{macrocode} |
| 4020 |
\@tempdima 1pc |
| 4021 |
\advance\@tempdima -4\p@ |
| 4022 |
\noindent\hb@xt@#1{% |
| 4023 |
\vrule \@width4\p@ |
| 4024 |
\kern \@tempdima |
| 4025 |
\vbox{\box\@tempboxa}% |
| 4026 |
} |
| 4027 |
%<!nrc2>\end@float |
| 4028 |
%<*nrc2> |
| 4029 |
\egroup |
| 4030 |
\if@onecolid |
| 4031 |
\else |
| 4032 |
% \typeout{\string\NRC@theIDbox: ht=\the\ht\NRC@theIDbox, |
| 4033 |
% dp=\the\dp\NRC@theIDbox}% |
| 4034 |
\@tempdima \ht\NRC@theIDbox |
| 4035 |
\advance\@tempdima \dp\NRC@theIDbox |
| 4036 |
\advance\@tempdima \textfloatsep |
| 4037 |
\global\advance\@colht -\@tempdima |
| 4038 |
\global\@colroom \@colht |
| 4039 |
\global\vsize \@colht |
| 4040 |
\global\pagegoal \@colht |
| 4041 |
\global\advance\footskip \@tempdima |
| 4042 |
\fi |
| 4043 |
%</nrc2> |
| 4044 |
\thispagestyle{nrctitlepage}% |
| 4045 |
} |
| 4046 |
% \end{macrocode} |
| 4047 |
% \end{macro} |
| 4048 |
% |
| 4049 |
% \begin{macro}{\NRC@restorefootskip} |
| 4050 |
% Used to restore \cs{footskip} after mucking about with it in |
| 4051 |
% case we're going to encounter a huge great monster |
| 4052 |
% abstract/r\'esum\'e; can be used anywhere at any time, since it's |
| 4053 |
% restoring a default value\dots |
| 4054 |
% \begin{macrocode} |
| 4055 |
\xdef\NRC@restorefootskip{% |
| 4056 |
\global\noexpand\footskip\the\footskip}% |
| 4057 |
% \end{macrocode} |
| 4058 |
% \end{macro} |
| 4059 |
% |
| 4060 |
% \subsection{Abstract and R\'esum\'e} |
| 4061 |
% |
| 4062 |
% \begin{environment}{abstract} |
| 4063 |
% \begin{environment}{resume} |
| 4064 |
% \begin{macro}{\NRC@absressep} |
| 4065 |
% \begin{macro}{\NRC@extract@name} |
| 4066 |
% The abstract and r\'esum\'e are specified as simple list |
| 4067 |
% environments, and preserved in a token register. Nothing special is |
| 4068 |
% done about their body, and no effort is made to enforce the order |
| 4069 |
% (i.e., English or French first) that they appear. Apart from the |
| 4070 |
% name (and the fact that the abstract environment already exists, so |
| 4071 |
% that it must needs be redefined) they are implemented by identical |
| 4072 |
% code. If Babel is loaded with the appropriate language, each |
| 4073 |
% environment safely (i.e., without writing the \verb|.aux| file) |
| 4074 |
% selects the appropriate language within itself. |
| 4075 |
% |
| 4076 |
% In the case of the nrc1 class, the token register is immediately |
| 4077 |
% typeset. In the case of the nrc2 class, the token registers are |
| 4078 |
% stored for use when a \cs{maketitle} command is issued. |
| 4079 |
% |
| 4080 |
% \cs{NRC@absressep} is the value to use for \cs{topsep} for the |
| 4081 |
% \emph{top} only of the \texttt{trivlist} implementation of the |
| 4082 |
% environments (\cs{z@} is used at the bottom of the environments: |
| 4083 |
% things get out of hand otherwise\dots). It gets multiplied by |
| 4084 |
% \cs{p@}. |
| 4085 |
% |
| 4086 |
% The other skips are played fast and loose with, too, inside the |
| 4087 |
% environments' groups. \cs{partopsep} is set zero, since we want |
| 4088 |
% absolute control of separation, and the stretchability of |
| 4089 |
% \cs{parskip} is also stamped upon while we execute the \cs{trivlist} |
| 4090 |
% command that establishes our `list'. |
| 4091 |
% \begin{macrocode} |
| 4092 |
\newcommand\NRC@absressep{18} |
| 4093 |
\renewenvironment{abstract}{% |
| 4094 |
\NRC@gather@env{\expandafter\topsep\NRC@absressep\p@ |
| 4095 |
\partopsep\z@ |
| 4096 |
\parskip\z@ |
| 4097 |
\trivlist |
| 4098 |
\parskip0\p@ \@plus\p@ |
| 4099 |
\leftmargin \NRC@titleoffset |
| 4100 |
\advance\linewidth -\leftmargin |
| 4101 |
\advance\linewidth -\rightmargin |
| 4102 |
\advance\@totalleftmargin \leftmargin |
| 4103 |
\parshape \@ne \@totalleftmargin \linewidth |
| 4104 |
\item[]% |
| 4105 |
\let\NRC@extract@name\@firstoftwo |
| 4106 |
\ifx\extrasenglish\@undefined |
| 4107 |
\else |
| 4108 |
\select@language{english}% |
| 4109 |
\fi |
| 4110 |
\smalll |
| 4111 |
\textbf{\abstractname}:% |
| 4112 |
\NRC@sectragged |
| 4113 |
\ \ignorespaces}}% |
| 4114 |
%<*nrc1> |
| 4115 |
{% |
| 4116 |
\the\NRC@gather@toks |
| 4117 |
\@topsepadd\z@ |
| 4118 |
\endtrivlist |
| 4119 |
\gdef\NRC@absressep{8}} |
| 4120 |
%</nrc1> |
| 4121 |
% \end{macrocode} |
| 4122 |
% |
| 4123 |
% In the two-column classes, we don't typeset the abstract (or |
| 4124 |
% r\'esum\'e) as we come to it, merely relying on having saved it in |
| 4125 |
% \cs{NRC@abstract@i(i)} and dumping it out in the course of |
| 4126 |
% \cs{maketitle}'s ``full-width'' phase. |
| 4127 |
% \begin{macrocode} |
| 4128 |
%<nrc2> {} |
| 4129 |
% \end{macrocode} |
| 4130 |
% |
| 4131 |
% Now the analagous things for the French r\'esum\'e |
| 4132 |
% \begin{macrocode} |
| 4133 |
\newenvironment{resume}{% |
| 4134 |
\NRC@gather@env{\expandafter\topsep\NRC@absressep\p@ |
| 4135 |
\partopsep\z@ |
| 4136 |
\parskip\z@ |
| 4137 |
\trivlist |
| 4138 |
\parskip0\p@ \@plus\p@ |
| 4139 |
\leftmargin \NRC@titleoffset |
| 4140 |
\advance\linewidth -\leftmargin |
| 4141 |
\advance\linewidth -\rightmargin |
| 4142 |
\advance\@totalleftmargin \leftmargin |
| 4143 |
\parshape \@ne \@totalleftmargin \linewidth |
| 4144 |
\item[]% |
| 4145 |
\let\NRC@extract@name\@secondoftwo |
| 4146 |
\ifx\extrasfrench\@undefined |
| 4147 |
\else |
| 4148 |
\select@language{french}% |
| 4149 |
\fi |
| 4150 |
\smalll |
| 4151 |
\textbf{\nomresume}\,:% |
| 4152 |
\NRC@sectragged |
| 4153 |
\ \ignorespaces}}% |
| 4154 |
%<*nrc1> |
| 4155 |
{% |
| 4156 |
\the\NRC@gather@toks |
| 4157 |
\@topsepadd\z@ |
| 4158 |
\endtrivlist |
| 4159 |
\gdef\NRC@absressep{8}} |
| 4160 |
%</nrc1> |
| 4161 |
%<nrc2> {} |
| 4162 |
% \end{macrocode} |
| 4163 |
% \end{macro} |
| 4164 |
% \end{macro} |
| 4165 |
% \end{environment} |
| 4166 |
% \end{environment} |
| 4167 |
% |
| 4168 |
% \begin{macro}{\nomresume} |
| 4169 |
% \begin{macro}{\traduit} |
| 4170 |
% \begin{macro}{\Traduit} |
| 4171 |
% \begin{macro}{\translation} |
| 4172 |
% \begin{macro}{\keywords} |
| 4173 |
% \begin{macro}{\motscles} |
| 4174 |
% \begin{macro}{\PACS} |
| 4175 |
% \begin{macro}{\NRC@PACS@en} |
| 4176 |
% \begin{macro}{\NRC@PACS@ens} |
| 4177 |
% \begin{macro}{\NRC@PACS@fr} |
| 4178 |
% \begin{macro}{\NRC@PACS@frs} |
| 4179 |
% Various small supporting macros for the above. |
| 4180 |
% |
| 4181 |
% \cs{traduit} is used at the end of a r\'esum\'e when the author |
| 4182 |
% hasn't provided a French version: the editors have translated the |
| 4183 |
% English abstract, and \cs{traduit} records this fact. Similarly, |
| 4184 |
% \cs{translation} is used at the end of an abstract that has been |
| 4185 |
% translated for a French-writing author. |
| 4186 |
% |
| 4187 |
% \cs{Traduit} is as \cs{traduit}, but with a capital letter for |
| 4188 |
% r\'edaction\dots |
| 4189 |
% |
| 4190 |
% \cs{keywords} and \cs{motscles} may also be used within an abstract |
| 4191 |
% or resume (respectively) environment. If used, they should appear |
| 4192 |
% immediately after the body of the abstract and above any |
| 4193 |
% \cs{traduit} or \cs{translation} command. |
| 4194 |
% |
| 4195 |
% \cs{PACS} generates PACS code entries for the end of abstracts or |
| 4196 |
% resum\'es; it ``knows'' which language to use, from the setting of |
| 4197 |
% \cs{NRC@extract@name}. |
| 4198 |
% \begin{macrocode} |
| 4199 |
\newcommand\nomresume{R\'esum\'e} |
| 4200 |
\newcommand\traduit{\par\vspace{4\p@}\noindent |
| 4201 |
[Traduit par la r\'edaction]% |
| 4202 |
} |
| 4203 |
\newcommand\Traduit{\par\vspace{4\p@}\noindent |
| 4204 |
[Traduit par la R\'edaction]% |
| 4205 |
} |
| 4206 |
\newcommand\translation{\par\vspace{4\p@}\noindent |
| 4207 |
[Journal translation]% |
| 4208 |
} |
| 4209 |
\newcommand\keywords[1]{\par\vspace{4\p@}\noindent |
| 4210 |
\emph{Key words:}\ #1.% |
| 4211 |
} |
| 4212 |
\newcommand\motscles[1]{\par\vspace{4\p@}\noindent |
| 4213 |
\emph{Mots cl\'es\,:}\ #1.% |
| 4214 |
} |
| 4215 |
\newcommand\PACS{% |
| 4216 |
\par\vspace{4\p@}% |
| 4217 |
\noindent PACS\ % |
| 4218 |
\@ifstar{% |
| 4219 |
\NRC@extract@name\NRC@PACS@ens\NRC@PACS@frs |
| 4220 |
}{% |
| 4221 |
\NRC@extract@name\NRC@PACS@en\NRC@PACS@fr |
| 4222 |
}% |
| 4223 |
} |
| 4224 |
\newcommand\NRC@PACS@ens[1]{No.:\ #1} |
| 4225 |
\newcommand\NRC@PACS@en[1]{Nos.:\ #1} |
| 4226 |
\newcommand\NRC@PACS@frs[1]{N\textsuperscript{o}\,:\ #1} |
| 4227 |
\newcommand\NRC@PACS@fr[1]{N\textsuperscript{os}\,:\ #1} |
| 4228 |
% \end{macrocode} |
| 4229 |
% \end{macro} |
| 4230 |
% \end{macro} |
| 4231 |
% \end{macro} |
| 4232 |
% \end{macro} |
| 4233 |
% \end{macro} |
| 4234 |
% \end{macro} |
| 4235 |
% \end{macro} |
| 4236 |
% \end{macro} |
| 4237 |
% \end{macro} |
| 4238 |
% \end{macro} |
| 4239 |
% \end{macro} |
| 4240 |
% |
| 4241 |
% \begin{macro}{\NRC@abstract@toks} |
| 4242 |
% \begin{macro}{\NRC@resume@toks} |
| 4243 |
% \begin{macro}{\NRC@gather@toks} |
| 4244 |
% In the two-column classes, \cs{NRC@abstract@toks} and |
| 4245 |
% \cs{NRC@resume@toks} are used to gather the abstract or r\'esum\'e; |
| 4246 |
% in the physics class both are gathered in \cs{NRC@gather@toks} |
| 4247 |
% \begin{macrocode} |
| 4248 |
%<nrc2>\newtoks\NRC@abstract@toks |
| 4249 |
%<nrc2>\newtoks\NRC@resume@toks |
| 4250 |
%<nrc1>\newtoks\NRC@gather@toks |
| 4251 |
% \end{macrocode} |
| 4252 |
% \end{macro} |
| 4253 |
% \end{macro} |
| 4254 |
% \end{macro} |
| 4255 |
% |
| 4256 |
% \begin{macro}{\NRC@gather@env} |
| 4257 |
% Syntax: \cs{NRC@gather@env}\marg{preamble} |
| 4258 |
% |
| 4259 |
% Gather the contents of a text environment into the corresponding |
| 4260 |
% token register. The routine assumes that it's gathering an |
| 4261 |
% abstract's content, and inserts the \meta{preamble} in front of the |
| 4262 |
% gathered text (this will be language selection, `Abstract' or |
| 4263 |
% `R\'esum\'e', and the start of the doings of the abstract |
| 4264 |
% environment itself). (There's no need of a postamble, since the |
| 4265 |
% same termination is used in both cases. This is a bit of a relief, |
| 4266 |
% since it would be dead tricky to program.) |
| 4267 |
% |
| 4268 |
% The routine has the side effect of setting up \cs{NRC@abstract@i} |
| 4269 |
% (to the token register containing the first abstract gathered) and |
| 4270 |
% \cs{NRC@abstract@ii} (to the second one) |
| 4271 |
% |
| 4272 |
% This code uses what (now) seems a Usual trick (it originally |
| 4273 |
% derives, in my experience, from David Carlisle's tabularx package). |
| 4274 |
% \begin{macrocode} |
| 4275 |
\newcommand\NRC@gather@env[1]{% |
| 4276 |
\let\NRC@gathering\@currenvir |
| 4277 |
%<*nrc2> |
| 4278 |
\expandafter\let\expandafter\NRC@gather@toks |
| 4279 |
\csname NRC@\NRC@gathering @toks\endcsname |
| 4280 |
%</nrc2> |
| 4281 |
\global\NRC@gather@toks{#1}% |
| 4282 |
{\ifnum0=`}\fi |
| 4283 |
\NRC@gather@body |
| 4284 |
} |
| 4285 |
% \end{macrocode} |
| 4286 |
% \end{macro} |
| 4287 |
% |
| 4288 |
% \begin{macro}{\NRC@gather@body} |
| 4289 |
% Syntax: \cs{NRC@gather@body}\marg{body-portion}\cs{end} |
| 4290 |
% |
| 4291 |
% Gathers the body of an environment up to the next instance of |
| 4292 |
% \cs{end} |
| 4293 |
% \begin{macrocode} |
| 4294 |
\long\def\NRC@gather@body#1\end{% |
| 4295 |
\global\NRC@gather@toks\expandafter{\the\NRC@gather@toks#1}% |
| 4296 |
\NRC@gather@findend |
| 4297 |
} |
| 4298 |
% \end{macrocode} |
| 4299 |
% \end{macro} |
| 4300 |
% |
| 4301 |
% \begin{macro}{\NRC@gather@findend} |
| 4302 |
% Syntax: \cs{NRC@gather@findend}\marg{end-arg} |
| 4303 |
% |
| 4304 |
% Checks the `argument' that the user thought she was giving to the |
| 4305 |
% \cs{end} `command' that terminated the argument of a |
| 4306 |
% \cs{NRC@gather@body} |
| 4307 |
% \begin{macrocode} |
| 4308 |
\newcommand\NRC@gather@findend[1]{% |
| 4309 |
\def\@tempa{#1}% |
| 4310 |
\ifx\@tempa\NRC@gathering |
| 4311 |
\expandafter\NRC@gather@end |
| 4312 |
\else |
| 4313 |
\global\NRC@gather@toks\expandafter{\the\NRC@gather@toks\end{#1}}% |
| 4314 |
\expandafter\NRC@gather@body |
| 4315 |
\fi |
| 4316 |
} |
| 4317 |
% \end{macrocode} |
| 4318 |
% \end{macro} |
| 4319 |
% |
| 4320 |
% \begin{macro}{\NRC@gather@end} |
| 4321 |
% \begin{macro}{\NRC@abstract@i} |
| 4322 |
% \begin{macro}{\NRC@abstract@ii} |
| 4323 |
% Syntax: \cs{NRC@gather@end} |
| 4324 |
% |
| 4325 |
% Terminates a gathering operation, by closing the group it's operated |
| 4326 |
% in, setting up the appropriate \cs{NRC@abstract@i(i)} if necessary |
| 4327 |
% and finally issuing an `end \meta{gather-environment}' command. |
| 4328 |
% \begin{macrocode} |
| 4329 |
\newcommand\NRC@gather@end{% |
| 4330 |
\ifnum0=`{\fi}% |
| 4331 |
% \end{macrocode} |
| 4332 |
% |
| 4333 |
% we only need preserve the token registers if we're in a two-column |
| 4334 |
% class |
| 4335 |
% \begin{macrocode} |
| 4336 |
%<*nrc2> |
| 4337 |
\ifx\NRC@abstract@i\@undefined |
| 4338 |
\global\let\NRC@abstract@i \NRC@gather@toks |
| 4339 |
\else |
| 4340 |
\global\let\NRC@abstract@ii\NRC@gather@toks |
| 4341 |
\fi |
| 4342 |
%</nrc2> |
| 4343 |
\expandafter\end\expandafter{\NRC@gathering}% |
| 4344 |
} |
| 4345 |
% \end{macrocode} |
| 4346 |
% \end{macro} |
| 4347 |
% \end{macro} |
| 4348 |
% \end{macro} |
| 4349 |
% |
| 4350 |
% |
| 4351 |
% \section{Font size definitions} |
| 4352 |
% |
| 4353 |
% \begin{macro}{\easebaselines} |
| 4354 |
% \begin{macro}{\ifNRC@easedbaselines} |
| 4355 |
% \begin{macro}{\ifNRC@relaxedspacing} |
| 4356 |
% Syntax: \cs{easebaselines} |
| 4357 |
% |
| 4358 |
% An editorial command for two-column papers: if a decision is taken |
| 4359 |
% to ease the baselines of the paper, this command is issued: the |
| 4360 |
% effect is very slightly to ease the values for \cs{baselineskip} |
| 4361 |
% used for \cs{normalsize}, \cs{small} and \cs{footnotesize} font |
| 4362 |
% selections. A preamble command, only. |
| 4363 |
% |
| 4364 |
% \cs{ifNRC@relaxedspacing} allows the extended relaxation of skips |
| 4365 |
% (above sectioning commands, around floats, and around equations) |
| 4366 |
% that seems to be necessary in some cases. The switch is a separate |
| 4367 |
% on from \cs{ifNRC@easedbaselines}, at present, though implemented |
| 4368 |
% (as it were) as a sub-switch; however it always has the same value |
| 4369 |
% as the main switch. |
| 4370 |
% \begin{macrocode} |
| 4371 |
\newif\ifNRC@easedbaselines \NRC@easedbaselinesfalse |
| 4372 |
\newif\ifNRC@relaxedspacing \NRC@relaxedspacingfalse |
| 4373 |
\newcommand*{\easebaselines}{% |
| 4374 |
\ifNRC@author@use |
| 4375 |
\NRC@warning{\string\easebaselines\space is an editor command} |
| 4376 |
\fi |
| 4377 |
\NRC@easedbaselinestrue |
| 4378 |
% \NRC@relaxedspacingtrue |
| 4379 |
\AtBeginDocument{\renewcommand{\arraystretch}{1.05}}% |
| 4380 |
} |
| 4381 |
\@onlypreamble\easebaselines |
| 4382 |
% \end{macrocode} |
| 4383 |
% \end{macro} |
| 4384 |
% \end{macro} |
| 4385 |
% \end{macro} |
| 4386 |
% |
| 4387 |
% \begin{macro}{\normalsize} |
| 4388 |
% The user level command for the main size is |\normalsize|. |
| 4389 |
% Internally \LaTeX{} uses |\@normalsize| when it refers to the |
| 4390 |
% main size. |\@normalsize| will be defined to work like |
| 4391 |
% |\normalsize| if the latter is redefined from its default |
| 4392 |
% definition (that just issues an error message). Otherwise |
| 4393 |
% |\@normalsize| simply selects a \texttt{10pt}/\texttt{12pt} size. |
| 4394 |
% |
| 4395 |
% The |\normalsize| macro also sets new values for\\ |
| 4396 |
% |\abovedisplayskip|, |\abovedisplayshortskip| and |
| 4397 |
% |\belowdisplayshortskip|. |
| 4398 |
% \begin{macrocode} |
| 4399 |
\renewcommand{\normalsize}{% |
| 4400 |
%<nrc2> \ifNRC@easedbaselines |
| 4401 |
\@setfontsize\normalsize\@xpt\@xiipt |
| 4402 |
%<*nrc2> |
| 4403 |
\else |
| 4404 |
\@setfontsize\normalsize\@xpt{11}% |
| 4405 |
\fi |
| 4406 |
%</nrc2> |
| 4407 |
\ifNRC@relaxedspacing |
| 4408 |
\abovedisplayskip 10\p@ \@plus0.0003fil \@minus5\p@ |
| 4409 |
\else |
| 4410 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 4411 |
\fi |
| 4412 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 4413 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 4414 |
% \end{macrocode} |
| 4415 |
% |
| 4416 |
% The |\belowdisplayskip| is always equal to the |
| 4417 |
% |\abovedisplayskip|. The parameters of the first level list at |
| 4418 |
% \cs{normalsize} are always given by |\@listI|. |
| 4419 |
% \begin{macrocode} |
| 4420 |
\belowdisplayskip \abovedisplayskip |
| 4421 |
\let\@listi\@listI} |
| 4422 |
% \end{macrocode} |
| 4423 |
% |
| 4424 |
% We initially choose the normalsize font (article class does this, |
| 4425 |
% but it's also done in \cs{begin}|{document}|, so it's not entirely |
| 4426 |
% clear what the point is\dots). |
| 4427 |
% \begin{macrocode} |
| 4428 |
\normalsize |
| 4429 |
% \end{macrocode} |
| 4430 |
% \end{macro} |
| 4431 |
% |
| 4432 |
% \begin{macro}{\small} |
| 4433 |
% This is similar to |\normalsize|. |
| 4434 |
% \begin{macrocode} |
| 4435 |
\renewcommand{\small}{% |
| 4436 |
%<nrc2> \ifNRC@easedbaselines |
| 4437 |
\@setfontsize\small\@ixpt{11}% |
| 4438 |
%<*nrc2> |
| 4439 |
\else |
| 4440 |
\@setfontsize\small\@ixpt\@xpt |
| 4441 |
\fi |
| 4442 |
%</nrc2> |
| 4443 |
\ifNRC@relaxedspacing |
| 4444 |
\abovedisplayskip 8.5\p@ \@plus0.0003fil \@minus4\p@ |
| 4445 |
\else |
| 4446 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ |
| 4447 |
\fi |
| 4448 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 4449 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 4450 |
\def\@listi{\leftmargin\leftmargini |
| 4451 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 4452 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 4453 |
\itemsep \parsep}% |
| 4454 |
\belowdisplayskip \abovedisplayskip |
| 4455 |
} |
| 4456 |
% \end{macrocode} |
| 4457 |
% \end{macro} |
| 4458 |
% |
| 4459 |
% \begin{macro}{\smalll} |
| 4460 |
% \begin{macro}{\smallt} |
| 4461 |
% These are variants of \cs{small} for use where the baseline spacing |
| 4462 |
% is fixed regardless of the state of \cs{easedbaselines}; \cs{smalll} |
| 4463 |
% (loose small) has 11pt baseline skip; \cs{smallt} (tight small) has |
| 4464 |
% 10pt baseline skip. |
| 4465 |
% \begin{macrocode} |
| 4466 |
\newcommand{\smalll}{% |
| 4467 |
\@setfontsize\small\@ixpt{11}% |
| 4468 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 4469 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 4470 |
\def\@listi{\leftmargin\leftmargini |
| 4471 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 4472 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 4473 |
\itemsep \parsep}% |
| 4474 |
\belowdisplayskip \abovedisplayskip |
| 4475 |
} |
| 4476 |
\newcommand{\smallt}{% |
| 4477 |
\@setfontsize\small\@ixpt\@xpt |
| 4478 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ |
| 4479 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 4480 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 4481 |
\def\@listi{\leftmargin\leftmargini |
| 4482 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 4483 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 4484 |
\itemsep \parsep}% |
| 4485 |
\belowdisplayskip \abovedisplayskip |
| 4486 |
} |
| 4487 |
% \end{macrocode} |
| 4488 |
% \end{macro} |
| 4489 |
% \end{macro} |
| 4490 |
% |
| 4491 |
% \begin{macro}{\footnotesize} |
| 4492 |
% This is similar to |\normalsize|. |
| 4493 |
% \begin{macrocode} |
| 4494 |
\renewcommand{\footnotesize}{% |
| 4495 |
%<nrc2> \ifNRC@easedbaselines |
| 4496 |
\@setfontsize\footnotesize\@viiipt{9.5}% |
| 4497 |
%<*nrc2> |
| 4498 |
\else |
| 4499 |
\@setfontsize\footnotesize\@viiipt\@ixpt |
| 4500 |
\fi |
| 4501 |
%</nrc2> |
| 4502 |
\ifNRC@relaxedspacing |
| 4503 |
\abovedisplayskip 6\p@ \@plus0.0003fil \@minus4\p@ |
| 4504 |
\else |
| 4505 |
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ |
| 4506 |
\fi |
| 4507 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 4508 |
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ |
| 4509 |
\def\@listi{\leftmargin\leftmargini |
| 4510 |
\topsep 3\p@ \@plus\p@ \@minus\p@ |
| 4511 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 4512 |
\itemsep \parsep}% |
| 4513 |
\belowdisplayskip \abovedisplayskip |
| 4514 |
} |
| 4515 |
% \end{macrocode} |
| 4516 |
% \end{macro} |
| 4517 |
% |
| 4518 |
% \begin{macro}{\scriptsize} |
| 4519 |
% \begin{macro}{\tiny} |
| 4520 |
% \begin{macro}{\large} |
| 4521 |
% \begin{macro}{\Large} |
| 4522 |
% \begin{macro}{\LARGE} |
| 4523 |
% \begin{macro}{\huge} |
| 4524 |
% \begin{macro}{\Huge} |
| 4525 |
% These are all much simpler than the previous macros: they just |
| 4526 |
% select a new fontsize, but leave the parameters for displays and |
| 4527 |
% lists alone. |
| 4528 |
% \begin{macrocode} |
| 4529 |
\renewcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt} |
| 4530 |
\renewcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt} |
| 4531 |
\renewcommand{\large}{\@setfontsize\large\@xiipt{14}} |
| 4532 |
\renewcommand{\Large}{\@setfontsize\Large\@xivpt{18}} |
| 4533 |
\renewcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{22}} |
| 4534 |
\renewcommand{\huge}{\@setfontsize\huge\@xxpt{25}} |
| 4535 |
\renewcommand{\Huge}{\@setfontsize\Huge\@xxvpt{30}} |
| 4536 |
% \end{macrocode} |
| 4537 |
% \end{macro} |
| 4538 |
% \end{macro} |
| 4539 |
% \end{macro} |
| 4540 |
% \end{macro} |
| 4541 |
% \end{macro} |
| 4542 |
% \end{macro} |
| 4543 |
% \end{macro} |
| 4544 |
% |
| 4545 |
% \section{Divisions of the paper} |
| 4546 |
% |
| 4547 |
% \begin{macro}{\NRC@sectragged} |
| 4548 |
% All the section titles that aren't run-in (as well as a whole bunch |
| 4549 |
% of other things) are set ragged right, which we define as: |
| 4550 |
% \begin{macrocode} |
| 4551 |
\newcommand{\NRC@sectragged}{\hyphenpenalty\@M |
| 4552 |
\rightskip\z@ \@plus 5em |
| 4553 |
\parfillskip\z@ \@plus 1fil |
| 4554 |
\spaceskip=0.3333em\relax |
| 4555 |
\xspaceskip=0.5em\relax |
| 4556 |
} |
| 4557 |
% \end{macrocode} |
| 4558 |
% \end{macro} |
| 4559 |
% |
| 4560 |
% \subsection{\LaTeX{} `sections'} |
| 4561 |
% |
| 4562 |
% \begin{macro}{\section} |
| 4563 |
% \begin{macro}{\Asection} |
| 4564 |
% \begin{macro}{\subsection} |
| 4565 |
% \begin{macro}{\Bsection} |
| 4566 |
% \begin{macro}{\subsubsection} |
| 4567 |
% \begin{macro}{\Csection} |
| 4568 |
% \begin{macro}{\subsubsubsection} |
| 4569 |
% \begin{macro}{\Dsection} |
| 4570 |
% \begin{macro}{\paragraph} |
| 4571 |
% \begin{macro}{\Esection} |
| 4572 |
% |
| 4573 |
% The following definitions all incorporate the baseline-baseline |
| 4574 |
% skips of the specification in a slightly cavalier way: the skip is |
| 4575 |
% calculated out in points, and the font size of the following text is |
| 4576 |
% subtracted. This is inaccurate because (1) the depth of the text |
| 4577 |
% above is ignored (how would one find it?), and (2) the font size is |
| 4578 |
% only rather loosely related to the typical height of a line of |
| 4579 |
% text. However, the results prove acceptable, so let's not worry! |
| 4580 |
% \begin{macrocode} |
| 4581 |
\renewcommand\section{% |
| 4582 |
\@startsection{section}% |
| 4583 |
\@ne |
| 4584 |
\z@ |
| 4585 |
%<*nrc1> |
| 4586 |
{12\p@ \@plus4.5\p@ \@minus1.5\p@}% |
| 4587 |
{6\p@}% |
| 4588 |
%</nrc1> |
| 4589 |
%<*nrc2> |
| 4590 |
{18\p@ \@plus6\p@}% |
| 4591 |
{6\p@ \@plus3\p@}% |
| 4592 |
%</nrc2> |
| 4593 |
{\fontsize{11}{12}% |
| 4594 |
%<nrc2> \let\@hangfrom\@firstofone\noindent |
| 4595 |
\usefont\f@encoding\sfdefault cn% |
| 4596 |
\NRC@sectragged}% |
| 4597 |
} |
| 4598 |
\let\Asection\section |
| 4599 |
\renewcommand\subsection{% |
| 4600 |
\@startsection{subsection}% |
| 4601 |
\tw@ |
| 4602 |
\z@ |
| 4603 |
%<*nrc2> |
| 4604 |
{12\p@ \@plus6\p@}% |
| 4605 |
{.1\p@ \@plus2\p@}% |
| 4606 |
%</nrc2> |
| 4607 |
%<*nrc1> |
| 4608 |
{14\p@ \@plus4.5\p@ \@minus1.5\p@}% |
| 4609 |
{2\p@ \@plus \p@}% |
| 4610 |
%</nrc1> |
| 4611 |
{\reset@font\bfseries |
| 4612 |
%<nrc2> \let\@hangfrom\@firstofone\noindent |
| 4613 |
\NRC@sectragged}% |
| 4614 |
} |
| 4615 |
\let\Bsection\subsection |
| 4616 |
\renewcommand\subsubsection{% |
| 4617 |
\@startsection{subsubsection}% |
| 4618 |
\thr@@ |
| 4619 |
\z@ |
| 4620 |
%<*nrc2> |
| 4621 |
{9\p@ \@plus3\p@}% |
| 4622 |
{.1\p@ \@plus2\p@}% |
| 4623 |
%</nrc2> |
| 4624 |
%<*nrc1> |
| 4625 |
{14\p@ \@plus4.5\p@ \@minus1.5\p@}% |
| 4626 |
{2\p@ \@plus \p@}% |
| 4627 |
%</nrc1> |
| 4628 |
{\reset@font\bfseries\itshape |
| 4629 |
%<nrc2> \let\@hangfrom\@firstofone\noindent |
| 4630 |
\NRC@sectragged}% |
| 4631 |
} |
| 4632 |
\let\Csection\subsubsection |
| 4633 |
\newcommand\subsubsubsection{% |
| 4634 |
\@startsection{paragraph}% |
| 4635 |
4% |
| 4636 |
\z@ |
| 4637 |
%<*nrc2> |
| 4638 |
{7\p@ \@plus2\p@}% |
| 4639 |
{.1\p@ \@plus2\p@}% |
| 4640 |
%</nrc2> |
| 4641 |
%<*nrc1> |
| 4642 |
{14\p@ \@plus4.5\p@ \@minus1.5\p@}% |
| 4643 |
{2\p@ \@plus \p@}% |
| 4644 |
%</nrc1> |
| 4645 |
{\reset@font\itshape |
| 4646 |
%<nrc2> \let\@hangfrom\@firstofone\noindent |
| 4647 |
\NRC@sectragged}% |
| 4648 |
} |
| 4649 |
\let\Dsection\subsubsubsection |
| 4650 |
% \renewcommand\paragraph{% |
| 4651 |
% \@startsection{subparagraph}% |
| 4652 |
% 5% |
| 4653 |
% \z@ |
| 4654 |
% {3.25ex \@plus1ex \@minus.2ex}% |
| 4655 |
% {-1em}% |
| 4656 |
% {\normalfont\normalsize\bfseries}% |
| 4657 |
% } |
| 4658 |
\renewcommand\paragraph{% |
| 4659 |
\@startsection{subparagraph}% |
| 4660 |
4% |
| 4661 |
\z@ |
| 4662 |
{8\p@ \@plus2.5\p@ \@minus\p@}% |
| 4663 |
{-0.5em}% |
| 4664 |
{\reset@font\itshape}% |
| 4665 |
} |
| 4666 |
\let\Esection\paragraph |
| 4667 |
% \end{macrocode} |
| 4668 |
% \end{macro} |
| 4669 |
% \end{macro} |
| 4670 |
% \end{macro} |
| 4671 |
% \end{macro} |
| 4672 |
% \end{macro} |
| 4673 |
% \end{macro} |
| 4674 |
% \end{macro} |
| 4675 |
% \end{macro} |
| 4676 |
% \end{macro} |
| 4677 |
% \end{macro} |
| 4678 |
% |
| 4679 |
% \begin{macro}{\@seccntformat} |
| 4680 |
% \begin{macro}{\NRC@seccnt@paragraph} |
| 4681 |
% |
| 4682 |
% Section counters have a trailing full stop. |
| 4683 |
% \begin{macrocode} |
| 4684 |
\renewcommand\@seccntformat[1]{% |
| 4685 |
\@ifundefined{NRC@seccnt@#1}% |
| 4686 |
{\@nameuse{the#1}.\hskip0.5em\relax}% |
| 4687 |
{\@nameuse{NRC@seccnt@#1}}% |
| 4688 |
} |
| 4689 |
\newcommand\NRC@seccnt@paragraph{\theparagraph.\ } |
| 4690 |
% \end{macrocode} |
| 4691 |
% \end{macro} |
| 4692 |
% \end{macro} |
| 4693 |
% |
| 4694 |
% \begin{environment}{secnumdepth} |
| 4695 |
% |
| 4696 |
% For the above to have the effect we require, we must allow |
| 4697 |
% \cs{paragraph}'s section number to appear\dots |
| 4698 |
% \begin{macrocode} |
| 4699 |
\setcounter{secnumdepth}{4} |
| 4700 |
% \end{macrocode} |
| 4701 |
% \end{environment} |
| 4702 |
% |
| 4703 |
% |
| 4704 |
% \subsection{Appendices} |
| 4705 |
% |
| 4706 |
% We introduce a minor extension of the \LaTeX{} \cs{appendix} |
| 4707 |
% command. (Used as in \LaTeX{}, the command behaves in the standard |
| 4708 |
% way.) |
| 4709 |
% |
| 4710 |
% \begin{macro}{\appendix} |
| 4711 |
% \begin{macro}{\NRC@appendix} |
| 4712 |
% \begin{macro}{\NRC@@appendix} |
| 4713 |
% \begin{macro}{\NRC@seccnt@section} |
| 4714 |
% Syntax: \cs{appendix}\meta{optional-asterisk} |
| 4715 |
% |
| 4716 |
% Used as in `bare' \LaTeX{}, the command merely does the \LaTeX{} |
| 4717 |
% thing, \emph{viz}., reset section numbering and change the form of |
| 4718 |
% the section counter. In the form \cs{appendix*}, the command |
| 4719 |
% additionally prepends section headings with `Appendix'. |
| 4720 |
% \begin{macrocode} |
| 4721 |
\let\NRC@@appendix\appendix |
| 4722 |
\renewcommand{\appendix}{\@ifstar \NRC@appendix\NRC@@appendix} |
| 4723 |
\newcommand{\NRC@appendix}{\NRC@@appendix |
| 4724 |
\gdef\NRC@seccnt@section{\appendixname\ % |
| 4725 |
\thesection\ifNRC@french~\string:\else:\fi\hskip0.5em\relax |
| 4726 |
}% |
| 4727 |
} |
| 4728 |
% \end{macrocode} |
| 4729 |
% \end{macro} |
| 4730 |
% \end{macro} |
| 4731 |
% \end{macro} |
| 4732 |
% \end{macro} |
| 4733 |
% |
| 4734 |
% |
| 4735 |
% \section{Miscellaneous typesetting} |
| 4736 |
% |
| 4737 |
% \subsection{Footnotes} |
| 4738 |
% |
| 4739 |
% The footnotes used within the ident box on the title page are dealt |
| 4740 |
% with separately; here we specify footnotes for the body text. |
| 4741 |
% |
| 4742 |
% \begin{macro}{\footnoterule} |
| 4743 |
% The skip allows for 3pt (nrc1) or 4pt (nrc2) between the rule and |
| 4744 |
% the text of the footnote (the \cs{footnoterule} command adds nothing |
| 4745 |
% to the vertical spacing, as is proper). |
| 4746 |
% \begin{macrocode} |
| 4747 |
%<*nrc1> |
| 4748 |
\skip\footins20\p@ |
| 4749 |
\renewcommand\footnoterule{\kern-4\p@ |
| 4750 |
\hrule \@height\p@ |
| 4751 |
\kern3\p@ |
| 4752 |
} |
| 4753 |
%</nrc1> |
| 4754 |
%<*nrc2> |
| 4755 |
\skip\footins14\p@\@plus10\p@ |
| 4756 |
\renewcommand\footnoterule{\kern-5\p@ |
| 4757 |
\hrule \@height\p@ |
| 4758 |
\kern4\p@ |
| 4759 |
} |
| 4760 |
%</nrc2> |
| 4761 |
% \end{macrocode} |
| 4762 |
% \end{macro} |
| 4763 |
% |
| 4764 |
% \begin{macro}{\@footnotetext} |
| 4765 |
% Since we use a non-standard size for footnotes, we reproduce the |
| 4766 |
% whole of the \cs{@footnotetext} command here, with the size |
| 4767 |
% changed. The size used is ``tight'' small (9/10pt). |
| 4768 |
% \begin{macrocode} |
| 4769 |
\long\def\@footnotetext#1{% |
| 4770 |
\insert\footins{% |
| 4771 |
\reset@font\smallt |
| 4772 |
\interlinepenalty\interfootnotelinepenalty |
| 4773 |
\splittopskip\footnotesep |
| 4774 |
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM |
| 4775 |
\hsize\columnwidth \@parboxrestore |
| 4776 |
\protected@edef\@currentlabel{% |
| 4777 |
\csname p@footnote\endcsname\@thefnmark |
| 4778 |
}% |
| 4779 |
\color@begingroup |
| 4780 |
\@makefntext{% |
| 4781 |
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox |
| 4782 |
}% |
| 4783 |
\color@endgroup |
| 4784 |
}% |
| 4785 |
}% |
| 4786 |
% \end{macrocode} |
| 4787 |
% \end{macro} |
| 4788 |
% |
| 4789 |
% \begin{macro}{\@makefntext} |
| 4790 |
% And the body of footnotes looks as follows: |
| 4791 |
% \begin{macrocode} |
| 4792 |
\renewcommand\@makefntext[1]{% |
| 4793 |
\@hangfrom{% |
| 4794 |
\ifNRC@french |
| 4795 |
\@thefnmark.\hskip0.3333em% |
| 4796 |
\else |
| 4797 |
\hb@xt@4\p@{\@makefnmark\hss}% |
| 4798 |
\fi |
| 4799 |
}% |
| 4800 |
#1% |
| 4801 |
} |
| 4802 |
% \end{macrocode} |
| 4803 |
% \end{macro} |
| 4804 |
% |
| 4805 |
% \subsection{Mathematics} |
| 4806 |
% |
| 4807 |
% \begin{macro}{\mathindent} |
| 4808 |
% We set \cs{mathindent} according to which side the equations are |
| 4809 |
% going to appear (it can be either side in either class, nowadays). |
| 4810 |
% \begin{macrocode} |
| 4811 |
\iflefteqnos |
| 4812 |
\mathindent32pt |
| 4813 |
\else |
| 4814 |
\mathindent\z@ |
| 4815 |
\fi |
| 4816 |
% \end{macrocode} |
| 4817 |
% \end{macro} |
| 4818 |
% |
| 4819 |
% \begin{macro}{\ifNRC@amsmath} |
| 4820 |
% In case that \verb'amsmath' has been loaded, things are going to be |
| 4821 |
% somewhat different. So, first of all, we need to detect whether |
| 4822 |
% this is the case\dots |
| 4823 |
% \begin{macrocode} |
| 4824 |
\newif\ifNRC@amsmath |
| 4825 |
\NRC@amsmathfalse |
| 4826 |
\AtBeginDocument{% |
| 4827 |
\@ifundefined{tagform@}\relax{% |
| 4828 |
\NRC@amsmathtrue |
| 4829 |
% \end{macrocode} |
| 4830 |
% |
| 4831 |
% If we are indeed under the sway of \verb'amsmath', we need to patch a |
| 4832 |
% different skip for margin adjustment. If equation numbers are to be |
| 4833 |
% set on the left, this will be set non-zero because of the allowance |
| 4834 |
% needed for the equation tag. |
| 4835 |
% \begin{macrocode} |
| 4836 |
\iflefteqnos |
| 4837 |
\@mathmargin32\p@\relax |
| 4838 |
\else |
| 4839 |
\@mathmargin\z@skip |
| 4840 |
\fi |
| 4841 |
} |
| 4842 |
} |
| 4843 |
% \end{macrocode} |
| 4844 |
% \end{macro} |
| 4845 |
% |
| 4846 |
% In case \verb'amsmath' is going to be loaded (we don't know at this |
| 4847 |
% stage, of course), we ensure it gets told about equations being set |
| 4848 |
% flush left; we also tell it about left-positioned equation numbers |
| 4849 |
% if we're doing those: |
| 4850 |
% \begin{macrocode} |
| 4851 |
\iflefteqnos |
| 4852 |
\PassOptionsToPackage{fleqn,leqno}{amsmath} |
| 4853 |
\else |
| 4854 |
\PassOptionsToPackage{fleqn}{amsmath} |
| 4855 |
\fi |
| 4856 |
% \end{macrocode} |
| 4857 |
% |
| 4858 |
% |
| 4859 |
% \begin{macro}{\@eqnnum} |
| 4860 |
% Set an equation number, potentially at the left (this will be zapped |
| 4861 |
% by amsmath if it's loaded) |
| 4862 |
% \begin{macrocode} |
| 4863 |
\renewcommand{\@eqnnum}{% |
| 4864 |
\iflefteqnos |
| 4865 |
\hb@xt@1sp{}% |
| 4866 |
\rlap{\normalfont\normalcolor |
| 4867 |
\hskip -\displaywidth \eqnoformat\theequation}% |
| 4868 |
\else |
| 4869 |
{% |
| 4870 |
\normalfont\normalcolor \eqnoformat\theequation |
| 4871 |
}% |
| 4872 |
\fi |
| 4873 |
} |
| 4874 |
% \end{macrocode} |
| 4875 |
% \end{macro} |
| 4876 |
% |
| 4877 |
% \begin{macro}{\eqnoformat} |
| 4878 |
% Syntax: \cs{eqnoformat}\marg{equation number} |
| 4879 |
% |
| 4880 |
% Defines the layout of an equation tag; by default this is |
| 4881 |
% \verb'[number]' (except in \verb'nrc1', in its default state of |
| 4882 |
% equation numbers being on the right, when it's \verb'(number)'), but |
| 4883 |
% the user may redefine\dots |
| 4884 |
% \begin{macrocode} |
| 4885 |
%<nrc1> \iflefteqnos |
| 4886 |
\newcommand{\eqnoformat}[1]{[\ignorespaces#1\unskip\@@italiccorr]} |
| 4887 |
%<*nrc1> |
| 4888 |
\else |
| 4889 |
\newcommand{\eqnoformat}[1]{(\ignorespaces#1\unskip\@@italiccorr)} |
| 4890 |
\fi |
| 4891 |
%</nrc1> |
| 4892 |
% \end{macrocode} |
| 4893 |
% \end{macro} |
| 4894 |
% |
| 4895 |
% |
| 4896 |
% \begin{macro}{\tagform@} |
| 4897 |
% If \verb'amsmath' has been loaded, we need to redo the above when the |
| 4898 |
% document is actually `starting'. We also note that \cs{@eqnnum} |
| 4899 |
% will have been hacked, but that the thing that makes the difference |
| 4900 |
% is \cs{tagform@}, so we also redo that at this stage. |
| 4901 |
% \begin{macrocode} |
| 4902 |
\AtBeginDocument{\ifNRC@amsmath |
| 4903 |
\def\tagform@#1{% |
| 4904 |
\maketag@@@{\eqnoformat{#1}}} |
| 4905 |
\fi |
| 4906 |
} |
| 4907 |
% \end{macrocode} |
| 4908 |
% \end{macro} |
| 4909 |
% |
| 4910 |
% \begin{macro}{\NRC@displaymath} |
| 4911 |
% \begin{macro}{\NRC@@displaymath} |
| 4912 |
% \begin{macro}{\NRC@enddisplaymath} |
| 4913 |
% \begin{macro}{\NRC@@enddisplaymath} |
| 4914 |
% In the first version of the \textsf{nrc2} class, we had the |
| 4915 |
% \texttt{displaymath} environment ($\equiv$ \cs{[}\cs{]}) as a |
| 4916 |
% non-indented un-numbered version. The NRC's editors have come to |
| 4917 |
% rely on this, even though it provoked problems following a change in |
| 4918 |
% specification of the maths margins; we therefore restore the |
| 4919 |
% original functionality here, in a safe way. |
| 4920 |
% \begin{macrocode} |
| 4921 |
%<nrc1>\iflefteqnos |
| 4922 |
\def\NRC@displaymath{\begingroup |
| 4923 |
\ifNRC@amsmath |
| 4924 |
\@mathmargin\z@skip |
| 4925 |
\else |
| 4926 |
\mathindent\z@skip |
| 4927 |
\fi |
| 4928 |
\NRC@@displaymath |
| 4929 |
} |
| 4930 |
\def\NRC@enddisplaymath{\NRC@@enddisplaymath\endgroup} |
| 4931 |
\AtBeginDocument{\let\NRC@@displaymath\[% |
| 4932 |
\let\[\NRC@displaymath |
| 4933 |
\let\NRC@@enddisplaymath\]% |
| 4934 |
\let\]\NRC@enddisplaymath}% |
| 4935 |
%<nrc1>\fi |
| 4936 |
% \end{macrocode} |
| 4937 |
% \end{macro} |
| 4938 |
% \end{macro} |
| 4939 |
% \end{macro} |
| 4940 |
% \end{macro} |
| 4941 |
% |
| 4942 |
% Maths sizes affect sub- and superscripts done in text mode, too. |
| 4943 |
% Specifications exist for all text sizes we actually use: we declare, |
| 4944 |
% below, only for those sizes that differ from what is in the \LaTeX{} |
| 4945 |
% kernel. |
| 4946 |
% \begin{macrocode} |
| 4947 |
\DeclareMathSizes {18} {18} \@xiipt \@xpt |
| 4948 |
\DeclareMathSizes {16} {16} \@xiipt \@xpt |
| 4949 |
\DeclareMathSizes {15} {15} \@xpt {8} |
| 4950 |
\DeclareMathSizes \@xipt \@xipt \@ixpt {7} |
| 4951 |
\DeclareMathSizes \@ixpt \@ixpt {6} {5} |
| 4952 |
% \end{macrocode} |
| 4953 |
% |
| 4954 |
% \begin{macro}{\numberby} |
| 4955 |
% Syntax: \cs{numberby}\marg{counter}\marg{division-name} |
| 4956 |
% |
| 4957 |
% Arrange that \meta{counter} is reset every time \meta{division-name} |
| 4958 |
% is stepped, and that \cs{the\meta{counter}} is represented as |
| 4959 |
% `\meta{division-name}.\meta{counter}' |
| 4960 |
% \begin{macrocode} |
| 4961 |
\newcommand\numberby[2]{% |
| 4962 |
\@ifundefined{c@#1}{\@nocounterr{#1}}% |
| 4963 |
\@ifundefined{c@#2}{\@nocounterr{#2}}% |
| 4964 |
\@addtoreset{#1}{#2}% |
| 4965 |
\expandafter\gdef\csname the#1\expandafter\endcsname |
| 4966 |
\expandafter{\csname the#2\endcsname.\arabic{#1}}% |
| 4967 |
} |
| 4968 |
% \end{macrocode} |
| 4969 |
% \end{macro} |
| 4970 |
% |
| 4971 |
% \emph{Note}: \cs{numberby} is in this section because of its only |
| 4972 |
% present expected use for number equations by section. |
| 4973 |
% |
| 4974 |
% \subsection{Tables} |
| 4975 |
% |
| 4976 |
% We need to provide a simple handle on overweight rules. This we do |
| 4977 |
% by a modification of the \textsf{variline} package I wrote for the |
| 4978 |
% TUG'95 proceedings. |
| 4979 |
% |
| 4980 |
% \begin{macro}{\hline} |
| 4981 |
% \begin{macro}{\@shline} |
| 4982 |
% \begin{macro}{\arrayrulewidth} |
| 4983 |
% Syntax: \cs{hline}\meta{optional-asterisk} |
| 4984 |
% |
| 4985 |
% \cs{hline} and \cs{@shline} are a division into two parts of the |
| 4986 |
% kernel's \cs{hline}; we set \cs{arrayrulewidth}, too, since it has |
| 4987 |
% a non-standard value |
| 4988 |
% \begin{macrocode} |
| 4989 |
\renewcommand\hline{% |
| 4990 |
\noalign{\ifnum0=`}\fi\@ifstar |
| 4991 |
{\@shline{2\p@}}% |
| 4992 |
{\@shline{\arrayrulewidth}}} |
| 4993 |
\newcommand\@shline[1]{\hrule \@height #1\relax |
| 4994 |
\futurelet \reserved@a \@xhline} |
| 4995 |
\arrayrulewidth\p@ |
| 4996 |
% \end{macrocode} |
| 4997 |
% \end{macro} |
| 4998 |
% \end{macro} |
| 4999 |
% \end{macro} |
| 5000 |
% |
| 5001 |
% \begin{environment}{tabular} |
| 5002 |
% \begin{environment}{NRC@@tabular} |
| 5003 |
% Syntax: unchanged |
| 5004 |
% |
| 5005 |
% We save the \LaTeX{} \textsf{tabular} environment definition, and |
| 5006 |
% sneak a size setting into our redefinition. We have to do this |
| 5007 |
% \cs{AtBeginDocument}, since useful packages (such as \textsf{array}) |
| 5008 |
% mangle the definition of \textsf{tabular} |
| 5009 |
% \begin{macrocode} |
| 5010 |
\AtBeginDocument{% |
| 5011 |
\let\NRC@@tabular\tabular |
| 5012 |
\let\endNRC@@tabular\endtabular |
| 5013 |
\renewenvironment{tabular}% |
| 5014 |
{\smalll\NRC@@tabular}% |
| 5015 |
{\endNRC@@tabular}% |
| 5016 |
} |
| 5017 |
% \end{macrocode} |
| 5018 |
% \end{environment} |
| 5019 |
% \end{environment} |
| 5020 |
% |
| 5021 |
% \subsection{Text subscripts} |
| 5022 |
% |
| 5023 |
% \LaTeX{} itself provides a \cs{textsuperscript} command, but nothing |
| 5024 |
% for subscripts. |
| 5025 |
% |
| 5026 |
% \begin{macro}{\textsubscript} |
| 5027 |
% \begin{macro}{\@textsubscript} |
| 5028 |
% Syntax: \cs{textsubscript}\marg{subscripting text} |
| 5029 |
% |
| 5030 |
% The code comes from |subscript.sty| on CTAN (written by the author |
| 5031 |
% of the NRC classes). |
| 5032 |
% \begin{macrocode} |
| 5033 |
\DeclareRobustCommand*\textsubscript[1]{% |
| 5034 |
\@textsubscript{\selectfont#1}} |
| 5035 |
\def\@textsubscript#1{% |
| 5036 |
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}} |
| 5037 |
% \end{macrocode} |
| 5038 |
% \end{macro} |
| 5039 |
% \end{macro} |
| 5040 |
% |
| 5041 |
% |
| 5042 |
% \section{Lists, etc.} |
| 5043 |
% |
| 5044 |
% Specialised versions of the \texttt{list} environment. |
| 5045 |
% |
| 5046 |
% |
| 5047 |
% \begin{environment}{flenumerate} |
| 5048 |
% \begin{environment}{flitemize} |
| 5049 |
% Syntax: \emph{As \texttt{enumerate}/\texttt{itemize}} |
| 5050 |
% |
| 5051 |
% We make no provision for the nesting of these lists: they must be |
| 5052 |
% the outermost list of a nested set (though the specification makes |
| 5053 |
% no mention of nesting at all). |
| 5054 |
% \begin{macrocode} |
| 5055 |
\newenvironment{flenumerate}% |
| 5056 |
{% |
| 5057 |
\ifnum \@enumdepth>\z@ |
| 5058 |
\@toodeep |
| 5059 |
\else |
| 5060 |
\advance\@enumdepth\@ne |
| 5061 |
\def\@enumctr{enumi}% |
| 5062 |
\leftmargini1.5pc\relax |
| 5063 |
\labelwidth\leftmargini |
| 5064 |
\labelsep\z@ |
| 5065 |
\list |
| 5066 |
\labelenumi |
| 5067 |
{% |
| 5068 |
\usecounter\@enumctr |
| 5069 |
\def\makelabel##1{##1\hss}% |
| 5070 |
}% |
| 5071 |
\fi |
| 5072 |
}% |
| 5073 |
\endlist |
| 5074 |
\newenvironment{flitemize}% |
| 5075 |
{% |
| 5076 |
\ifnum \@itemdepth>\z@ |
| 5077 |
\@toodeep |
| 5078 |
\else |
| 5079 |
\advance\@itemdepth\@ne |
| 5080 |
\def\@itemitem{labelitemi}% |
| 5081 |
\leftmargini10\p@ |
| 5082 |
\labelwidth\leftmargini |
| 5083 |
\labelsep\z@ |
| 5084 |
\list |
| 5085 |
\labelitemi |
| 5086 |
{\def\makelabel##1{##1\hss}}% |
| 5087 |
\fi |
| 5088 |
}% |
| 5089 |
\endlist |
| 5090 |
% \end{macrocode} |
| 5091 |
% \end{environment} |
| 5092 |
% \end{environment} |
| 5093 |
% |
| 5094 |
% |
| 5095 |
% \subsection{Captions and general float handling} |
| 5096 |
% |
| 5097 |
% \begin{macro}{\caption} |
| 5098 |
% \begin{macro}{\topcaption} |
| 5099 |
% \begin{macro}{\if@topcaption} |
| 5100 |
% \begin{macro}{\NRC@@caption} |
| 5101 |
% \begin{macro}{\NRC@topcaptcounter} |
| 5102 |
% Syntax: \cs{caption} unchanged; \cs{topcaption} the same |
| 5103 |
% |
| 5104 |
% \cs{caption} and \cs{topcaption} set their version of |
| 5105 |
% \cs{if@topcaption} and relay to the saved copy \cs{NRC@@caption}. |
| 5106 |
% \cs{caption} does nothing else, but \cs{topcaption} also sets up for |
| 5107 |
% remembering the width of the following table. |
| 5108 |
% \begin{macrocode} |
| 5109 |
\let\NRC@@caption\caption |
| 5110 |
\renewcommand\caption{\@topcaptionfalse\NRC@caption} |
| 5111 |
\newcommand\topcaption{\@topcaptiontrue |
| 5112 |
\global\advance\NRC@topcaptcounter\@ne |
| 5113 |
\NRC@caption |
| 5114 |
} |
| 5115 |
\newif\if@topcaption |
| 5116 |
\@topcaptionfalse |
| 5117 |
\newcount\NRC@topcaptcounter |
| 5118 |
% \end{macrocode} |
| 5119 |
% \end{macro} |
| 5120 |
% \end{macro} |
| 5121 |
% \end{macro} |
| 5122 |
% \end{macro} |
| 5123 |
% \end{macro} |
| 5124 |
% |
| 5125 |
% \begin{macro}{\NRC@caption} |
| 5126 |
% \begin{macro}{\NRC@capt@left} |
| 5127 |
% \begin{macro}{\NRC@capt@right} |
| 5128 |
% \cs{NRC@caption} relays from \cs{caption}/\cs{topcaption} to |
| 5129 |
% \cs{NRC@@caption} (the preserved copy of the kernel \cs{caption}), |
| 5130 |
% making note of the values of \cs{leftskip} and \cs{rightskip} as we |
| 5131 |
% go. |
| 5132 |
% \begin{macrocode} |
| 5133 |
\newcommand{\NRC@caption}{% |
| 5134 |
\edef\NRC@capt@left{\the\leftskip}% |
| 5135 |
\edef\NRC@capt@right{\the\rightskip}% |
| 5136 |
\NRC@@caption |
| 5137 |
} |
| 5138 |
% \end{macrocode} |
| 5139 |
% \end{macro} |
| 5140 |
% \end{macro} |
| 5141 |
% \end{macro} |
| 5142 |
% |
| 5143 |
% \begin{macro}{\NRC@makecaption} |
| 5144 |
% \begin{macro}{\figurename} |
| 5145 |
% \begin{macro}{\captionwidth} |
| 5146 |
% \begin{macro}{\@makecaption} |
| 5147 |
% Syntax: unchanged from \cs{@makecaption}, but takes account of |
| 5148 |
% \cs{if@topcaption} |
| 5149 |
% |
| 5150 |
% None of the fancy centring code found in standard \LaTeX, and we use |
| 5151 |
% a fixed size (though the size \emph{is} adjustable by the user). |
| 5152 |
% The above caption skip is adjusted if in a \cs{topcaption}, to take |
| 5153 |
% account of effects arising from different font sizes in different |
| 5154 |
% columns. |
| 5155 |
% |
| 5156 |
% We have to defer our definition of \cs{@makecaption} to the start of |
| 5157 |
% the document, since \textsf{babel} has taken to mucking up our |
| 5158 |
% definition, if we're usuing `french'. |
| 5159 |
% |
| 5160 |
% The width in which to set the caption is \cs{captionwidth} if that's |
| 5161 |
% set non-zero; otherwise, if this is a topcaption which is followed |
| 5162 |
% by a tabular whose width we've recorded, we use that; failing both |
| 5163 |
% conditions we use \cs{hsize} |
| 5164 |
% \begin{macrocode} |
| 5165 |
\newcommand\NRC@makecaption[2]{% |
| 5166 |
\if@topcaption \@tempdima\belowcaptionskip \advance\@tempdima 3.5\p@ |
| 5167 |
\else \@tempdima\abovecaptionskip \fi \vskip\@tempdima |
| 5168 |
\@tempdima\captionwidth |
| 5169 |
\ifdim\@tempdima=\z@ |
| 5170 |
\if@topcaption |
| 5171 |
\expandafter\let\expandafter\@tempa |
| 5172 |
\csname NRC@tabwd@\the\NRC@topcaptcounter\endcsname |
| 5173 |
\@tempdima\ifx\@tempa\relax |
| 5174 |
\hsize |
| 5175 |
\else |
| 5176 |
\@tempa |
| 5177 |
\fi |
| 5178 |
\else |
| 5179 |
\@tempdima\hsize |
| 5180 |
\fi |
| 5181 |
\fi |
| 5182 |
\hb@xt@\hsize{% |
| 5183 |
\hskip\NRC@capt@left |
| 5184 |
\vbox{% |
| 5185 |
\hsize\@tempdima |
| 5186 |
%<nrc2> \NRC@sectragged |
| 5187 |
\smalll |
| 5188 |
\textbf{#1.}\enspace\ignorespaces#2\unskip\par |
| 5189 |
}% |
| 5190 |
\hskip\NRC@capt@right |
| 5191 |
}% |
| 5192 |
\@tempdima\if@topcaption |
| 5193 |
\abovecaptionskip |
| 5194 |
\advance\@tempdima -6\p@ % pragmatic value from NRC experience |
| 5195 |
\else |
| 5196 |
\belowcaptionskip |
| 5197 |
\fi |
| 5198 |
\vskip\@tempdima |
| 5199 |
} |
| 5200 |
\renewcommand\figurename{Fig.} |
| 5201 |
\newdimen\captionwidth |
| 5202 |
\captionwidth\z@ |
| 5203 |
\AtBeginDocument{\let\@makecaption\NRC@makecaption} |
| 5204 |
% \end{macrocode} |
| 5205 |
% \end{macro} |
| 5206 |
% \end{macro} |
| 5207 |
% \end{macro} |
| 5208 |
% \end{macro} |
| 5209 |
% |
| 5210 |
% \begin{macro}{\endtabular} |
| 5211 |
% \begin{macro}{\endtabular*} |
| 5212 |
% \begin{macro}{\NRC@@endtabular} |
| 5213 |
% Termination of tabulars, with code to preserve the width of the |
| 5214 |
% table just set. Again, this needs to be done \cs{AtBeginDocument} |
| 5215 |
% (for the same reason that the size change for tabulars has to be). |
| 5216 |
% \begin{macrocode} |
| 5217 |
\AtBeginDocument{% |
| 5218 |
\let\NRC@@endtabular\endtabular |
| 5219 |
\def\endtabular{\NRC@@endtabular |
| 5220 |
\if@topcaption |
| 5221 |
\if@filesw |
| 5222 |
\setbox\z@\lastbox |
| 5223 |
\immediate\write\@auxout{% |
| 5224 |
\string\NRC@tabwd{\the\NRC@topcaptcounter}% |
| 5225 |
{\the\wd\z@}% |
| 5226 |
}% |
| 5227 |
\box\z@ |
| 5228 |
\fi |
| 5229 |
\fi |
| 5230 |
}% |
| 5231 |
\expandafter\let\csname endtabular*\endcsname\endtabular |
| 5232 |
} |
| 5233 |
% \end{macrocode} |
| 5234 |
% \end{macro} |
| 5235 |
% \end{macro} |
| 5236 |
% \end{macro} |
| 5237 |
% |
| 5238 |
% \begin{macro}{\NRC@tabwd} |
| 5239 |
% \begin{macro}{\NRC@tabwd@atend} |
| 5240 |
% Syntax: \cs{NRC@tabwd}\marg{topcaption number}\marg{table width} |
| 5241 |
% |
| 5242 |
% \verb|.aux| file command for processing table widths. (Note, we set |
| 5243 |
% up a dummy version of the command in the file, for the usual |
| 5244 |
% precautionary reason.) |
| 5245 |
% |
| 5246 |
% \cs{NRC@tabwd@atend} is the version of the command to be used in |
| 5247 |
% end-document \verb|.aux| processing. |
| 5248 |
% \begin{macrocode} |
| 5249 |
\newcommand\NRC@tabwd[2]{% |
| 5250 |
\global\@namedef{NRC@tabwd@#1}{#2}% |
| 5251 |
} |
| 5252 |
\AtBeginDocument{\immediate\write\@auxout{% |
| 5253 |
\noexpand\providecommand\noexpand\NRC@tabwd{% |
| 5254 |
\noexpand\@gobbletwo}% |
| 5255 |
}% |
| 5256 |
} |
| 5257 |
\newcommand\NRC@tabwd@atend[2]{% |
| 5258 |
\edef\@tempa{\@nameuse{NRC@tabwd@#1}}% |
| 5259 |
\def\@tempb{#2}% |
| 5260 |
\ifx\@tempa\@tempb\else\@tempswatrue\fi |
| 5261 |
} |
| 5262 |
\AtEndDocument{\let\NRC@tabwd\NRC@tabwd@atend} |
| 5263 |
% \end{macrocode} |
| 5264 |
% \end{macro} |
| 5265 |
% \end{macro} |
| 5266 |
% |
| 5267 |
% \begin{macro}{\sepcaption} |
| 5268 |
% Syntax: \cs{sepcaption}\oarg{\texttt{.lo\emph{x}} text}\marg{caption} |
| 5269 |
% |
| 5270 |
% Produce a caption that's to be separated from its figure or table. |
| 5271 |
% This requires the caption to be of a fixed width, and that there |
| 5272 |
% should be a full-width rule underneath the caption. The caption |
| 5273 |
% makes up the whole of a float. |
| 5274 |
% \begin{macrocode} |
| 5275 |
\newcommand{\sepcaption}{% |
| 5276 |
\ifdim \textwidth=\hsize |
| 5277 |
\def\@tempa{{\NRC@sepcaption{0.8}}}% |
| 5278 |
\else |
| 5279 |
\def\@tempa{{\NRC@sepcaption{0.7}}}% |
| 5280 |
\fi |
| 5281 |
\expandafter\@dblarg\@tempa |
| 5282 |
} |
| 5283 |
% \end{macrocode} |
| 5284 |
% \end{macro} |
| 5285 |
% |
| 5286 |
% \begin{macro}{\NRC@sepcaption} |
| 5287 |
% Syntax: \cs{NRC@sepcaption}\marg{fraction of width}\oarg{caption opt}% |
| 5288 |
% \marg{caption} |
| 5289 |
% |
| 5290 |
% Orchestrate \cs{sepcaption} |
| 5291 |
% \begin{macrocode} |
| 5292 |
\def\NRC@sepcaption#1[#2]#3{% |
| 5293 |
\setlength{\captionwidth}{#1\columnwidth}% |
| 5294 |
\topcaption[#1]{#2}% |
| 5295 |
\vrule \@depth.5\p@ \@height.5\p@ \@width\hsize |
| 5296 |
} |
| 5297 |
% \end{macrocode} |
| 5298 |
% \end{macro} |
| 5299 |
% |
| 5300 |
% \begin{macro}{\@fptop} |
| 5301 |
% \begin{macro}{\@dblfptop} |
| 5302 |
% |
| 5303 |
% We set these two to prevent floats from dribbling down float pages |
| 5304 |
% \begin{macrocode} |
| 5305 |
\setlength\@fptop{\z@} |
| 5306 |
\setlength\@dblfptop{\z@} |
| 5307 |
% \end{macrocode} |
| 5308 |
% \end{macro} |
| 5309 |
% \end{macro} |
| 5310 |
% |
| 5311 |
% |
| 5312 |
% \subsection{The bibliography} |
| 5313 |
% |
| 5314 |
% \begin{environment}{thebibliography} |
| 5315 |
% \begin{macro}{\thebibliography} |
| 5316 |
% \begin{macro}{\NRC@thebibliography} |
| 5317 |
% \begin{macro}{\NRC@thebib@brace} |
| 5318 |
% \begin{macro}{\NRC@thebib@nobrace} |
| 5319 |
% \begin{macro}{\endthebibliography} |
| 5320 |
% \begin{macro}{\NRC@bibitem} |
| 5321 |
% Syntax: \cs{begin}|{thebibliography}|\marg{widest label} |
| 5322 |
% |
| 5323 |
% \noindent\phantom{Syntax: }\cs{begin}|{thebibliography}| (in the |
| 5324 |
% presence of the |nonumbib| class option) |
| 5325 |
% |
| 5326 |
% First, the bibliography environment, which we repeat, patched in a |
| 5327 |
% minor way, from \textsf{article.cls} (we suppress the open |
| 5328 |
% bibliography switch) |
| 5329 |
% \begin{macrocode} |
| 5330 |
\ifNRC@numbib |
| 5331 |
\renewenvironment{thebibliography}[1]{% |
| 5332 |
\section*{\refname}% |
| 5333 |
\smalll |
| 5334 |
\list{\@biblabel{\@arabic\c@enumiv}}% |
| 5335 |
{% |
| 5336 |
\settowidth\labelwidth{#1.}% |
| 5337 |
\leftmargin 1.5pc |
| 5338 |
\labelsep \leftmargin |
| 5339 |
\advance\labelsep -\labelwidth |
| 5340 |
\usecounter{enumiv}% |
| 5341 |
\let\p@enumiv\@empty |
| 5342 |
\renewcommand\theenumiv{\@arabic\c@enumiv} |
| 5343 |
}% |
| 5344 |
\sloppy |
| 5345 |
%<!nrc2> \NRC@sectragged |
| 5346 |
\clubpenalty4000 |
| 5347 |
\@clubpenalty \clubpenalty |
| 5348 |
\widowpenalty4000 |
| 5349 |
%<nrc1> \itemsep\z@ |
| 5350 |
%<nrc2> \itemsep\z@ \@plus\p@ |
| 5351 |
\parsep\z@ |
| 5352 |
\parskip\z@ |
| 5353 |
}{% |
| 5354 |
\def\@noitemerr{% |
| 5355 |
\@latex@warning{Empty `thebibliography' environment}% |
| 5356 |
}% |
| 5357 |
\endlist |
| 5358 |
} |
| 5359 |
% \end{macrocode} |
| 5360 |
% |
| 5361 |
% If we're not numbering bibliography items, we need to be careful in |
| 5362 |
% a number of areas. First, we make the ``label width'' argument to |
| 5363 |
% the environment (sort of) optional. Second, if (as is usually the |
| 5364 |
% case) there's no citation name, we generate a spurious one so as to |
| 5365 |
% avoid masses of ``repeated label'' error messages. |
| 5366 |
% |
| 5367 |
% Note we define the environment as two commands, as the tricks with |
| 5368 |
% the ``optional'' argument might come unstuck otherwise; of course, |
| 5369 |
% \cs{endthebibliography} can't be defined with \cs{newcommand}\dots |
| 5370 |
% \begin{macrocode} |
| 5371 |
\else |
| 5372 |
\renewcommand{\thebibliography}{% |
| 5373 |
\futurelet\reserved@a\NRC@thebibliography |
| 5374 |
} |
| 5375 |
\newcommand{\NRC@thebibliography}{% |
| 5376 |
\ifx\reserved@a\bgroup |
| 5377 |
\expandafter\NRC@thebib@brace |
| 5378 |
\else |
| 5379 |
\expandafter\NRC@thebib@nobrace |
| 5380 |
\fi |
| 5381 |
} |
| 5382 |
\newcommand{\NRC@thebib@brace}[1]{% |
| 5383 |
\NRC@thebib@nobrace |
| 5384 |
} |
| 5385 |
\newcommand{\NRC@thebib@nobrace}{% |
| 5386 |
\section*{\refname}% |
| 5387 |
\smalll |
| 5388 |
\list{}% |
| 5389 |
{% |
| 5390 |
\let\bibitem\NRC@bibitem |
| 5391 |
\leftmargin 10\p@ |
| 5392 |
\labelwidth \z@ |
| 5393 |
\labelsep \z@ |
| 5394 |
\itemindent -\leftmargin |
| 5395 |
\usecounter{enumiv}% |
| 5396 |
\let\p@enumiv\@empty |
| 5397 |
\renewcommand\theenumiv{\@arabic\c@enumiv} |
| 5398 |
}% |
| 5399 |
\sloppy |
| 5400 |
%<!nrc2> \NRC@sectragged |
| 5401 |
\clubpenalty4000 |
| 5402 |
\@clubpenalty \clubpenalty |
| 5403 |
\widowpenalty4000 |
| 5404 |
%<nrc1> \itemsep\z@ |
| 5405 |
%<nrc2> \itemsep\z@ \@plus\p@ |
| 5406 |
\parsep\z@ |
| 5407 |
\parskip\z@ |
| 5408 |
} |
| 5409 |
\def\endthebibliography{% |
| 5410 |
\def\@noitemerr{% |
| 5411 |
\@latex@warning{Empty `thebibliography' environment}% |
| 5412 |
}% |
| 5413 |
\endlist |
| 5414 |
} |
| 5415 |
\newcommand{\NRC@bibitem}[2][\the\value{\@listctr}]{% |
| 5416 |
\item |
| 5417 |
\if@filesw |
| 5418 |
\def\@tempa{#2}% |
| 5419 |
\ifx\@tempa\@empty |
| 5420 |
\edef\@tempa{bibitem\the\value{\@listctr}}% |
| 5421 |
\fi |
| 5422 |
\immediate\write\@auxout{% |
| 5423 |
\string\bibcite{\@tempa}{#1}% |
| 5424 |
}% |
| 5425 |
\fi |
| 5426 |
\ignorespaces |
| 5427 |
} |
| 5428 |
\fi |
| 5429 |
% \end{macrocode} |
| 5430 |
% \end{macro} |
| 5431 |
% \end{macro} |
| 5432 |
% \end{macro} |
| 5433 |
% \end{macro} |
| 5434 |
% \end{macro} |
| 5435 |
% \end{macro} |
| 5436 |
% \end{environment} |
| 5437 |
% |
| 5438 |
% \begin{macro}{\@biblabel} |
| 5439 |
% The label for a |\bibitem[...]| command is produced by this |
| 5440 |
% macro. This version marginally modifies that defined in the \LaTeX{} |
| 5441 |
% kernel. |
| 5442 |
% \begin{macrocode} |
| 5443 |
\renewcommand*{\@biblabel}[1]{\hb@xt@\labelwidth{\hfill#1.}} |
| 5444 |
%</nrc1cls|nrc2cls> |
| 5445 |
% \end{macrocode} |
| 5446 |
% \end{macro} |
| 5447 |
% |
| 5448 |
% \begin{macrocode} |
| 5449 |
%<*nrc1cls|nrc2cls|balance> |
| 5450 |
\endinput |
| 5451 |
%</nrc1cls|nrc2cls|balance> |
| 5452 |
% \end{macrocode} |
| 5453 |
% |
| 5454 |
% \Finale |
| 5455 |
% |
| 5456 |
% |
| 5457 |
%% \CharacterTable |
| 5458 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 5459 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 5460 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 5461 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 5462 |
%% Dollar \$ Percent \% Ampersand \& |
| 5463 |
%% Acute accent \' Left paren \( Right paren \) |
| 5464 |
%% Asterisk \* Plus \+ Comma \, |
| 5465 |
%% Minus \- Point \. Solidus \/ |
| 5466 |
%% Colon \: Semicolon \; Less than \< |
| 5467 |
%% Equals \= Greater than \> Question mark \? |
| 5468 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 5469 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 5470 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 5471 |
%% Right brace \} Tilde \~} |