| 1 |
% \iffalse meta-comment -*- mode: doctex -*- |
| 2 |
% |
| 3 |
% Master bibliography style for The Canadian Journal of Statistics | |
| 4 |
% La revue canadienne de statistique |
| 5 |
% |
| 6 |
% Copyright (C) 2023-2026 Statistical Society of Canada | Société |
| 7 |
% canadienne de statistique |
| 8 |
% |
| 9 |
% This file may be distributed and/or modified under the conditions |
| 10 |
% of the LaTeX Project Public License, either version 1.3c of this |
| 11 |
% license or (at your option) any later version. The latest version |
| 12 |
% of this license is in: |
| 13 |
% |
| 14 |
% https://www.latex-project.org/lppl.txt |
| 15 |
% |
| 16 |
% The documentation is also licensed under CC BY-SA 4.0 International. |
| 17 |
% To view a copy of this license, visit: |
| 18 |
% |
| 19 |
% https://creativecommons.org/licenses/by-sa/4.0/ |
| 20 |
% |
| 21 |
% This work has the LPPL maintenance status `maintained'. |
| 22 |
% |
| 23 |
% The Current Maintainer of this work is Vincent Goulet |
| 24 |
% <[email protected]>. |
| 25 |
% |
| 26 |
% This work derives from merlin.mbs, part of the custom-bib |
| 27 |
% collection, a contribution to the LaTeX2e system. |
| 28 |
% Copyright 1994-2011 Patrick W Daly |
| 29 |
% Max-Planck-Institut f\"ur Sonnensystemforschung |
| 30 |
% Max-Planck-Str. 2 |
| 31 |
% D-37191 Katlenburg-Lindau |
| 32 |
% Germany |
| 33 |
% E-mail: [email protected] |
| 34 |
% |
| 35 |
%<*!tail> |
| 36 |
% (The following notice appears in bst files generated from this file) |
| 37 |
% ------------------------------------------------------------------- |
| 38 |
% Name and version information of the main mbs file: |
| 39 |
%\fi |
| 40 |
% \ProvidesFile{cjs-rcs-merlin.mbs}[2026/03/05 v2.0 (VG, PWD, AO, DPC)] |
| 41 |
%\iffalse |
| 42 |
%</!tail> |
| 43 |
%<*a&!a> |
| 44 |
% The following ensures that the driver part is not seen by makebst |
| 45 |
% The driver part must not contain any \end other than \end{document} ! |
| 46 |
\ifx\endoptions\undefined\let\tempx=\relax\else |
| 47 |
\long\def\tempx#1\end#2{}\fi\tempx |
| 48 |
%</a&!a> |
| 49 |
%<*driver> |
| 50 |
\NeedsTeXFormat{LaTeX2e}% |
| 51 |
\documentclass[nocjs,x11names,french,english]{cjs-rcs-article} |
| 52 |
\usepackage{metalogo} |
| 53 |
\setlrmarginsandblock{40mm}{30mm}{*} % increase left margin |
| 54 |
\checkandfixthelayout |
| 55 |
|
| 56 |
%% Loading doc.sty creates some conflicts with the class and memoir. We |
| 57 |
%% need to: |
| 58 |
%% |
| 59 |
%% - keep a copy of the class' \maketitle command; |
| 60 |
%% - undefine the 'glossary' environment created by memoir; |
| 61 |
%% - restore the standard LaTeX commands for the glossary that |
| 62 |
%% doc.sty relies upon. |
| 63 |
\let\makeCJStitle\maketitle % keep class definition |
| 64 |
\let\theglossary\relax % avoid conflict with doc.sty |
| 65 |
\let\endtheglossary\relax % avoid conflict with doc.sty |
| 66 |
\makeatletter |
| 67 |
\def\makeglossary{% |
| 68 |
\newwrite\@glossaryfile |
| 69 |
\immediate\openout\@glossaryfile=\jobname.glo |
| 70 |
\def\glossary{\@bsphack\begingroup |
| 71 |
\@sanitize |
| 72 |
\@wrglossary}\typeout |
| 73 |
{Writing glossary file \jobname.glo }% |
| 74 |
\let\makeglossary\@empty |
| 75 |
} |
| 76 |
\@onlypreamble\makeglossary |
| 77 |
\def\@wrglossary#1{% |
| 78 |
\protected@write\@glossaryfile{}% |
| 79 |
{\string\glossaryentry{#1}{\thepage}}% |
| 80 |
\endgroup |
| 81 |
\@esphack} |
| 82 |
\def\glossary{\@bsphack\begingroup\@sanitize\@index} |
| 83 |
\@twosidefalse\@mparswitchfalse % turn off twoside option |
| 84 |
\makeatother |
| 85 |
\usepackage{doc} |
| 86 |
\def\changes#1#2#3{\glossary{#1>#3}} % simplified |
| 87 |
\DisableCrossrefs |
| 88 |
\CodelineNumbered |
| 89 |
\RecordChanges |
| 90 |
\OnlyDescription |
| 91 |
\DontCheckModules |
| 92 |
|
| 93 |
\AtEndPreamble{% |
| 94 |
\hypersetup{% |
| 95 |
pdfauthor = {Statistical Society of Canada}, |
| 96 |
pdftitle = {Master bibliographic style cjs-rcs-merlin.mbs}}} |
| 97 |
|
| 98 |
%% Configuration of the glossary |
| 99 |
\addto\extrasenglish{% |
| 100 |
\def\glossaryname{History of changes}} |
| 101 |
\GlossaryPrologue{\section*{\glossaryname}% |
| 102 |
\addcontentsline{toc}{section}{\glossaryname}} |
| 103 |
\setlength{\GlossaryMin}{5cm} |
| 104 |
|
| 105 |
%% Additional semantic typesetting |
| 106 |
\let\class\textsf |
| 107 |
\newcommand*\btx{\textsc{Bib}\TeX} |
| 108 |
\newcommand*\dtx{\textsf{docstrip}} |
| 109 |
|
| 110 |
%% Name of the journal |
| 111 |
\makeatletter |
| 112 |
\newcommand*\TheCJS{\@ifstar{\emph{The Journal}}{\emph{\CJS@journalname@en}}} |
| 113 |
\newcommand*\LaRevue{\@ifstar{\emph{La revue}}{\emph{\CJS@journalname@fr}}} |
| 114 |
\newcommand*\CJSclass{\class{cjs-rcs-article}} |
| 115 |
\newcommand*\CJSbsten{\texttt{cjs-rcs-en.bst}} |
| 116 |
\newcommand*\CJSbstfr{\texttt{cjs-rcs-fr.bst}} |
| 117 |
\newcommand*\SSCen{Statistical Society of Canada} |
| 118 |
\newcommand*\SSCfr{Société statistique du Canada} |
| 119 |
\makeatother |
| 120 |
|
| 121 |
%% Redefine \year using information from \filedate instead of using |
| 122 |
%% compilation time |
| 123 |
\def\parsedate#1/#2/#3\relax{\def\year{#1}} |
| 124 |
|
| 125 |
\MakeShortVerb{\|} |
| 126 |
|
| 127 |
\begin{document} |
| 128 |
\DocInput{cjs-rcs-merlin.mbs} |
| 129 |
\end{document} |
| 130 |
%</driver> |
| 131 |
% end of meta-comment \fi |
| 132 |
% \GetFileInfo{cjs-rcs-merlin.mbs} |
| 133 |
% \expandafter\parsedate\filedate\relax |
| 134 |
% |
| 135 |
% \changes{1.0}{2023-11-29}{First official release distributed through |
| 136 |
% CTAN.} |
| 137 |
% \changes{0.93}{2023-11-06}{Add a prefix v in the version number like |
| 138 |
% the main file.} |
| 139 |
% \changes{0.92}{2023-10-27}{Relegate the \texttt{makebst} menu |
| 140 |
% information to the complete documentation.} |
| 141 |
% \changes{0.9}{2023-10-14}{Initial version based on version 4.33 of |
| 142 |
% \texttt{merlin.mbs}.} |
| 143 |
% |
| 144 |
% \title[Master bibliographic style file \filename]{% |
| 145 |
% Master bibliographic style file \\ |
| 146 |
% of \TheCJS} |
| 147 |
% \author{Statistical Society of Canada} |
| 148 |
% \affil{Developed by Vincent Goulet, Université Laval} |
| 149 |
% |
| 150 |
% \begin{englishabstract} |
| 151 |
% The list of references in {\TheCJS} is typeset using the |
| 152 |
% bibliographic styles {\CJSbsten} for articles in English and |
| 153 |
% {\CJSbstfr} for articles in French. These styles are created using |
| 154 |
% the program \texttt{makebst} from the master bibliographic file |
| 155 |
% \texttt{cjs-rcs-merlin.mbs}, and the language definition files |
| 156 |
% \texttt{cjs-rcs-english.mbs} and \texttt{cjs-rcs-french.mbs}. |
| 157 |
% \end{englishabstract} |
| 158 |
% \begin{frenchabstract} |
| 159 |
% La liste des références dans {\LaRevue} est composée avec les |
| 160 |
% style de bibliographie {\CJSbstfr} pour les articles en français |
| 161 |
% et {\CJSbsten} pour les articles en anglais. Ceux-ci sont générés |
| 162 |
% par le programme \texttt{makebst} Ã partir du fichier maitre |
| 163 |
% \texttt{cjs-rcs-merlin.mbs} et des fichiers de localisation |
| 164 |
% \texttt{cjs-rcs-english.mbs} et \texttt{cjs-rcs-french.mbs}. |
| 165 |
% \end{frenchabstract} |
| 166 |
% |
| 167 |
% ^^A abusing the 'classification' environment. The final period is |
| 168 |
% ^^A added by the environment. |
| 169 |
% \begin{classification}[Version] |
| 170 |
% \item[] This is the documentation for the file \code{\filename} |
| 171 |
% {\fileversion}, dated {\filedate} |
| 172 |
% \end{classification} |
| 173 |
% |
| 174 |
% \licence{{\ccbysa*} 2023--{\year}, {\SSCen}~{\textbar}~{\SSCfr}} |
| 175 |
% |
| 176 |
% \makeCJStitle |
| 177 |
% |
| 178 |
% \section{Introduction} |
| 179 |
% |
| 180 |
% The class {\CJSclass} typesets manuscripts immediately in accordance |
| 181 |
% with the presentation rules of {\TheCJS}. The class uses its own |
| 182 |
% bibliographic styles: {\CJSbsten} for articles in English, and |
| 183 |
% {\CJSbstfr} for articles in French. The style {\CJSbsten} could best |
| 184 |
% be described as ``not unlike \code{apalike}'', whereas {\CJSbstfr} |
| 185 |
% is closely derived from the style \code{francais} provided by the |
| 186 |
% package % |
| 187 |
% \href{https://ctan.org/pkg/francais-bst}{\pkg{francais-bst}}. |
| 188 |
% |
| 189 |
% The styles were originally generated using the program |
| 190 |
% \code{makebst} by Patrick W.~Daly. The master bibliographic style |
| 191 |
% and the language definition files are heavily based on their |
| 192 |
% counterparts of the package % |
| 193 |
% \href{https://ctan.org/pkg/custom-bib}{\pkg{custom-bib}}, % |
| 194 |
% namely \code{merlin.mbs}, \code{english.mbs}, and \code{french.mbs}. |
| 195 |
% |
| 196 |
% \section{Generation of the bibliographic styles} |
| 197 |
% \label{sec:generation} |
| 198 |
% |
| 199 |
% The English style {\CJSbsten} is produced from this master |
| 200 |
% bibliographic style file and the language definition file |
| 201 |
% \code{cjs-rcs-english.mbs} by running the driver |
| 202 |
% \code{cjs-rcs-bst-en.dbj} through {\LaTeX}: |
| 203 |
% \begin{quote} |
| 204 |
% \code{latex cjs-rcs-bst-en.dbj} |
| 205 |
% \end{quote} |
| 206 |
% The French style {\CJSbstfr} is produced similarly using the driver |
| 207 |
% \code{cjs-rcs-bst-fr.dbj}: |
| 208 |
% \begin{quote} |
| 209 |
% \code{latex cjs-rcs-bst-fr.dbj} |
| 210 |
% \end{quote} |
| 211 |
% |
| 212 |
% \section{Changes compared to \texorpdfstring{\code{merlin.mbs}}{merlin.mbs}} |
| 213 |
% \label{sec:changes} |
| 214 |
% |
| 215 |
% The master bibliographic style \code{\filename} introduces the following |
| 216 |
% changes compared to \code{merlin.mbs}. |
| 217 |
% |
| 218 |
% \begin{enumerate} |
| 219 |
% \item The function \code{format.url} is reworked to provide a |
| 220 |
% cleaner URL for digital object identifiers (DOIs). The |
| 221 |
% \code{merlin.mbs} definition would generate a DOI of the form |
| 222 |
% \begin{quote} |
| 223 |
% URL \texttt{http://dx.doi.org/\meta{doi}} |
| 224 |
% \end{quote} |
| 225 |
% The revised definition instead generates the simpler string |
| 226 |
% \begin{quote} |
| 227 |
% doi: \meta{doi} |
| 228 |
% \end{quote} |
| 229 |
% When the package \pkg{hyperref} is loaded, \meta{doi} is a |
| 230 |
% hyperlink to the now recommended URL |
| 231 |
% \code{https://doi.org/\meta{doi}}. This behaviour relies on a |
| 232 |
% command \cmd{\urldoi} provided in the \texttt{.bbl} file. If |
| 233 |
% needed, this command may be redefined by the user. |
| 234 |
% \item The command \cmd{\urlprefix} is empty. Again, this may be |
| 235 |
% redefined by the user. |
| 236 |
% \item The quotes «~» are typeset by the macro \cmd{\frquote} of |
| 237 |
% \pkg{babel-french} (version $\geq$ 3.1), rather than by the custom |
| 238 |
% commands \cmd{\guillemotleft} and \cmd{\guillemotright}. |
| 239 |
% \item The \code{makebst} menu information is only included in the |
| 240 |
% complete documentation. The latter is obtained by commenting out |
| 241 |
% the command \cmd{\OnlyDescription} in \code{\filename} and |
| 242 |
% compiling the file with {pdf\LaTeX} or {\LuaLaTeX}. |
| 243 |
% \end{enumerate} |
| 244 |
% |
| 245 |
% \StopEventually{\PrintChanges} |
| 246 |
% |
| 247 |
% \begin{quote} |
| 248 |
% \itshape From this point on, the documentation is taken without |
| 249 |
% modification from \code{merlin.mbs} by Patrick W.~Daly, but for |
| 250 |
% minute details such as filenames. |
| 251 |
% \end{quote} |
| 252 |
% |
| 253 |
% \section{The Menu Information}\label{sec:menu} |
| 254 |
% |
| 255 |
% Here I describe the options and menu information for this particular |
| 256 |
% master file \texttt{\filename}. To construct a \dtx{} driver file |
| 257 |
% to generate a desired \texttt{.bst} file, simply process \texttt{makebst.tex} |
| 258 |
% with \TeX\ or \LaTeX, and give |
| 259 |
% \begin{quote}\code{\filename}\end{quote} |
| 260 |
% when prompted for the name of the master file. Then answer the questions |
| 261 |
% in the menus that follow. The menu information is extracted from here. |
| 262 |
% |
| 263 |
% All the menu information is nested between \dtx{} guard options |
| 264 |
% |%<*options>| \dots\ |%</options>|, and the last command is |
| 265 |
% |\endoptions|. The rest of the file is nested between |
| 266 |
% \begin{quote} |
| 267 |
% |%<*!options&!driver&!bblbst>| \dots\ |</!options&!driver&!bblbst>| |
| 268 |
% \end{quote} |
| 269 |
% in order to exclude it if \dtx{} is used to |
| 270 |
% extract the menu information, the documentation driver, or the |
| 271 |
% \texttt{babelbst.tex} file. |
| 272 |
% |
| 273 |
% The main coding is divided into two sections, the \emph{head} and |
| 274 |
% \emph{tail}; in between come any external language or journal name |
| 275 |
% support files. The head part is marked with the \dtx{} guard option |
| 276 |
% |<!tail>| and the tail with |<!head>|. This roundabout means of |
| 277 |
% doing things makes it possible to process \texttt{\filename} with |
| 278 |
% \texttt{.dbj} files that were generated for the older |
| 279 |
% \texttt{genbst.mbs} file by simply changing the name of the source |
| 280 |
% file. If both \texttt{head} and \texttt{tail} (and \texttt{exlang}) |
| 281 |
% options are omitted, as they are in the older \texttt{.dbj} files, |
| 282 |
% \texttt{\filename} is processed completely in one pass. To include |
| 283 |
% external files, two passes are needed, one for each part, with the |
| 284 |
% external file(s) coming in between. |
| 285 |
% |
| 286 |
% Note too that if the internal language commands are taken (i.e., if |
| 287 |
% \texttt{exlang} option is not given) then the default language is |
| 288 |
% English, which is tested for as |<!babel>|. This too permits the simple |
| 289 |
% update of older \texttt{.dbj}, at least for English. |
| 290 |
% |
| 291 |
% \subsection*{Selecting Language} |
| 292 |
% Explicit words in the bibliography style, such as \textsl{and}, |
| 293 |
% \textsl{editor}, etc., |
| 294 |
% are represented by functions \texttt{bbl.and}, \texttt{bbl.editor}, and so on. |
| 295 |
% By default these functions translate to the normal English text, but |
| 296 |
% other languages are also possible. |
| 297 |
% |
| 298 |
% The definitions of these functions for other languages are contained in |
| 299 |
% external files. At this point, we can make use of features in |
| 300 |
% \texttt{makebst} (version~3.0 or later) to ask for the name of such a |
| 301 |
% definition file, and store it in |\cfile|. If no external file is |
| 302 |
% specified, then the internal definitions are taken, for which there are |
| 303 |
% two possibilities: English or \LaTeX{} commands (Babel). |
| 304 |
% |
| 305 |
% The commands |\MBswitch|, |\mes|, |\MBaskfile|, |\wr|, |\pc|, |\spsp| are |
| 306 |
% defined in \texttt{makebst.tex}. |
| 307 |
% |
| 308 |
% If |\MBswitch| does not exist, then the version of \texttt{makebst} |
| 309 |
% cannot support external files. |
| 310 |
% |
| 311 |
% \begin{macrocode} |
| 312 |
%<*options> |
| 313 |
\expandafter\ifx\csname beginoptiongroup\endcsname\relax |
| 314 |
\mes{^^J******************^^J% |
| 315 |
!!!!!! VERSION CLASH !!!!!!!!!^^J% |
| 316 |
This mbs file requires makebst version 4.0 or more^^J% |
| 317 |
You must update makebst to run it with this mbs file^^J% |
| 318 |
No docstrip batch file can be produced on this run^^J% |
| 319 |
******************} |
| 320 |
\let\temp\endinput\else\let\temp\relax\fi\temp |
| 321 |
|
| 322 |
\newif\ifnumerical |
| 323 |
\newif\ifmytemp |
| 324 |
\mes{<<< For more information about the meanings of^^J% |
| 325 |
<<< the various options, see the section on ^^J% |
| 326 |
<<< Menu Information in the .mbs file documentation.} |
| 327 |
|
| 328 |
\umes{EXTERNAL FILES:} |
| 329 |
\expandafter\ifx\csname MBswitch\endcsname\relax |
| 330 |
\mes{^^J**************^^J% |
| 331 |
Makebst version is less than 3.0^^J% |
| 332 |
Cannot add external file for language definition^^J% |
| 333 |
**************} |
| 334 |
\umes{No included files.}% |
| 335 |
\def\cfile{}\def\jfile{}% |
| 336 |
\else |
| 337 |
\MBaskfile{^^JName of language definition file}(\mroot.\mext)i\cfile |
| 338 |
\edef\ctemp{\mroot.\mext} |
| 339 |
\ifx\ctemp\cfile\def\cfile{}\fi |
| 340 |
\umes{Name of language file: \string\cfile=\cfile.}% |
| 341 |
% \end{macrocode} |
| 342 |
% |
| 343 |
% A second type of external file that can be added is one containing names |
| 344 |
% of journals that are to be prestored into the \texttt{.bst} file. |
| 345 |
% Several file names are allowed here, with the root names separated by |
| 346 |
% commas, and with the common extension added at the end. To assist later |
| 347 |
% parsing of the names, an additional comma is added before the extension. |
| 348 |
% |
| 349 |
% Note that in this case |\MBaskfile| treats the file(s) as output, i.e., |
| 350 |
% it does not check if the file(s) actually exist. |
| 351 |
% |
| 352 |
% The macro |\Mgetnext| allows the root names to be extracted from the |
| 353 |
% list of file names. |
| 354 |
% \begin{macrocode} |
| 355 |
\def\jfile{} |
| 356 |
\ask{\yn}{^^JInclude file(s) for extra journal names? (NO)} |
| 357 |
\mytempfalse |
| 358 |
\if!\yn!\else\if\yn n\else\if\yn N\else\mytemptrue\fi\fi\fi |
| 359 |
\ifmytemp |
| 360 |
\MBaskfile{^^JFile to include}(physjour,geojour,photjour.mbs)o\jfile |
| 361 |
\edef\jfile{\froot,.\fext} |
| 362 |
\umes{Name of included files: \string\jfile=\jfile.}% |
| 363 |
\else |
| 364 |
\umes{No included files.}% |
| 365 |
\fi |
| 366 |
\fi%MBswitch |
| 367 |
\def\Mgetnext#1,#2.#3??{\def\froot{#1}\def\Mrest{#2}\def\fext{#3}} |
| 368 |
% \end{macrocode} |
| 369 |
% |
| 370 |
% If no external files are specified, then both |\cfile| and |\jfile| are |
| 371 |
% empty. In this case, do \emph{not} set the options \texttt{head} and |
| 372 |
% \texttt{tail}, which control the \dtx{} passes through |
| 373 |
% \texttt{filename}. Now only one pass is made. |
| 374 |
% |
| 375 |
% If there is an external definition file, or an external list of |
| 376 |
% journal names, then some extra text must be |
| 377 |
% written to fit in with that already written by \texttt{makebst}. This is |
| 378 |
% explained in that documentation. The |\MBswitch| command turns the curly |
| 379 |
% braces |{..}| into normal characters, and the parentheses |(..)| take on |
| 380 |
% their grouping functionality. This permits unbalanced braces to be |
| 381 |
% written to the output file. |
| 382 |
% |
| 383 |
% \begin{macrocode} |
| 384 |
\if!\cfile\jfile!\else |
| 385 |
\begingroup\MBswitch |
| 386 |
\wr(\spsp head,\string\MBopta}) |
| 387 |
\if!\cfile!\else |
| 388 |
\wr(\string\from{\cfile}{\string\MBopta}) |
| 389 |
\fi |
| 390 |
\if!\jfile!\else |
| 391 |
\let\jxfile\jfile |
| 392 |
\loop |
| 393 |
% \end{macrocode} |
| 394 |
% |
| 395 |
% Parse the list of journal name files, adding a new |\from| for each one. |
| 396 |
% |
| 397 |
% \begin{macrocode} |
| 398 |
\expandafter\Mgetnext\jxfile?? |
| 399 |
\wr(\string\from{\froot.\fext}{\string\MBopta}) |
| 400 |
\edef\jxfile(\Mrest.\fext) |
| 401 |
\if!\Mrest!\def\Mtst(1)\else\def\Mtst()\fi |
| 402 |
\if!\Mtst! |
| 403 |
\repeat |
| 404 |
\fi |
| 405 |
\wr(\string\from{\mroot.\mext}{tail,\string\MBopta}}) |
| 406 |
\wr(\string\def\string\MBopta{\pc) |
| 407 |
\endgroup |
| 408 |
\fi |
| 409 |
% \end{macrocode} |
| 410 |
% |
| 411 |
% Ask whether there is a need for |
| 412 |
% explicit English words or \LaTeX{} commands whose definitions are |
| 413 |
% to be found in the file \texttt{babelbst.tex}. |
| 414 |
% |
| 415 |
% \begin{macrocode} |
| 416 |
\beginoptiongroup{INTERNAL LANGUAGE SUPPORT |
| 417 |
(if no external language file)}% |
| 418 |
{\if!\cfile!\relax*\fi}% |
| 419 |
\optdef{*}{}{English}{words used explicitly} |
| 420 |
\optdef{b}{babel}{Babel} |
| 421 |
{(words replaced by commands defined in babelbst.tex)} |
| 422 |
\getans |
| 423 |
\endoptiongroup |
| 424 |
\if!\cfile!\relax\else |
| 425 |
\wr{\spsp\spsp exlang,\pc: External language file} |
| 426 |
\fi |
| 427 |
% \end{macrocode} |
| 428 |
% |
| 429 |
% \subsection*{Author--year or numerical} |
| 430 |
% The first question is whether a numerical or author--year citation |
| 431 |
% style is to be used. If the latter, the supporting system is my |
| 432 |
% \code{natbib.sty}, which expects |\bibitem| to have an optional |
| 433 |
% argument containing the short form of the authors, plus year in |
| 434 |
% parentheses. E.g., |
| 435 |
% \begin{quote} |
| 436 |
% |\bibitem[Daly et al.(1990)]{key}...| |
| 437 |
% \end{quote} |
| 438 |
% There is now a newer version of \texttt{natbib.sty} (v5.3) that |
| 439 |
% supports an optional full author list too, as |
| 440 |
% \begin{quote} |
| 441 |
% |\bibitem[Daly et al.(1990)Daly, Keppler, and Williams]{key}...| |
| 442 |
% \end{quote} |
| 443 |
% Other systems are also supported, such as the Harvard family of |
| 444 |
% bibliography styles (with \texttt{harvard.sty}), which have entries in the |
| 445 |
% form |
| 446 |
% \begin{quote} |
| 447 |
% |\harvarditem[Daly et al.]{Daly, Keppler,|\\ |
| 448 |
% | and Williams}{1990}{key}...| |
| 449 |
% \end{quote} |
| 450 |
% or the astronomy family (with \texttt{astron.sty}) with entries like |
| 451 |
% \begin{quote} |
| 452 |
% |\bibitem[\protect\astroncite{Daly et al.}{1990}]{key}...| |
| 453 |
% \end{quote} |
| 454 |
% or the Chicago family (with \texttt{chicago.sty}) with entries like |
| 455 |
% \begin{quote} |
| 456 |
% |\bibitem[\protect\citeautheryear{Daly, Keppler, and|\\ |
| 457 |
% | Williams}{Daly et al.}{1990}]{key}...| |
| 458 |
% \end{quote} |
| 459 |
% or the `named' variant of Chicago (with \texttt{named.sty}) with entries like |
| 460 |
% \begin{quote} |
| 461 |
% |\bibitem[\protect\citeauthoryear{Daly et al.}{1990}]{key}...| |
| 462 |
% \end{quote} |
| 463 |
% or the so-called ``author--date'' group (with \texttt{authordate1-4.sty}) |
| 464 |
% with entries of the form |
| 465 |
% \begin{quote} |
| 466 |
% |\bibitem[\protect\citename{Daly et al.}1990]{key}...| |
| 467 |
% \end{quote} |
| 468 |
% Finally, there is the \texttt{apalike} format of Oren Patashnik, for use |
| 469 |
% with \texttt{apalike.sty} that has entries of the form |
| 470 |
% \begin{quote} |
| 471 |
% |\bibitem[Daly et al., 1990]{key}...| |
| 472 |
% \end{quote} |
| 473 |
% |
| 474 |
% In addition to numerical or author--year citation styles, there is also a |
| 475 |
% \texttt{cite} style available in which the label is the same as the cite |
| 476 |
% key. This is for listing entire contents of databases with the cite key |
| 477 |
% visible. |
| 478 |
% |
| 479 |
% A flag |\ifnumerical| is established because some of the following menu |
| 480 |
% features depend on which system is to be used. |
| 481 |
% |
| 482 |
% The \texttt{alph} option produces labels as in \texttt{alpha.bst}; options |
| 483 |
% \texttt{alf-1} and \texttt{alf-f} modify these. Standard is: first three |
| 484 |
% letters of the single author (Dal90 for Daly, 1990) and first letters of |
| 485 |
% first three authors (DK90 for Daly and Kopka, 1990). Alternatives are first |
| 486 |
% three letters of the first author, no matter how many authors there are, and |
| 487 |
% full name of first author. |
| 488 |
% \begin{macrocode} |
| 489 |
\beginoptiongroup{STYLE OF CITATIONS:}{} |
| 490 |
\optdef{*}{}{Numerical}{as in standard LaTeX} |
| 491 |
\optdef{a}{ay}{Author-year}{with some non-standard interface} |
| 492 |
\optdef{b}{alph}{Alpha style, Jon90 or JWB90}{for single or multiple authors} |
| 493 |
\optdef{o}{alph,alf-1}{Alpha style, Jon90}{even for multiple authors} |
| 494 |
\optdef{f}{alph,alf-f}{Alpha style, Jones90}{(full name of first author)} |
| 495 |
\optdef{c}{cite}{Cite key}{(special for listing contents of bib file)} |
| 496 |
\getans |
| 497 |
\endoptiongroup |
| 498 |
\if\ans a\numericalfalse\else\numericaltrue\fi |
| 499 |
\if\ans b\mytempfalse \else\mytemptrue \fi |
| 500 |
\beginoptiongroup{HTML OUTPUT |
| 501 |
(if non author-year citations)} |
| 502 |
{\ifnumerical*\fi} |
| 503 |
\optdef{*}{}{Normal LaTeX}{output} |
| 504 |
\optdef{h}{html}{Hypertext}{output, in HTML code, in paragraphs} |
| 505 |
\optdef{n}{html,htlist}{Hypertext list}{with sequence numbers} |
| 506 |
\optdef{k}{html,htdes}{Hypertext with keys}{for viewing databases} |
| 507 |
\getans |
| 508 |
\endoptiongroup |
| 509 |
\beginoptiongroup{AUTHOR--YEAR SUPPORT SYSTEM |
| 510 |
(if author-year citations)} |
| 511 |
{\ifnumerical\else*\fi} |
| 512 |
\optdef{*}{nat}{Natbib}{for use with natbib v5.3 or later} |
| 513 |
\optdef{o}{}{Older Natbib}{without full authors citations} |
| 514 |
\optdef{l}{alk}{Apalike}{for use with apalike.sty} |
| 515 |
\optdef{h}{har}{Harvard}{system with harvard.sty} |
| 516 |
\optdef{a}{ast}{Astronomy}{system with astron.sty} |
| 517 |
\optdef{c}{cay}{Chicago}{system with chicago.sty} |
| 518 |
\optdef{n}{nmd}{Named}{system with named.sty} |
| 519 |
\optdef{d}{cn}{Author-date}{system with authordate1-4.sty} |
| 520 |
\getans |
| 521 |
% \end{macrocode} |
| 522 |
% The \texttt{harvard} family has been extended for \LaTeXe, and the new |
| 523 |
% \texttt{.bst} files allow the word \textsl{and} and the brackets around years |
| 524 |
% to be variable with commands. These features may be added too. |
| 525 |
% The URL field used to be exclusively part of Harvard, but now exists |
| 526 |
% independently of it too. |
| 527 |
% |
| 528 |
% \begin{macrocode} |
| 529 |
\beginoptiongroup{HARVARD EXTENSIONS INCLUDED |
| 530 |
(if Harvard support selected)} |
| 531 |
{\if\ans h*\fi}% |
| 532 |
\optdef{*}{harnm}{With Harvard extensions}{for LaTeX2e version of harvard.sty} |
| 533 |
\optdef{n}{}{Older Harvard}{style, for LaTeX 2.09} |
| 534 |
\getans |
| 535 |
\endoptiongroup |
| 536 |
\endoptiongroup |
| 537 |
% \end{macrocode} |
| 538 |
% |
| 539 |
% \subsection*{Language switching} |
| 540 |
% A \texttt{language} field can be present to specify the original language of |
| 541 |
% the reference; with \verb!\setlanguage!, the hyphenation patterns are set for |
| 542 |
% setting the title in that language. |
| 543 |
% \begin{macrocode} |
| 544 |
\beginoptiongroup{LANGUAGE FIELD}{} |
| 545 |
\optdef{*}{}{No language field}{} |
| 546 |
\optdef{l}{lang}{Add language field}{to switch hyphenation patterns temporarily} |
| 547 |
\getans |
| 548 |
\endoptiongroup |
| 549 |
% \end{macrocode} |
| 550 |
% |
| 551 |
% \subsection*{Annotations} |
| 552 |
% Annotations to a reference are additional information not normally printed |
| 553 |
% out in the list of references. They are used for listing databases. |
| 554 |
% The coding here was offered by Soren Dayton. |
| 555 |
% \begin{macrocode} |
| 556 |
\beginoptiongroup{ANNOTATIONS:}{} |
| 557 |
\optdef{*}{}{No annotations}{will be recognized} |
| 558 |
\optdef{a}{annote}{Annotations}{in annote field or in .tex file of citekey name} |
| 559 |
\getans |
| 560 |
\endoptiongroup |
| 561 |
% \end{macrocode} |
| 562 |
% |
| 563 |
% \subsection*{Presentations} |
| 564 |
% Presentations are talks at meetings, oral or poster, that are not otherwise |
| 565 |
% published. The author making the presentation is indicated with the \texttt{key} |
| 566 |
% entry, which is the speaker's number within the author list. The font used |
| 567 |
% to highlight the speaker is either bold or italics, depending on the secondary |
| 568 |
% option, otherwise not highlighted. |
| 569 |
% \begin{macrocode} |
| 570 |
\beginoptiongroup{PRESENTATIONS:}{} |
| 571 |
\optdef{*}{}{Do not add presentation type}{for conference talks} |
| 572 |
\optdef{p}{pres}{Add presentation, speaker not highlighted}{} |
| 573 |
\optdef{b}{pres,pres-bf}{Presentation, speaker bold face}{} |
| 574 |
\optdef{i}{pres,pres-it}{Presentaion, speaker italic}{} |
| 575 |
\optdef{c}{pres,pres-sc}{Presentaion, speaker in small caps}{} |
| 576 |
\getans |
| 577 |
\endoptiongroup |
| 578 |
% \end{macrocode} |
| 579 |
% |
| 580 |
% \subsection*{Ordering of the listed references} |
| 581 |
% Choices here depend on citation style. The default in both cases is |
| 582 |
% alphabetical order of all authors. For numerical style, one may also |
| 583 |
% choose an unsorted order, which means the order is the same as the original |
| 584 |
% citations. This corresponds to \texttt{unsrt.bst}. Order of citation is |
| 585 |
% also offered for author--year for \texttt{natbib}-type styles that can |
| 586 |
% also be used for numerical listings. |
| 587 |
% |
| 588 |
% Another possibility is to order first by year, then authors. This too only |
| 589 |
% makes sense for numerical citations. However, it is offered for author--year |
| 590 |
% in the event that a \texttt{natbib}-type style is used for numerical |
| 591 |
% listings. |
| 592 |
% |
| 593 |
% For the alpha style, the ordering is by label only, so no option is |
| 594 |
% offered here (|\ifnumerical| is \meta{true} and |\ifmytemp| is \meta{false}). |
| 595 |
% |
| 596 |
% For author--year, the second choice is by label. (The label is the |
| 597 |
% optional |\bibitem| argument, and is what is printed in place of the |
| 598 |
% |\cite| command.) With this option, all the papers with the same first |
| 599 |
% author are ordered so that the one-author papers come first, followed by |
| 600 |
% the two-author papers, followed by the multiple-author papers. This is a |
| 601 |
% more sensible system for author--year citations, and is demanded by some |
| 602 |
% journals (like JGR). |
| 603 |
% |
| 604 |
% One problem that can arise here is when two or more references have the |
| 605 |
% same set of authors and year; normally they are then ordered by the |
| 606 |
% title, ignoring initial words like \textsl{the} and \textsl{a}, with the |
| 607 |
% letters a, b, |
| 608 |
% c, \dots, added to the year. This can mean that a set of references with |
| 609 |
% a natural sequence will be put into a different order. An alternative is |
| 610 |
% to order them by the citation keyword instead of by title. This of course |
| 611 |
% assumes that the keywords in this case reflect that natural sequence. |
| 612 |
% \begin{macrocode} |
| 613 |
\let\ans\relax |
| 614 |
\beginoptiongroup{ORDERING OF REFERENCES |
| 615 |
(if non-author/year and non-alph)} |
| 616 |
{\ifnumerical\ifmytemp*\fi\fi}% |
| 617 |
\optdef{*}{}{Alphabetical}{by all authors} |
| 618 |
\optdef{c}{seq-no}{Citation order}{(unsorted, like unsrt.bst)} |
| 619 |
\optdef{d}{seq-yr}{Year ordered}{and then by authors} |
| 620 |
\optdef{r}{seq-yrr}{Reverse year ordered}{and then by authors} |
| 621 |
\getans |
| 622 |
\endoptiongroup |
| 623 |
% |
| 624 |
\beginoptiongroup{ORDERING OF REFERENCES |
| 625 |
(if author-year citations)} |
| 626 |
{\ifnumerical\else*\fi}% |
| 627 |
\optdef{*}{}{Alphabetical}{by all authors} |
| 628 |
\optdef{l}{seq-lab}{By label}% |
| 629 |
{(Jones before Jones and James before Jones et al)} |
| 630 |
\optdef{m}{seq-labc}{By label and cite order}% |
| 631 |
{(like above but all Jones et al ordered as cited)} |
| 632 |
\optdef{k}{seq-key}{By label and cite key}{instead of label and title, as above} |
| 633 |
\optdef{d}{seq-yr}{Year ordered}{and then by authors (for publication lists)} |
| 634 |
\optdef{r}{seq-yrr}{Reverse year ordered}{and then by authors (most recent first)} |
| 635 |
\optdef{c}{seq-no}{Citation order}{(unsorted, only meaningful for numericals)} |
| 636 |
\getans |
| 637 |
\endoptiongroup |
| 638 |
% \end{macrocode} |
| 639 |
% The standard \btx\ styles consider the \emph{von} part of the name to be a |
| 640 |
% fixed part of the surname. European usage tends to alphabetize ignoring these |
| 641 |
% honorifics. |
| 642 |
% \begin{macrocode} |
| 643 |
\beginoptiongroup{ORDER ON VON PART |
| 644 |
(if not citation order)} |
| 645 |
{\if\ans c\else*\fi}% |
| 646 |
\optdef{*}{}{Sort on von part}{(de la Maire before Defoe)} |
| 647 |
\optdef{x}{vonx}{Sort without von part}{(de la Maire after Mahone)} |
| 648 |
\getans |
| 649 |
\endoptiongroup |
| 650 |
% \end{macrocode} |
| 651 |
% |
| 652 |
% Sorting normally treats authors with the same surname but different initials |
| 653 |
% or first name separately; but a strict ordering by cite label would lump all |
| 654 |
% Smiths together. |
| 655 |
% \begin{macrocode} |
| 656 |
\beginoptiongroup{IGNORE FIRST NAMES (if author-year citations)} |
| 657 |
{\ifnumerical\else*\fi}% |
| 658 |
\optdef{*}{}{Respect first names}{or initials, treat as different authors} |
| 659 |
\optdef{x}{xintls}{Sort on surname only}{and treat all Smiths as one} |
| 660 |
\getans |
| 661 |
\endoptiongroup |
| 662 |
% \end{macrocode} |
| 663 |
% |
| 664 |
% \subsection*{Formatting author names} |
| 665 |
% The default is that the full names of the authors are listed, given names |
| 666 |
% first, unabbreviated. Of course, if only the initials have been given in |
| 667 |
% the \texttt{.bib} file, then that is all that can appear in the list. Other |
| 668 |
% possibilities are to use initials (even if full names in the \texttt{.bib} |
| 669 |
% file) either before or after the surnames. A specialty of the journals of |
| 670 |
% the American Geophysical Union is to have only the first name with |
| 671 |
% reversed initials. |
| 672 |
% |
| 673 |
% If the reference is part of a larger work with editors, then the editor |
| 674 |
% names appear later in the reference text, usually as ``edited by \dots'' |
| 675 |
% or as ``\emph{names} (editors)''. In these cases, the editor names are |
| 676 |
% not usually reversed (surname first) even if the authors' names are. |
| 677 |
% An option is provided to format such editor names exactly as the authors'. |
| 678 |
% \begin{macrocode} |
| 679 |
\beginoptiongroup{AUTHOR NAMES:}{} |
| 680 |
\optdef{*}{ed-au}{Full, surname last}{(John Frederick Smith)} |
| 681 |
\optdef{f}{nm-revf}{Full, surname first}{(Smith, John Frederick)} |
| 682 |
\optdef{i}{nm-init,ed-au}{Initials + surname}{(J. F. Smith)} |
| 683 |
\optdef{r}{nm-rev}{Surname + initials}{(Smith, J. F.)} |
| 684 |
\optdef{s}{nm-rv}{Surname + dotless initials}{(Smith J F)} |
| 685 |
\optdef{w}{nm-rvvc}{Surname + comma + spaceless initials}{(Smith, J.F.)} |
| 686 |
\optdef{x}{nm-rvx}{Surname + pure initials}{(Smith JF)} |
| 687 |
\optdef{y}{nm-rvcx}{Surname + comma + pure initials}{(Smith, JF)} |
| 688 |
\optdef{z}{nm-rvv}{Surname + spaceless initials}{(Smith J.F.)} |
| 689 |
\optdef{a}{nm-rev1}{Only first name reversed, initials}% |
| 690 |
{(AGU style: Smith, J. F., H. K. Jones)} |
| 691 |
\optdef{b}{nm-revv1}{First name reversed, with full names}% |
| 692 |
{(Smith, John Fred, Harry Kab Jones)} |
| 693 |
\getans |
| 694 |
\endoptiongroup |
| 695 |
\mytempfalse |
| 696 |
\if\ans f\mytemptrue\fi |
| 697 |
\if\ans r\mytemptrue\fi |
| 698 |
\if\ans s\mytemptrue\fi |
| 699 |
\if\ans x\mytemptrue\fi |
| 700 |
\if\ans y\mytemptrue\fi |
| 701 |
\if\ans a\mytemptrue\fi |
| 702 |
\if\ans b\mytemptrue\fi |
| 703 |
\beginoptiongroup{EDITOR NAMES IN COLLECTIONS |
| 704 |
(if author names reversed)} |
| 705 |
{\ifmytemp*\fi} |
| 706 |
\if\ans r |
| 707 |
\optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith} |
| 708 |
\fi |
| 709 |
\if\ans s |
| 710 |
\optdef{*}{}{Editor names NOT reversed}{as edited by J J Smith} |
| 711 |
\fi |
| 712 |
\if\ans a |
| 713 |
\optdef{*}{}{Editor names NOT reversed}{as edited by J. J. Smith} |
| 714 |
\fi |
| 715 |
\if\ans x |
| 716 |
\optdef{*}{}{Editor names NOT reversed}{as edited by JJ Smith} |
| 717 |
\fi |
| 718 |
\if\ans f |
| 719 |
\optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith} |
| 720 |
\fi |
| 721 |
\if\ans y |
| 722 |
\optdef{*}{}{Editor names NOT reversed}{as edited by J.J. Smith} |
| 723 |
\fi |
| 724 |
\if\ans b |
| 725 |
\optdef{*}{}{Editor names NOT reversed}{as edited by John James Smith} |
| 726 |
\fi |
| 727 |
\optdef{r}{ed-rev}{Editor names reversed}{just like authors'} |
| 728 |
\getans |
| 729 |
\beginoptiongroup{POSITION OF JUNIOR |
| 730 |
(if author names reversed)} |
| 731 |
{} |
| 732 |
\optdef{*}{jnrlst}{Junior comes last}{as Smith, John, Jr.} |
| 733 |
\optdef{m}{}{Junior between}{as Smith, Jr., John} |
| 734 |
\getans |
| 735 |
\endoptiongroup |
| 736 |
\endoptiongroup |
| 737 |
|
| 738 |
\beginoptiongroup{JUNIOR PART IN THE CITATION |
| 739 |
(if author-year citations)} |
| 740 |
{\ifnumerical\else*\fi}% |
| 741 |
\optdef{*}{}{No `junior' part in the citations}{but in the ref listing} |
| 742 |
\optdef{j}{jnrlab}{`Junior' in citations}{as well as in ref listing} |
| 743 |
\getans |
| 744 |
\endoptiongroup |
| 745 |
|
| 746 |
\beginoptiongroup{PUNCTUATION BETWEEN AUTHOR NAMES:}{} |
| 747 |
\optdef{*}{}{Author names separated by commas}{} |
| 748 |
\optdef{s}{aunm-semi}{Names separated by semi-colon}{} |
| 749 |
\optdef{h}{aunm-sl}{Names separated by slash}{/} |
| 750 |
\getans |
| 751 |
\endoptiongroup |
| 752 |
|
| 753 |
\beginoptiongroup{ADJACENT REFERENCES WITH REPEATED NAMES:}{} |
| 754 |
\optdef{*}{}{Author/editor names always present}{} |
| 755 |
\optdef{d}{nmdash}{Repeated author/editor names replaced by dash}{} |
| 756 |
\optdef{2}{nmdash,nmd-2}{Repeated author/editor names replaced by 2 dashes}{} |
| 757 |
\optdef{3}{nmdash,nmd-3}{Repeated author/editor names replaced by 3 dashes}{} |
| 758 |
\getans |
| 759 |
\endoptiongroup |
| 760 |
% \end{macrocode} |
| 761 |
% |
| 762 |
% \subsection*{Number of authors} |
| 763 |
% Normally the complete list of authors as given in the \texttt{.bib} file is |
| 764 |
% presented in the reference list. However, some journals prefer to limit |
| 765 |
% them to a maximum. If there are more than this maximum number of author |
| 766 |
% names, then a minimum number plus \textsl{et al.} are listed. |
| 767 |
% |
| 768 |
% Because no test for consistency of the numbers is carried out in the |
| 769 |
% \texttt{.bst} file itself (it might be possible, but I found it too complex), |
| 770 |
% this is done here. |
| 771 |
% \begin{macrocode} |
| 772 |
\beginoptiongroup{NUMBER OF AUTHORS IN BIBLIOGRAPHY:}{} |
| 773 |
\optdef{*}{}{All authors}{included in listing} |
| 774 |
\optdef{l}{nmlm}{Limited authors}{(et al replaces missing names)} |
| 775 |
\getans |
| 776 |
\endoptiongroup |
| 777 |
\if\ans l |
| 778 |
\loop |
| 779 |
\ask{\num}{Maximum number of authors (1-99)} |
| 780 |
\ifnum\num>99\relax |
| 781 |
\mes{*** Must be between 1 and 99} |
| 782 |
\repeat |
| 783 |
\def\parsenum#1#2{\if#2\relax\wr{\spsp\spsp x#1,\pc: Maximum of #1\space authors} |
| 784 |
\else\wr{\spsp\spsp x#10,x#2,\pc: Maximum of #1#2\space authors}\fi} |
| 785 |
\expandafter\parsenum\num\relax |
| 786 |
\mes{\spsp You have selected maximum \num\space authors} |
| 787 |
\edef\numx{\num} |
| 788 |
\loop |
| 789 |
\ask{\num}{Minimum number (before et al given) (1-\numx)} |
| 790 |
\ifnum\num>\numx |
| 791 |
\mes{*** Must be between 1 and \numx} |
| 792 |
\repeat |
| 793 |
\def\parsenum#1#2{\if#2\relax\wr{\spsp\spsp m#1,\pc: Minimum of #1\space authors} |
| 794 |
\else\wr{\spsp\spsp m#10,m#2,\pc: Minimum of #1#2\space authors}\fi} |
| 795 |
\expandafter\parsenum\num\relax |
| 796 |
\mes{\spsp You have selected minimum \num\space authors} |
| 797 |
\fi |
| 798 |
|
| 799 |
% \end{macrocode} |
| 800 |
% |
| 801 |
% Something that I finally added after being asked many times, is to allow for |
| 802 |
% more than one name in the citation before inserting \textsl{et~al.} |
| 803 |
% to allow more than 2 authors before truncating |
| 804 |
% \begin{macrocode} |
| 805 |
\beginoptiongroup{AUTHORS IN CITATIONS:}{} |
| 806 |
\optdef{*}{}{One author et al}{for three or more authors} |
| 807 |
\optdef{m}{mcite}{Some other truncation scheme}{} |
| 808 |
\getans |
| 809 |
\endoptiongroup |
| 810 |
\mytempfalse |
| 811 |
\if\ans m\mytemptrue\fi |
| 812 |
\beginoptiongroup{MAX AUTHORS BEFORE ET AL: |
| 813 |
(if regular cite not selected)} |
| 814 |
{\ifmytemp*\fi}% |
| 815 |
\optdef{*}{mct-1}{One et al}{} |
| 816 |
\optdef{2}{mct-2}{One, Two et al}{} |
| 817 |
\optdef{3}{mct-3}{One, Two, Three et al}{} |
| 818 |
\optdef{4}{mct-4}{One, Two, Three, Four et al}{} |
| 819 |
\optdef{5}{mct-5}{One, Two, Three, Four, Five et al}{} |
| 820 |
\optdef{6}{mct-6}{One, Two, Three, Four, Five, Six et al}{} |
| 821 |
\getans |
| 822 |
\endoptiongroup |
| 823 |
\beginoptiongroup{MAX AUTHORS WITHOUT ET AL: |
| 824 |
(if regular cite not selected)} |
| 825 |
{\ifmytemp*\fi}% |
| 826 |
\optdef{*}{mct-x2}{Two authors without truncating}{} |
| 827 |
\optdef{3}{mct-x3}{Three authors}{without truncating} |
| 828 |
\optdef{4}{mct-x4}{Four authors}{without truncating} |
| 829 |
\optdef{5}{mct-x5}{Five authors}{without truncating} |
| 830 |
\optdef{6}{mct-x6}{Six authors}{without truncating} |
| 831 |
\getans |
| 832 |
\endoptiongroup |
| 833 |
% \end{macrocode} |
| 834 |
% |
| 835 |
% \subsection*{Typeface of names} |
| 836 |
% The author names in the list of references normally appear in the current |
| 837 |
% typeface. This may be changed to small caps, bold, or italics. |
| 838 |
% |
| 839 |
% Alternatively, the surnames only can be formatted, with the first names in the |
| 840 |
% regular font. One can also specify that the words `and' and `et~al.'\ should be |
| 841 |
% in the regular font, or that `et~al.'\ be italic. |
| 842 |
% |
| 843 |
% Another possibility is that the names be put into a command |\bibnamefont{..}|, |
| 844 |
% which must be defined in the \LaTeX\ document. By default, this command does |
| 845 |
% not format its argument. There is also a |\bibfnamefont| command for the first |
| 846 |
% names, to be user-defined. |
| 847 |
% |
| 848 |
% Editor names in a collection or in a book will not normally have these |
| 849 |
% fonts applied to them; this may be additionally selected. |
| 850 |
% |
| 851 |
% \begin{macrocode} |
| 852 |
\beginoptiongroup{TYPEFACE FOR AUTHORS IN LIST OF REFERENCES:}{} |
| 853 |
\optdef{*}{}{Normal font for author names}{} |
| 854 |
\optdef{s}{nmft,nmft-sc}{Small caps authors}{(\string\sc)} |
| 855 |
\optdef{i}{nmft,nmft-it}{Italic authors}{(\string\it\space or \string\em)} |
| 856 |
\optdef{b}{nmft,nmft-bf}{Bold authors}{(\string\bf)} |
| 857 |
\optdef{u}{nmft,nmft-def}{User defined author font}{(\string\bibnamefont)} |
| 858 |
\getans |
| 859 |
\endoptiongroup |
| 860 |
\mytempfalse |
| 861 |
\if\ans i\mytemptrue\fi |
| 862 |
\if\ans s\mytemptrue\fi |
| 863 |
\if\ans b\mytemptrue\fi |
| 864 |
\if\ans u\mytemptrue\fi |
| 865 |
\beginoptiongroup{FONT FOR FIRST NAMES |
| 866 |
(if non-default font for authors)} |
| 867 |
{\ifmytemp*\fi}% |
| 868 |
\optdef{*}{}{First names same font as surnames}{} |
| 869 |
\optdef{r}{fnm-rm}{First names in normal font}{} |
| 870 |
\optdef{u}{fnm-def}{First names in user defined font}{(\string\bibfnamefont)} |
| 871 |
\getans |
| 872 |
\beginoptiongroup{EDITOR NAMES IN INCOLLECTION ETC:}{} |
| 873 |
\optdef{*}{}{Editors incollection normal font}{} |
| 874 |
\optdef{a}{nmfted}{Editors incollection like authors}{font} |
| 875 |
\getans |
| 876 |
\endoptiongroup |
| 877 |
|
| 878 |
\beginoptiongroup{FONT FOR `AND' IN LIST:}{} |
| 879 |
\optdef{*}{}{`And' in author font}{(JONES AND JAMES)} |
| 880 |
\optdef{r}{nmand-rm}{`And' in normal font}{(JONES and JAMES)} |
| 881 |
\getans |
| 882 |
\endoptiongroup |
| 883 |
\endoptiongroup |
| 884 |
% \end{macrocode} |
| 885 |
% |
| 886 |
% \subsection*{Names in Citation label} |
| 887 |
% This applies to author--year style only. The label is the text written |
| 888 |
% by the |\cite| command, and for author--year style, this is something like |
| 889 |
% `Daly et al.\ (1990b)'. One may select italics for the authors and for the |
| 890 |
% extra label attached to the year. The year always remains plain. |
| 891 |
% |
| 892 |
% This parallels the font selection for the names in the list of references |
| 893 |
% except that there no choice for the first names, since only surnames |
| 894 |
% are used in the labels. A user-defined |\citefontname| may also |
| 895 |
% be selected, but this \emph{must} be defined by the user since there |
| 896 |
% will be no default definition for it. |
| 897 |
% |
| 898 |
% If a font is selected for the cited authors, then the word `and' may be |
| 899 |
% optionally put in the normal font. |
| 900 |
% |
| 901 |
% It is not possible to select the type of brackets for the year, since |
| 902 |
% this is determined by the \LaTeX{} style option that manages the |
| 903 |
% author--year citations. This is not standard \LaTeX, so that there are a |
| 904 |
% number of private style files for achieving this. |
| 905 |
% \begin{macrocode} |
| 906 |
\beginoptiongroup{FONT OF CITATION LABELS IN TEXT |
| 907 |
(if author-year citations)} |
| 908 |
{\ifnumerical\else*\fi}% |
| 909 |
\optdef{*}{}{Cited authors plain}{as result of \string\cite\space command} |
| 910 |
\optdef{i}{lab,lab-it}{Cited authors italic}{} |
| 911 |
\optdef{s}{lab,lab-sc}{Cited authors small caps}{} |
| 912 |
\optdef{b}{lab,lab-bf}{Cited authors bold}{} |
| 913 |
\optdef{u}{lab,lab-def}{User defined citation font}{(\string\citenamefont)} |
| 914 |
\getans |
| 915 |
|
| 916 |
\mytempfalse |
| 917 |
\if\ans i\mytemptrue\fi |
| 918 |
\if\ans s\mytemptrue\fi |
| 919 |
\if\ans b\mytemptrue\fi |
| 920 |
\if\ans u\mytemptrue\fi |
| 921 |
\beginoptiongroup{FONT FOR `AND' IN CITATIONS |
| 922 |
(if non-default font for citation lables)} |
| 923 |
{\ifmytemp*\fi}% |
| 924 |
\optdef{*}{}{Cited `and' in author font}{} |
| 925 |
\optdef{r}{and-rm}{Cited `and' in normal font}{} |
| 926 |
\getans |
| 927 |
\endoptiongroup |
| 928 |
\beginoptiongroup{FONT OF EXTRA LABEL |
| 929 |
(The extra letter on the year)}{} |
| 930 |
\optdef{*}{}{Extra label plain}{} |
| 931 |
\optdef{i}{xlab-it}{Extra label italic}{} |
| 932 |
\getans |
| 933 |
\endoptiongroup |
| 934 |
\endoptiongroup |
| 935 |
% \end{macrocode} |
| 936 |
% |
| 937 |
% \subsection*{Label for missing author names} |
| 938 |
% |
| 939 |
% If the author and/or editor is missing, the standard \texttt{.bst} files |
| 940 |
% use the \texttt{key} field in place of the names for purposes of ordering the |
| 941 |
% entries. |
| 942 |
% |
| 943 |
% For author--year styles, the \texttt{key} field is even inserted in the |
| 944 |
% reference list and in the label in place of the authors. Optionally, one can |
| 945 |
% suppress the year in this case, which causes \texttt{natbib} (version~7) |
| 946 |
% to print only that key text as a code designation for the work. Thus if |
| 947 |
% \texttt{KEY = "CS1-345"} and there are no authors, then |\citep| produces |
| 948 |
% (CS1-345) and |\citet| simply CS1-345. That is, they behave like |
| 949 |
% |\citeauthor|. If \texttt{natbib} did not recognize the blank year, one would |
| 950 |
% get (CS1-345, ) and CS1-345 (). (Earlier versions of \texttt{natbib} crash on |
| 951 |
% a blank year.) |
| 952 |
% \begin{macrocode} |
| 953 |
\beginoptiongroup{LABEL WHEN AUTHORS MISSING |
| 954 |
(if author-year citations)} |
| 955 |
{\ifnumerical\else*\fi}% |
| 956 |
\optdef{*}{keyxyr}{Year blank when KEY replaces missing author}{(for natbib 7.0)} |
| 957 |
\optdef{y}{}{Year included when KEY replaces missing author}{} |
| 958 |
\getans |
| 959 |
\endoptiongroup |
| 960 |
% \end{macrocode} |
| 961 |
% |
| 962 |
% \subsection*{Missing date} |
| 963 |
% A missing date can be set to ???? or simply left blank. In the latter case, |
| 964 |
% \texttt{natbib} version~7 will print only the authors without any year |
| 965 |
% punctuation or brackets. |
| 966 |
% |
| 967 |
% \begin{macrocode} |
| 968 |
\beginoptiongroup{MISSING DATE |
| 969 |
(if author-year citations)} |
| 970 |
{\ifnumerical\else*\fi}% |
| 971 |
\optdef{*}{}{Missing date set to ????}{in label and text} |
| 972 |
\optdef{b}{blkyear}{Missing date left blank}{} |
| 973 |
\getans |
| 974 |
\endoptiongroup |
| 975 |
% \end{macrocode} |
| 976 |
% |
| 977 |
% \subsection*{Position of date} |
| 978 |
% This applies to author--year style only. It makes sense to put the date |
| 979 |
% immediately after the author list, since the two items (author and year) |
| 980 |
% are the identifiers of the reference. Default position is at the |
| 981 |
% end of the references, before any notes. It is also possible to place |
| 982 |
% it even after the notes. |
| 983 |
% |
| 984 |
% Medical journals have a system where the date is part of the journal |
| 985 |
% specification, as Lancet 1994;45(2):34--40. Otherwise the date appears at |
| 986 |
% the end. |
| 987 |
% \begin{macrocode} |
| 988 |
\beginoptiongroup{DATE POSITION:}{} |
| 989 |
\optdef{*}{}{Date at end}{} |
| 990 |
\optdef{b}{dt-beg}{Date after authors}{} |
| 991 |
\optdef{j}{dt-jnl}{Date part of journal spec.}{(as 1994;45:34-40) else at end} |
| 992 |
\optdef{e}{dt-end}{Date at very end}{after any notes} |
| 993 |
\getans |
| 994 |
\endoptiongroup |
| 995 |
\if\ans b\mytemptrue\else\if\ans j\mytemptrue\else\mytempfalse\fi\fi |
| 996 |
% \end{macrocode} |
| 997 |
% |
| 998 |
% \subsection*{Format of date} |
| 999 |
% The year may be enclosed in parentheses, brackets, or preceded by a |
| 1000 |
% colon. If none of these are selected, the date (month plus year) appears. |
| 1001 |
% For author--year, the date normally consists only of the year, no month, |
| 1002 |
% but this may be overridden. |
| 1003 |
% |
| 1004 |
% If the date comes just after the authors, then one might want special |
| 1005 |
% punctuation following it, like a colon, or space only. The latter is |
| 1006 |
% probably desirable if the date is brackets or parentheses. |
| 1007 |
% |
| 1008 |
% The date can even be put into bold face. |
| 1009 |
% \begin{macrocode} |
| 1010 |
\beginoptiongroup{DATE FORMAT |
| 1011 |
(if non author-year citations)} |
| 1012 |
{\ifnumerical*\fi}% |
| 1013 |
\optdef{*}{}{Plain month and year}{without any brackets} |
| 1014 |
\optdef{p}{yr-par}{Date in parentheses}{as (May 1993)} |
| 1015 |
\optdef{b}{yr-brk}{Date in brackets}{as [May 1993]} |
| 1016 |
\optdef{c}{yr-col}{Date preceded by colon}{as `: May 1993'} |
| 1017 |
\optdef{d}{yr-per}{Date preceded by period}{as `. May 1993'} |
| 1018 |
\optdef{m}{yr-com}{Date preceded by comma}{as `, May 1993'} |
| 1019 |
\optdef{s}{yr-blk}{Date preceded by space}{only, as ` May 1993'} |
| 1020 |
\getans |
| 1021 |
\beginoptiongroup{SUPPRESS MONTH:}{} |
| 1022 |
\optdef{*}{}{Date is month and year}{} |
| 1023 |
\optdef{x}{xmth}{Date is year only}{} |
| 1024 |
\getans |
| 1025 |
\endoptiongroup |
| 1026 |
\beginoptiongroup{REVERSED DATE |
| 1027 |
(if including month)} |
| 1028 |
{\if\ans x\else*\fi}% |
| 1029 |
\optdef{*}{}{Date as month year}{} |
| 1030 |
\optdef{r}{dtrev}{Date as year month}{} |
| 1031 |
\getans |
| 1032 |
\endoptiongroup |
| 1033 |
\endoptiongroup |
| 1034 |
|
| 1035 |
\beginoptiongroup{DATE FORMAT |
| 1036 |
(if author-year citations)} |
| 1037 |
{\ifnumerical\else*\fi}% |
| 1038 |
\optdef{*}{}{Year plain}{without any brackets} |
| 1039 |
\optdef{p}{yr-par}{Year in parentheses}{as (1993)} |
| 1040 |
\optdef{b}{yr-brk}{Year in brackets}{as [1993]} |
| 1041 |
\optdef{c}{yr-col}{Year preceded by colon}{as `: 1993'} |
| 1042 |
\optdef{d}{yr-per}{Year preceded by period}{as `. 1993'} |
| 1043 |
\optdef{m}{yr-com}{Date preceded by comma}{as `, 1993'} |
| 1044 |
\optdef{s}{yr-blk}{Year preceded by space}{only, as ` 1993'} |
| 1045 |
\getans |
| 1046 |
\beginoptiongroup{INCLUDE MONTHS:}{} |
| 1047 |
\optdef{*}{}{Date is year only}{without the month} |
| 1048 |
\optdef{m}{aymth}{Include month in date}{} |
| 1049 |
\getans |
| 1050 |
\endoptiongroup |
| 1051 |
\beginoptiongroup{REVERSED DATE |
| 1052 |
(if including month)} |
| 1053 |
{\if\ans m*\fi}% |
| 1054 |
\optdef{*}{}{Date as month year}{} |
| 1055 |
\optdef{r}{dtrev}{Date as year month}{} |
| 1056 |
\getans |
| 1057 |
\endoptiongroup |
| 1058 |
\endoptiongroup |
| 1059 |
|
| 1060 |
\beginoptiongroup{DATE PUNCTUATION |
| 1061 |
(if date not at end)} |
| 1062 |
{\ifmytemp*\fi}% |
| 1063 |
\optdef{*}{}{Date with standard block punctuation}{(comma or period)} |
| 1064 |
\optdef{c}{yrp-col}{Colon after date}{as 1994:} |
| 1065 |
\optdef{s}{yrp-semi}{Semi-colon after date}{as 1994;} |
| 1066 |
\optdef{p}{yrp-per}{Period after date}{even when blocks use commas} |
| 1067 |
\optdef{x}{yrp-x}{No punct. after date}{} |
| 1068 |
\getans |
| 1069 |
\beginoptiongroup{BLANK AFTER DATE:}{} |
| 1070 |
\optdef{*}{}{Space after date}{and punctuation} |
| 1071 |
\optdef{x}{yrpp-xsp}{No space after date}{as 1994:45} |
| 1072 |
\getans |
| 1073 |
\endoptiongroup |
| 1074 |
\endoptiongroup |
| 1075 |
\beginoptiongroup{DATE FONT:}{} |
| 1076 |
\optdef{*}{}{Date in normal font}{} |
| 1077 |
\optdef{b}{dtbf}{Date in bold face}{} |
| 1078 |
\getans |
| 1079 |
\endoptiongroup |
| 1080 |
% \end{macrocode} |
| 1081 |
% |
| 1082 |
% Normally in author--year citations, the \texttt{year} entry is truncated |
| 1083 |
% to the last 4 characters, which should be the 4 digits of the year. Some |
| 1084 |
% users have requested the possibility of suppressing this truncation so |
| 1085 |
% that they may put text in the \texttt{year} field, such as ``in press.'' |
| 1086 |
% Another use for it is when years are given as ``1968--72''. Actually, |
| 1087 |
% I have no idea why the year should be truncated at all. |
| 1088 |
% \begin{macrocode} |
| 1089 |
\beginoptiongroup{TRUNCATE YEAR |
| 1090 |
(if author-year citations)} |
| 1091 |
{\ifnumerical\else*\fi}% |
| 1092 |
\optdef{*}{note-yr}{Year text full}{as 1990--1993 or `in press'} |
| 1093 |
\optdef{t}{}{Year truncated}{to last 4 digits} |
| 1094 |
\getans |
| 1095 |
\endoptiongroup |
| 1096 |
% \end{macrocode} |
| 1097 |
% |
| 1098 |
% \subsection*{Article title in journal} |
| 1099 |
% The title of an article in a journal or in a collection (a book, or |
| 1100 |
% conference proceedings) may appear plain, in italics, within single |
| 1101 |
% or double quotes or even in guillemets. The last is best with T1 coding; a |
| 1102 |
% poor man's version for OT1 is provided; \LaTeXe\ is required in both cases. |
| 1103 |
% |
| 1104 |
% Furthermore, it may have sentence capitalization (first |
| 1105 |
% word and word following colon) or be capitalized as in the \texttt{.bib} file |
| 1106 |
% entry. That is why it is recommended to capitalize the entry text as it |
| 1107 |
% should appear when fully capitalized, putting words that are always |
| 1108 |
% capitalized in braces. Example: |
| 1109 |
% \begin{quote} |
| 1110 |
% |TITLE="The Results of the {Giotto} Mission"| |
| 1111 |
% \end{quote} |
| 1112 |
% which produces either ``The results of the Giotto mission'' or ``The |
| 1113 |
% Results of the Giotto Mission'', depending on option. |
| 1114 |
% |
| 1115 |
% Additionally, the article titles may be fully suppressed. |
| 1116 |
% \begin{macrocode} |
| 1117 |
\beginoptiongroup{TITLE OF ARTICLE:}{} |
| 1118 |
\optdef{*}{}{Title plain}{with no special font} |
| 1119 |
\optdef{i}{tit-it}{Title italic}{(\string\em)} |
| 1120 |
\optdef{q}{tit-qq,qt-s}{Title and punctuation in single quotes}{(`Title,' ..)} |
| 1121 |
\optdef{d}{tit-qq}{Title and punctuation in double quotes}{(``Title,'' ..)} |
| 1122 |
\optdef{g}{tit-qq,qt-g}{Title and punctuation in guillemets}{(<<Title,>> ..)} |
| 1123 |
\optdef{x}{tit-qq,qt-s,qx}{Title in single quotes}{(`Title', ..)} |
| 1124 |
\optdef{y}{tit-qq,qx}{Title in double quotes}{(``Title'', ..)} |
| 1125 |
\optdef{z}{tit-qq,qt-g,qx}{Title in guillemets}{(<<Title>>, ..)} |
| 1126 |
\getans |
| 1127 |
\endoptiongroup |
| 1128 |
\mytempfalse |
| 1129 |
\if\ans q\mytemptrue\fi |
| 1130 |
\if\ans d\mytemptrue\fi |
| 1131 |
\if\ans g\mytemptrue\fi |
| 1132 |
\if\ans x\mytemptrue\fi |
| 1133 |
\if\ans y\mytemptrue\fi |
| 1134 |
\if\ans z\mytemptrue\fi |
| 1135 |
\beginoptiongroup{COLLECTION/PROCEEDINGS TITLES |
| 1136 |
(if quoted title)} |
| 1137 |
{\ifmytemp*\fi}% |
| 1138 |
\optdef{*}{bt-qq}{Quote collection and proceedings titles}{too} |
| 1139 |
\optdef{x}{}{Collection and proceedings titles not in quotes}{} |
| 1140 |
\getans |
| 1141 |
\endoptiongroup |
| 1142 |
\beginoptiongroup{CAPITALIZATION OF ARTICLE TITLE:}{} |
| 1143 |
\optdef{*}{}{Sentence style}{(capitalize first word and those in braces)} |
| 1144 |
\optdef{t}{atit-u}{Title style}{(just as in bib entry)} |
| 1145 |
\getans |
| 1146 |
\endoptiongroup |
| 1147 |
|
| 1148 |
\beginoptiongroup{ARTICLE TITLE PRESENT:}{} |
| 1149 |
\optdef{*}{}{Article title present}{in journals and proceedings} |
| 1150 |
\optdef{x}{jtit-x}{No article title}{} |
| 1151 |
\getans |
| 1152 |
\endoptiongroup |
| 1153 |
% \end{macrocode} |
| 1154 |
% |
| 1155 |
% \subsection*{Journal names} |
| 1156 |
% Abbreviated journal names normally contain periods; the periods may be |
| 1157 |
% removed with this option. In fact, only letters, numbers, and spacing are |
| 1158 |
% retained. |
| 1159 |
% \begin{macrocode} |
| 1160 |
\beginoptiongroup{JOURNAL NAMES:}{} |
| 1161 |
\optdef{*}{}{Periods in journal names}{are retained, as `Phys. Rev.'} |
| 1162 |
\optdef{x}{jxper}{Dotless journal names}{as `Phys Rev'} |
| 1163 |
\getans |
| 1164 |
\endoptiongroup |
| 1165 |
% \end{macrocode} |
| 1166 |
% Journal name is normally printed in italics; can be left in normal font. |
| 1167 |
% \begin{macrocode} |
| 1168 |
\beginoptiongroup{JOURNAL NAME FONT:}{} |
| 1169 |
\optdef{*}{}{Journal name italics}{} |
| 1170 |
\optdef{r}{jttl-rm}{Journal name normal}{font} |
| 1171 |
\getans |
| 1172 |
\endoptiongroup |
| 1173 |
% \end{macrocode} |
| 1174 |
% |
| 1175 |
% \subsection*{Title of Theses and Technical Reports} |
| 1176 |
% The title of a these (PhD or Master's) is normally treated the same |
| 1177 |
% as that of a book. Optionally, it may be formatted like that of |
| 1178 |
% an article. |
| 1179 |
% |
| 1180 |
% The title of a technical report is normally treated the same as that |
| 1181 |
% of an article. Optionally, it may be formatted like that of a book. |
| 1182 |
% |
| 1183 |
% \begin{macrocode} |
| 1184 |
\beginoptiongroup{THESIS TITLE:}{} |
| 1185 |
\optdef{*}{}{Thesis titles like books}{} |
| 1186 |
\optdef{a}{thtit-a}{Thesis title like article}{} |
| 1187 |
\optdef{x}{thtit-x}{No thesis title}{} |
| 1188 |
\getans |
| 1189 |
\endoptiongroup |
| 1190 |
|
| 1191 |
\beginoptiongroup{TECHNICAL REPORT TITLE:}{} |
| 1192 |
\optdef{*}{}{Tech. report title like articles}{} |
| 1193 |
\optdef{b}{trtit-b}{Tech. report title like books}{} |
| 1194 |
\getans |
| 1195 |
\endoptiongroup |
| 1196 |
|
| 1197 |
\beginoptiongroup{TECHNICAL REPORT NUMBER:}{} |
| 1198 |
\optdef{*}{}{Tech. report and number plain}{as `Tech. Rep. 123'} |
| 1199 |
\optdef{i}{trnum-it}{Tech. report and number italic}% |
| 1200 |
{as `{\string\it\space Tech. Rep. 123'}} |
| 1201 |
\getans |
| 1202 |
\endoptiongroup |
| 1203 |
% \end{macrocode} |
| 1204 |
% |
| 1205 |
% \subsection*{Journal reference} |
| 1206 |
% Great diversity of opinion exists as to how a journal reference is to be |
| 1207 |
% formatted. It consists of a volume, possibly a number, and page limits. |
| 1208 |
% The number is really only necessary if the page numbers within one volume |
| 1209 |
% start at 1 for each physical `number'. Since journals are often bound |
| 1210 |
% together in one volume later, it makes more sense to number the pages |
| 1211 |
% continuously through the whole volume. |
| 1212 |
% |
| 1213 |
% I am only aware of one journal that used to reset the pagination for each |
| 1214 |
% `number', in which case the number was part of the page designation. |
| 1215 |
% I had erroneously provided an option \texttt{vnum-pg} to achieve this, but I |
| 1216 |
% now realize that instead, for this one journal, the database entries must |
| 1217 |
% contain \texttt{pages="(2)33--2(55)"}. This option has been removed at |
| 1218 |
% version 3.84. |
| 1219 |
% |
| 1220 |
% A number of styles for journal specifications are |
| 1221 |
% \begin{quote} |
| 1222 |
% \begin{tabular}{l@{\qquad}l} |
| 1223 |
% 21(2):33--55 & 21, no.\ 2: 33--55\\ |
| 1224 |
% \textbf{21}(2):33--55 & \textbf{21}, \#2, 33--55\\ |
| 1225 |
% \textit{21}(2), 33--55 & \textit{21} (2); 33--55 \\ |
| 1226 |
% 21(2) (1995) 33--55 & 21(1995), 33-55\\ |
| 1227 |
% 21(2) 33--55 & vol.~21 (2), pp.~33--55 |
| 1228 |
% \end{tabular} |
| 1229 |
% \end{quote} |
| 1230 |
% |
| 1231 |
% Here both start and stop page numbers have been given; often only the |
| 1232 |
% start page is wanted. |
| 1233 |
% |
| 1234 |
% It is also possible to include the year as part of the journal specification, |
| 1235 |
% in which case the year is always in parentheses, attached snugly or with space |
| 1236 |
% to the volume, or preceding the pages. |
| 1237 |
% |
| 1238 |
% \begin{macrocode} |
| 1239 |
\beginoptiongroup{JOURNAL VOLUME:}{} |
| 1240 |
\optdef{*}{}{Volume plain}{as vol(num)} |
| 1241 |
\optdef{i}{vol-it}{Volume italic}{as {\string\em\space vol}(num)} |
| 1242 |
\optdef{b}{vol-bf}{Volume bold}{as {\string\bf\space vol}(num)} |
| 1243 |
\optdef{d}{vol-2bf}{Volume and number bold}{as {\string\bf\space vol(num)}} |
| 1244 |
\getans |
| 1245 |
\endoptiongroup |
| 1246 |
% \end{macrocode} |
| 1247 |
% |
| 1248 |
% The form of the `number' is also given: in parentheses, with `no.', |
| 1249 |
% with \#, or omitted. The \texttt{vnum-b} option is meant to be used |
| 1250 |
% with \texttt{jdt-v} and \texttt{jdt-vs} but could be used alone. |
| 1251 |
% \begin{macrocode} |
| 1252 |
\beginoptiongroup{JOURNAL VOL AND NUMBER:}{} |
| 1253 |
\optdef{*}{}{Journal vol(num)}{as 34(2)} |
| 1254 |
\optdef{s}{vnum-sp}{Journal vol (num)}{as 34 (2)} |
| 1255 |
\optdef{c}{vnum-cm}{Journal vol, num}{as 34, 2} |
| 1256 |
\optdef{n}{vnum-nr}{Journal vol, no. num}{as 34, no. 2} |
| 1257 |
\optdef{h}{vnum-h}{Journal vol, \string\# number}{as 34, \string\#2} |
| 1258 |
\optdef{b}{vnum-b}{Journal vol number}{as 34 2} |
| 1259 |
\optdef{x}{vnum-x}{Journal vol, without number}{as 34} |
| 1260 |
\getans |
| 1261 |
\endoptiongroup |
| 1262 |
|
| 1263 |
\beginoptiongroup{VOLUME PUNCTUATION:}{} |
| 1264 |
\optdef{*}{}{Volume with colon}{as vol(num):ppp} |
| 1265 |
\optdef{s}{volp-sp}{Volume with colon and space}{as vol(num): ppp} |
| 1266 |
\optdef{h}{volp-semi}{Volume with semi-colon}{as vol(num); ppp} |
| 1267 |
\optdef{c}{volp-com}{Volume with comma}{as vol(num), ppp} |
| 1268 |
\optdef{b}{volp-blk}{Volume with blank}{as vol(num) ppp} |
| 1269 |
\getans |
| 1270 |
\endoptiongroup |
| 1271 |
|
| 1272 |
\beginoptiongroup{YEAR IN JOURNAL SPECIFICATION:}{} |
| 1273 |
\optdef{*}{}{Journal year like others}{as given by date position} |
| 1274 |
\optdef{v}{jdt-v}{Journal vol(year)}{as 34(1995)} |
| 1275 |
\optdef{s}{jdt-vs}{Journal vol (year)}{as 34 (1995)} |
| 1276 |
\optdef{p}{jdt-p}{Year with pages}{as 34(2), (1995) 1345--1387} |
| 1277 |
\optdef{c}{jdt-pc}{Year, comma, pages}{as 34(2), (1995), 1345--1387} |
| 1278 |
\getans |
| 1279 |
\endoptiongroup |
| 1280 |
|
| 1281 |
\beginoptiongroup{PAGE NUMBERS:}{} |
| 1282 |
\optdef{*}{}{Start and stop page numbers}{given} |
| 1283 |
\optdef{f}{jpg-1}{Only start page number}{} |
| 1284 |
\getans |
| 1285 |
\endoptiongroup |
| 1286 |
|
| 1287 |
\beginoptiongroup{LARGE PAGE NUMBERS:}{} |
| 1288 |
\optdef{*}{}{No separators for large page numbers}{} |
| 1289 |
\optdef{c}{pgsep-c}{Comma inserted over 9999}{as 11,234} |
| 1290 |
\optdef{s}{pgsep-s}{Thin space inserted over 9999}{as 11 234} |
| 1291 |
\optdef{p}{pgsep-p}{Period inserted over 9999}{as 11.234} |
| 1292 |
\getans |
| 1293 |
\endoptiongroup |
| 1294 |
|
| 1295 |
\beginoptiongroup{WORD `PAGE' IN ARTICLES:}{} |
| 1296 |
\optdef{*}{}{Article pages numbers only}{as 234-256} |
| 1297 |
\optdef{p}{jwdpg}{Include `page' in articles}{as pp. 234--256} |
| 1298 |
\getans |
| 1299 |
\endoptiongroup |
| 1300 |
% \end{macrocode} |
| 1301 |
% |
| 1302 |
% Some journals want page numbers at the end, even for books, proceedings, as |
| 1303 |
% well as for journals. |
| 1304 |
% \begin{macrocode} |
| 1305 |
\beginoptiongroup{POSITION OF PAGES:}{} |
| 1306 |
\optdef{*}{}{Pages given mid text}{as is normal} |
| 1307 |
\optdef{e}{pp-last}{Pages at end}{but before any notes} |
| 1308 |
\getans |
| 1309 |
\endoptiongroup |
| 1310 |
|
| 1311 |
\beginoptiongroup{WORD `VOLUME' IN ARTICLES:}{} |
| 1312 |
\optdef{*}{}{Article volume as number only}{as 21} |
| 1313 |
\optdef{p}{jwdvol}{Include `volume' in articles}{as vol. 21} |
| 1314 |
\getans |
| 1315 |
\endoptiongroup |
| 1316 |
% \end{macrocode} |
| 1317 |
% |
| 1318 |
% Fiddle with the format and location of the number/series for collections and |
| 1319 |
% inproceedings. |
| 1320 |
% \begin{macrocode} |
| 1321 |
\beginoptiongroup{NUMBER AND SERIES FOR COLLECTIONS:}{} |
| 1322 |
\optdef{*}{num-xser}{Allows number without series}{and suppresses word "number"} |
| 1323 |
\optdef{s}{}{Standard BibTeX}{as: "number 123 in Total Works"; error if number and no series} |
| 1324 |
\getans |
| 1325 |
\endoptiongroup |
| 1326 |
|
| 1327 |
\beginoptiongroup{POSITION OF NUMBER AND SERIES:}{} |
| 1328 |
\optdef{*}{}{After chapter and pages}{as in standard BibTeX} |
| 1329 |
\optdef{t}{numser}{Just before publisher}{or organization} |
| 1330 |
\getans |
| 1331 |
\endoptiongroup |
| 1332 |
% \end{macrocode} |
| 1333 |
% |
| 1334 |
% Fiddle with the format and location of series and volume with books and collections. |
| 1335 |
% \begin{macrocode} |
| 1336 |
\beginoptiongroup{VOLUME AND SERIES FOR BOOKS/COLLECTIONS:}{} |
| 1337 |
\optdef{*}{}{Vol. 23 of Series}{as in standard BibTeX} |
| 1338 |
\optdef{s}{ser-vol}{Series, vol. 23}{} |
| 1339 |
\getans |
| 1340 |
\endoptiongroup |
| 1341 |
|
| 1342 |
\beginoptiongroup{POSITION OF VOLUME AND SERIES FOR INCOLLECTIONS:}{} |
| 1343 |
\optdef{*}{}{Series and volume after the editors}{} |
| 1344 |
\optdef{e}{ser-ed}{Series and volume after booktitle}{and before editors} |
| 1345 |
\getans |
| 1346 |
\endoptiongroup |
| 1347 |
% \end{macrocode} |
| 1348 |
% |
| 1349 |
% It is possible to decide whether the journal name should be |
| 1350 |
% separated from the following specifications with a blank or comma. |
| 1351 |
% \begin{macrocode} |
| 1352 |
\beginoptiongroup{JOURNAL NAME PUNCTUATION:}{} |
| 1353 |
\optdef{*}{}{Comma after journal}{name} |
| 1354 |
\optdef{x}{jnm-x}{Space after journal}{name} |
| 1355 |
\getans |
| 1356 |
\endoptiongroup |
| 1357 |
% \end{macrocode} |
| 1358 |
% |
| 1359 |
% \subsection*{Books} |
| 1360 |
% The title of a book (as opposed to an article in a book or journal) is |
| 1361 |
% normally italicized. This may be set to the regular font. |
| 1362 |
% |
| 1363 |
% The page numbers in books may be set in parentheses, as (pp.\ 345--350). |
| 1364 |
% \begin{macrocode} |
| 1365 |
\beginoptiongroup{BOOK TITLE:}{} |
| 1366 |
\optdef{*}{}{Book title italic}{(\string\em)} |
| 1367 |
\optdef{p}{btit-rm,bt-rm}{Book title plain}{(no font command)} |
| 1368 |
\getans |
| 1369 |
\endoptiongroup |
| 1370 |
|
| 1371 |
\beginoptiongroup{PAGES IN BOOKS:}{} |
| 1372 |
\optdef{*}{}{Pages in book plain}{as pp. 50-55} |
| 1373 |
\optdef{p}{bkpg-par}{Pages in book in parentheses}{as (pp. 50-55)} |
| 1374 |
\optdef{x}{bkpg-x}{Pages in book bare}{as 50-55} |
| 1375 |
\getans |
| 1376 |
\endoptiongroup |
| 1377 |
\beginoptiongroup{TOTAL PAGES OF A BOOK:}{} |
| 1378 |
\optdef{*}{}{Total book pages not printed}{} |
| 1379 |
\optdef{p}{pg-bk}{For book: 345 pages}{or pp.} |
| 1380 |
\optdef{a}{pg-bk,pg-pre}{Total book pages before publisher}{} |
| 1381 |
\getans |
| 1382 |
\endoptiongroup |
| 1383 |
% \end{macrocode} |
| 1384 |
% Some psychology journals wish to have the publisher's address preceding |
| 1385 |
% the name, separated by colon, as |
| 1386 |
% \begin{quote}New York: Wiley and Sons\end{quote} |
| 1387 |
% |
| 1388 |
% Some journals (e.g.\ Nature) put publisher in parentheses with date, |
| 1389 |
% as (Wiley and Sons, New York, 1983). These normally put the date in |
| 1390 |
% parentheses at the end anyway, so this is a merging of the two sets of |
| 1391 |
% parentheses. |
| 1392 |
% \begin{macrocode} |
| 1393 |
\beginoptiongroup{PUBLISHER ADDRESS:}{} |
| 1394 |
\optdef{*}{}{Publisher, address}{as Harcourt, New York} |
| 1395 |
\optdef{a}{add-pub}{Address: Publisher}{as New York: Harcourt} |
| 1396 |
\getans |
| 1397 |
\endoptiongroup |
| 1398 |
|
| 1399 |
\beginoptiongroup{PUBLISHER IN PARENTHESES:}{} |
| 1400 |
\optdef{*}{}{Publisher as normal block}{without parentheses} |
| 1401 |
\optdef{p}{pub-par}{Publisher in parentheses}{} |
| 1402 |
\optdef{d}{pub-date}{Publisher and date in parentheses}{(Oxford, 1994)} |
| 1403 |
\optdef{c}{pub-date,pub-xc}{Publisher and date in parentheses, no comma}{(Oxford 1994)} |
| 1404 |
\optdef{f}{pub-date,pub-xpar}{Publisher and date without parentheses}{Oxford, 1994} |
| 1405 |
\optdef{k}{pub-date,pub-xpar,pub-xc}{Publisher and date, no parentheses, no comma}{Oxford 1994} |
| 1406 |
\getans |
| 1407 |
\endoptiongroup |
| 1408 |
|
| 1409 |
\beginoptiongroup{PUBLISHER POSITION:}{} |
| 1410 |
\optdef{*}{}{Publisher after chapter, pages}{} |
| 1411 |
\optdef{p}{pre-pub}{Publisher before chapter, pages}{} |
| 1412 |
\optdef{e}{pre-edn}{Publisher after edition}{} |
| 1413 |
\getans |
| 1414 |
\endoptiongroup |
| 1415 |
% \end{macrocode} |
| 1416 |
% |
| 1417 |
% \subsection*{ISBN, ISSN, DOI numbers} |
| 1418 |
% Books normally possess an ISBN number. This may be included as an |
| 1419 |
% optional entry for \texttt{book}, \texttt{inbook}, \texttt{booklet}, |
| 1420 |
% \texttt{incollection}, \texttt{proceedings}, \texttt{inproceedings}. |
| 1421 |
% However, it should be suppressed for \texttt{inbook} etc.\ when |
| 1422 |
% there is a crossref to another book with the ISBN number. |
| 1423 |
% |
| 1424 |
% Periodicals contain an ISSN number. Add this to \texttt{article}, or |
| 1425 |
% course, but also to \texttt{inproceedings} and \texttt{proceedings}, since |
| 1426 |
% they are sometimes printed in a periodical. |
| 1427 |
% |
| 1428 |
% Journal articles that appear online are given a DOI number, something more |
| 1429 |
% robust than a URL that can change as machines are upgraded. |
| 1430 |
% The American Geophysical Union (AGU) uses the DOI as part of the |
| 1431 |
% page number substitution for electronic journals, placing the number |
| 1432 |
% where the pages would normally appear. |
| 1433 |
% \begin{macrocode} |
| 1434 |
\beginoptiongroup{ISBN NUMBER:}{} |
| 1435 |
\optdef{*}{isbn}{Include ISBN}{for books, booklets, etc.} |
| 1436 |
\optdef{x}{}{No ISBN}{} |
| 1437 |
\getans |
| 1438 |
\endoptiongroup |
| 1439 |
|
| 1440 |
\beginoptiongroup{ISSN NUMBER:}{} |
| 1441 |
\optdef{*}{issn}{Include ISSN}{for periodicals} |
| 1442 |
\optdef{x}{}{No ISSN}{} |
| 1443 |
\getans |
| 1444 |
\endoptiongroup |
| 1445 |
|
| 1446 |
\beginoptiongroup{DOI NUMBER:}{} |
| 1447 |
\optdef{*}{doi}{Include DOI}{as "doi: number"} |
| 1448 |
\optdef{u}{url-doi}{Format DOI as URL //doi.org/doi}{(must give url options!)} |
| 1449 |
\optdef{a}{agu-doi,doi}{Insert DOI AGU style}{as part of page number} |
| 1450 |
\optdef{x}{}{No DOI}{} |
| 1451 |
\getans |
| 1452 |
\endoptiongroup |
| 1453 |
% \end{macrocode} |
| 1454 |
% |
| 1455 |
% \subsection*{Editor of book without author} |
| 1456 |
% |
| 1457 |
% This is normally |
| 1458 |
% \begin{quote} |
| 1459 |
% J. K. James, editor |
| 1460 |
% \end{quote} |
| 1461 |
% but may also be |
| 1462 |
% \begin{quote} |
| 1463 |
% J. K. James, (editor)\\ |
| 1464 |
% J. K. James (editor), |
| 1465 |
% \end{quote} |
| 1466 |
% Alternatively, the word \textsl{editor} may be capitalized and/or |
| 1467 |
% abbreviated. |
| 1468 |
% |
| 1469 |
% \begin{macrocode} |
| 1470 |
\beginoptiongroup{`EDITOR' AFTER NAMES (EDITED BOOKS WITHOUT AUTHORS):}{} |
| 1471 |
\optdef{*}{}{Word `editor' after name}{} |
| 1472 |
\optdef{a}{edpar}{`Name (editor),'}{in parentheses, after name, comma after} |
| 1473 |
\optdef{b}{edpar,bkedcap}{`Name (Editor),'}{as above, editor upper case} |
| 1474 |
\optdef{c}{edparc}{`Name, (editor)'}{in parentheses, after name, comma between} |
| 1475 |
\optdef{d}{edparc,bkedcap}{`Name, (Editor)'}{as above, editor upper case} |
| 1476 |
\optdef{e}{edparxc}{`Name (editor)'}{in parentheses, after name, no commas} |
| 1477 |
\optdef{f}{edparxc,bkedcap}{`Name (Editor)'}{as above, editor upper case} |
| 1478 |
\getans |
| 1479 |
\endoptiongroup |
| 1480 |
% \end{macrocode} |
| 1481 |
% |
| 1482 |
% \subsection*{Edited by} |
| 1483 |
% For an article within an edited collection, the normal form is |
| 1484 |
% \begin{quote} |
| 1485 |
% In J. K. James, editor, \emph{Title of Collection} \dots |
| 1486 |
% \end{quote} |
| 1487 |
% Alternative forms are |
| 1488 |
% \begin{quote} |
| 1489 |
% In J. K. James (editor), \emph{Title} \dots\\ |
| 1490 |
% In \emph{Title}, edited by J. K. James \dots\\ |
| 1491 |
% In \emph{Title} (Edited by J. K. James) \dots |
| 1492 |
% \end{quote} |
| 1493 |
% If none of the \texttt{edby} variations is used, then the same system is |
| 1494 |
% used as for edited books, i.e. \texttt{edpar} applies. |
| 1495 |
% \begin{macrocode} |
| 1496 |
\beginoptiongroup{EDITOR IN COLLECTIONS:}{} |
| 1497 |
\optdef{*}{}{Same as for edited book}{(names before booktitle)} |
| 1498 |
\optdef{b}{edby}{In booktitle, edited by .. }{(where .. is names)} |
| 1499 |
\optdef{p}{edby-par}{In booktitle (edited by ..)}{} |
| 1500 |
\optdef{c}{edby-parc}{In booktitle, (edited by ..)}{} |
| 1501 |
\optdef{e}{edby,edbyx}{In booktitle, editor ..}{} |
| 1502 |
\optdef{f}{edby,edbyw}{In booktitle, (editor) ..}{} |
| 1503 |
\optdef{k}{edby-par,edbyx}{In booktitle (editor..)}{} |
| 1504 |
\optdef{g}{edby-parc,edbyx}{In booktitle, (editor..)}{} |
| 1505 |
\optdef{j}{edby,edbyy}{In booktitle, .., editor}{} |
| 1506 |
\optdef{m}{edby-par,edbyy}{In booktitle (.., editor)}{} |
| 1507 |
\getans |
| 1508 |
\endoptiongroup |
| 1509 |
\mytempfalse |
| 1510 |
\if\ans p\mytemptrue\fi |
| 1511 |
\if\ans k\mytemptrue\fi |
| 1512 |
\if\ans c\mytemptrue\fi |
| 1513 |
\if\ans f\mytemptrue\fi |
| 1514 |
\beginoptiongroup{CAPITALIZE `EDITOR' OR `EDITED BY' |
| 1515 |
(if editor capitalizable)} |
| 1516 |
{\ifmytemp*\fi}% |
| 1517 |
\optdef{*}{}{`(editor,..)' or `(edited by..)'}{in lower case} |
| 1518 |
\optdef{c}{edcap}{`(Editor,..)' or `(Edited by..)'}{in upper case} |
| 1519 |
\getans |
| 1520 |
\endoptiongroup |
| 1521 |
% \end{macrocode} |
| 1522 |
% |
| 1523 |
% \subsection*{Block punctuation} |
| 1524 |
% Blocks are logical sections of the reference specification, such as the |
| 1525 |
% author block, the journal block, editor block, etc. These are normally |
| 1526 |
% separated by periods, but alternatively a comma may be used. Another |
| 1527 |
% choice is to use commas except after titles where a period is given. |
| 1528 |
% |
| 1529 |
% \LaTeX\ offers an \texttt{openbib} option, which means that the blocks |
| 1530 |
% are not only new sentences, but new lines as well. This can only |
| 1531 |
% function when the default option here is taken, for then the command |
| 1532 |
% |\newblock| is placed between the blocks. This command is normally |
| 1533 |
% defined to do nothing, but \LaTeX\ redefines it to issue a new line |
| 1534 |
% when open bibliographies are wanted. |
| 1535 |
% \begin{macrocode} |
| 1536 |
\beginoptiongroup{PUNCTUATION BETWEEN SECTIONS (BLOCKS):}{} |
| 1537 |
\optdef{*}{}{\string\newblock\space after blocks} |
| 1538 |
{(periods or new lines with openbib option)} |
| 1539 |
\optdef{c}{blk-com}{Comma between blocks}{} |
| 1540 |
\optdef{s}{blk-com,com-semi}{Semi-colon between blocks}{} |
| 1541 |
\optdef{b}{blk-com,com-blank}{Blanks between blocks}{} |
| 1542 |
\optdef{t}{blk-tit}{Period after titles of articles, books, etc}{else commas} |
| 1543 |
\optdef{u}{blk-tit,tit-col}{Colon after titles of articles, books, etc}{else commas} |
| 1544 |
\optdef{a}{blk-tita}{Period after titles of articles}{else commas} |
| 1545 |
\optdef{d}{blk-tita,tit-col}{Colon after titles of articles}{else commas} |
| 1546 |
\getans |
| 1547 |
\endoptiongroup |
| 1548 |
\mytempfalse |
| 1549 |
\if\ans c\mytemptrue\fi |
| 1550 |
\if\ans s\mytemptrue\fi |
| 1551 |
\if\ans b\mytemptrue\fi |
| 1552 |
\if\ans t\mytemptrue\fi |
| 1553 |
\if\ans a\mytemptrue\fi |
| 1554 |
\beginoptiongroup{PUNCTUATION BEFORE NOTES |
| 1555 |
(if not using \string\newblock)} |
| 1556 |
{\ifmytemp*\fi}% |
| 1557 |
\optdef{*}{}{Notes have regular punctuation}{like all other blocks} |
| 1558 |
\optdef{p}{blknt}{Notes preceded by period}{} |
| 1559 |
\getans |
| 1560 |
\endoptiongroup |
| 1561 |
\beginoptiongroup{PUNCTUATION AFTER AUTHORS:}{} |
| 1562 |
\optdef{*}{}{Author block normal}{with regular block punctuation} |
| 1563 |
\optdef{c}{au-col}{Author block with colon}{} |
| 1564 |
\getans |
| 1565 |
\endoptiongroup |
| 1566 |
% \end{macrocode} |
| 1567 |
% |
| 1568 |
% \subsection*{\textsl{In} with colon} |
| 1569 |
% When referring to works in a collection, one begins the block describing |
| 1570 |
% that collection with \textsl{In}. Optionally, one may add a colon. |
| 1571 |
% \begin{macrocode} |
| 1572 |
\beginoptiongroup{PUNCTUATION AFTER `IN':}{} |
| 1573 |
\optdef{*}{}{Space after `in'}{for incollection or inproceedings} |
| 1574 |
\optdef{c}{in-col}{Colon after `in'}{(as `In: ...')} |
| 1575 |
\optdef{i}{in-it}{Italic `in'}{and space} |
| 1576 |
\optdef{d}{in-col,in-it}{Italic `in' and colon}{} |
| 1577 |
\optdef{x}{in-x}{No word `in'}{for edited works} |
| 1578 |
\getans |
| 1579 |
\endoptiongroup |
| 1580 |
\beginoptiongroup{`IN' WITH JOURNAL NAMES |
| 1581 |
(if using 'in' with collections)} |
| 1582 |
{\if\ans x\else*\fi} |
| 1583 |
\optdef{*}{}{No `in' before journal name}{} |
| 1584 |
\optdef{i}{injnl}{Add `in' before journal name}{in style for incollection} |
| 1585 |
\getans |
| 1586 |
\endoptiongroup |
| 1587 |
% \end{macrocode} |
| 1588 |
% |
| 1589 |
% \subsection*{Final punctuation} |
| 1590 |
% The punctuation at the end of the reference is normally a period. This |
| 1591 |
% may be suppressed. |
| 1592 |
% \begin{macrocode} |
| 1593 |
\beginoptiongroup{FINAL PUNCTUATION:}{} |
| 1594 |
\optdef{*}{}{Period at very end}{of the listed reference} |
| 1595 |
\optdef{x}{fin-bare}{No period at end}{} |
| 1596 |
\getans |
| 1597 |
\endoptiongroup |
| 1598 |
% \end{macrocode} |
| 1599 |
% |
| 1600 |
% \subsection*{Abbreviations} |
| 1601 |
% A number of words may be abbreviated: pages, editors, volume, chapter, |
| 1602 |
% and so on. The first two may be independently set to abbreviation, the |
| 1603 |
% rest with a single option. |
| 1604 |
% |
| 1605 |
% Additionally, the edition numbers may be |
| 1606 |
% output as words (first, second, etc.) or as numbers (1st, 2nd, etc.). |
| 1607 |
% (Recall that the input in the \texttt{.bib} file is always as English |
| 1608 |
% words.) |
| 1609 |
% \begin{macrocode} |
| 1610 |
\beginoptiongroup{ABBREVIATE WORD `PAGES' |
| 1611 |
(if not using external language file)} |
| 1612 |
{\if!\cfile!\relax*\fi}% |
| 1613 |
\optdef{*}{}{`Page(s)'}{(no abbreviation)} |
| 1614 |
\optdef{a}{pp}{`Page' abbreviated}{as p. or pp.} |
| 1615 |
\optdef{x}{ppx}{`Page' omitted}{} |
| 1616 |
\getans |
| 1617 |
\beginoptiongroup{ABBREVIATE WORD `EDITORS':}{} |
| 1618 |
\optdef{*}{}{`Editor(s)'}{(no abbreviation)} |
| 1619 |
\optdef{a}{ed}{`Editor' abbreviated}{as ed. or eds.} |
| 1620 |
\getans |
| 1621 |
\endoptiongroup |
| 1622 |
|
| 1623 |
\beginoptiongroup{OTHER ABBREVIATIONS:}{} |
| 1624 |
\optdef{*}{}{No abbreviations}{of volume, edition, chapter, etc} |
| 1625 |
\optdef{a}{abr}{Abbreviations}{of such words} |
| 1626 |
\getans |
| 1627 |
\endoptiongroup |
| 1628 |
\beginoptiongroup{ABBREVIATION FOR `EDITION' |
| 1629 |
(if abbreviating words)} |
| 1630 |
{\if\ans a*\fi}% |
| 1631 |
\optdef{*}{}{`Edition' abbreviated as `edn'}{} |
| 1632 |
\optdef{a}{ednx}{`Edition' abbreviated as `ed'}{} |
| 1633 |
\getans |
| 1634 |
\beginoptiongroup{MONTHS WITH DOTS:}{} |
| 1635 |
\optdef{*}{}{Months with dots}{as Jan.} |
| 1636 |
\optdef{x}{mth-bare}{Months without dots}{as Feb Mar} |
| 1637 |
\getans |
| 1638 |
\endoptiongroup |
| 1639 |
\endoptiongroup |
| 1640 |
\beginoptiongroup{EDITION NUMBERS:}{} |
| 1641 |
\optdef{*}{xedn}{Editions as in database}{saving much processing memory} |
| 1642 |
\optdef{w}{}{Write out editions}{as first, second, third, etc} |
| 1643 |
\optdef{n}{ord}{Numerical editions}{as 1st, 2nd, 3rd, etc} |
| 1644 |
\getans |
| 1645 |
\endoptiongroup |
| 1646 |
\endoptiongroup |
| 1647 |
% \end{macrocode} |
| 1648 |
% |
| 1649 |
% The above choices about abbreviations are made only if the internal |
| 1650 |
% languages are taken (English or \texttt{babel}). For an external language |
| 1651 |
% definition file, these choices, along with possible other ones, are made |
| 1652 |
% in the external file, which is read in at this point. |
| 1653 |
% \begin{macrocode} |
| 1654 |
\umes{Reading external language file \string\cfile=\cfile}% |
| 1655 |
\if!\cfile!\relax\else |
| 1656 |
\input\cfile |
| 1657 |
\fi |
| 1658 |
% \end{macrocode} |
| 1659 |
% |
| 1660 |
% This file contains the standard set of stored journal names present in |
| 1661 |
% the basic bibliography style files. If other files containing journal |
| 1662 |
% names are to be included, they may only contain the options \texttt{jabr} |
| 1663 |
% or \texttt{jaa} since these options are selected here. No option |
| 1664 |
% menus from the journal-name files will be read in. |
| 1665 |
% \begin{macrocode} |
| 1666 |
\beginoptiongroup{STORED JOURNAL NAMES:}{} |
| 1667 |
\optdef{*}{}{Full journal names}{for prestored journals} |
| 1668 |
\optdef{a}{jabr}{Abbreviated journal names}{} |
| 1669 |
\optdef{s}{jabr,jaa}{Abbreviated with astronomy shorthands}{like ApJ and AJ} |
| 1670 |
\getans |
| 1671 |
\endoptiongroup |
| 1672 |
% \end{macrocode} |
| 1673 |
% |
| 1674 |
% \subsection*{Variations on \textsl{and}} |
| 1675 |
% It is possible to replace the word \textsl{and} with an ampersand \&, and to |
| 1676 |
% specify whether a comma is to precede \textsl{and} in a list of more than two |
| 1677 |
% names. |
| 1678 |
% |
| 1679 |
% A variable \textsl{and} may be provided for with the command |\BIBand| |
| 1680 |
% in place of the word. In this case, the command must be defined in the |
| 1681 |
% document file or some other package called. (This is intended for situations |
| 1682 |
% where an ampersand is wanted in parenthetical citations, but the word in |
| 1683 |
% textual ones.) |
| 1684 |
% |
| 1685 |
% \begin{macrocode} |
| 1686 |
\beginoptiongroup{AMPERSAND:}{} |
| 1687 |
\optdef{*}{}{Use word `and'}{in author lists} |
| 1688 |
\optdef{a}{amper}{Use ampersand}{in place of `and'} |
| 1689 |
\optdef{v}{varand}{Use \string\BIBand}{in place of `and'} |
| 1690 |
\getans |
| 1691 |
\endoptiongroup |
| 1692 |
|
| 1693 |
\beginoptiongroup{COMMA BEFORE `AND':}{} |
| 1694 |
\optdef{*}{}{Comma before `and'}{as `Tom, Dick, and Harry'} |
| 1695 |
\optdef{n}{and-xcom}{No comma before `and'}{as `Tom, Dick and Harry'} |
| 1696 |
\optdef{c}{and-com}{Comma even with 2 authors}{as `Tom, and Harry'} |
| 1697 |
\getans |
| 1698 |
\endoptiongroup |
| 1699 |
\beginoptiongroup{COMMA BEFORE `AND' EVEN FOR COLLECTION EDITORS |
| 1700 |
(if using comma before `and' with authors)} |
| 1701 |
{\if\ans c*\fi}% |
| 1702 |
\optdef{*}{and-com-ed}{Comma with 2 editors}{in collections} |
| 1703 |
\optdef{x}{}{Two editors without comma}{as `Tom and Harry'} |
| 1704 |
\getans |
| 1705 |
\endoptiongroup |
| 1706 |
\beginoptiongroup{NO `AND' IN REFERENCE LIST:}{} |
| 1707 |
\optdef{*}{}{With `and'}{before last author in reference list} |
| 1708 |
\optdef{x}{xand}{No `and'}{as `Tom, Dick, Harry'} |
| 1709 |
\getans |
| 1710 |
\endoptiongroup |
| 1711 |
|
| 1712 |
\beginoptiongroup{COMMA BEFORE `ET AL':}{} |
| 1713 |
\optdef{*}{}{Comma before `et al'}{in reference list} |
| 1714 |
\optdef{x}{etal-xc}{No comma before `et al'}{} |
| 1715 |
\getans |
| 1716 |
\endoptiongroup |
| 1717 |
% \end{macrocode} |
| 1718 |
% |
| 1719 |
% \subsection*{Font of \textsl{et al}} |
| 1720 |
% One can chose that \textsl{et~al.}\ be put into italics. |
| 1721 |
% Or, if the authors are in a different font from the regular one, the |
| 1722 |
% \textsl{et~al.}\ can still be Roman. |
| 1723 |
% \begin{macrocode} |
| 1724 |
\beginoptiongroup{FONT OF `ET AL':}{} |
| 1725 |
\optdef{*}{}{Plain et al}{} |
| 1726 |
\optdef{i}{etal-it}{Italic et al}{} |
| 1727 |
\optdef{r}{etal-rm}{Roman et al}{even when authors something else} |
| 1728 |
\getans |
| 1729 |
\endoptiongroup |
| 1730 |
% \end{macrocode} |
| 1731 |
% |
| 1732 |
% \subsection*{Additional Data Fields}\label{sec:revtex} |
| 1733 |
% The American Physical Society's REV\TeX\ package contains \btx\ support |
| 1734 |
% with a \texttt{bst} file generated from a variant of |
| 1735 |
% \texttt{\filename}. The extra fields are also available here. |
| 1736 |
% \begin{itemize} |
| 1737 |
% \item \textbf{collaboration}: A collaboration name associated with a |
| 1738 |
% reference. |
| 1739 |
% \item \textbf{eprint}: The e-print citation for the reference (Los Alamos |
| 1740 |
% or otherwise). E-print numbers can be turned into hyperlinks to the |
| 1741 |
% online article. The output is\\ |
| 1742 |
% \hspace*{2em}|\eprint{|\textit{eprint-spec}|}| |
| 1743 |
% \item \textbf{archive}: is an optional argument for |\eprint|, as\\ |
| 1744 |
% \hspace*{2em}|\eprint[|\textit{archive-des}|]{|\textit{eprint-spec}|}|\\ |
| 1745 |
% The \textit{archive-des} is some code such as \texttt{arXiv} that is |
| 1746 |
% translated to a base URL by a class or package file. The default definition |
| 1747 |
% of |\eprint| ignores \textit{archive-des} and prints \textit{eprint-spec} |
| 1748 |
% as a URL. |
| 1749 |
% \item \textbf{url}: A URL associated with the reference. Can be turned |
| 1750 |
% into a hyperlink. |
| 1751 |
% \end{itemize} |
| 1752 |
% |
| 1753 |
% A collaboration appears as part of the author list and the other two |
| 1754 |
% appear at the end of the citaton. The URL field can be selected |
| 1755 |
% independently of this option. |
| 1756 |
% |
| 1757 |
% In addition there are new fields for journals like Phys.\ Rev.~D that |
| 1758 |
% no longer use page numbers. |
| 1759 |
% \begin{itemize} |
| 1760 |
% \item \textbf{eid}: Electronic article identifier. |
| 1761 |
% \item \textbf{numpages}: Number of pages in an article. For use in |
| 1762 |
% conjunction with the \textbf{eid} field when page counts are |
| 1763 |
% desired. Deprecated when submitting to Phys.\ Rev. |
| 1764 |
% |
| 1765 |
% The \texttt{eprint} (with \texttt{archive}) and \texttt{url} fields may be |
| 1766 |
% included independently of the other REV\TeX\ fields. |
| 1767 |
% |
| 1768 |
% The \texttt{eid} field is now always included, although it is optional for |
| 1769 |
% the bibliography entries. This electronic identifier is a replacement for the |
| 1770 |
% page number in electronic journals: it is the sequence number in the printed |
| 1771 |
% volume. If present, it will be used in place of the page number. |
| 1772 |
% |
| 1773 |
% \end{itemize} |
| 1774 |
% |
| 1775 |
% \begin{macrocode} |
| 1776 |
\beginoptiongroup{ADDITIONAL REVTeX DATA FIELDS:}{} |
| 1777 |
\optdef{*}{}{No additional fields}{for REVTeX} |
| 1778 |
\optdef{r}{revdata,eprint,url,url-blk}{Include REVTeX data fields} |
| 1779 |
{collaboration, eid, eprint, archive, numpages, url} |
| 1780 |
\getans |
| 1781 |
\mytemptrue |
| 1782 |
\if\ans r\mytempfalse\fi |
| 1783 |
\beginoptiongroup{E-PRINT DATA FIELD: |
| 1784 |
(without REVTeX fields)} |
| 1785 |
{\ifmytemp*\fi} |
| 1786 |
\optdef{*}{}{Do not include eprint field}{} |
| 1787 |
\optdef{e}{eprint}{Include eprint and archive fields}{for electronic publications} |
| 1788 |
\getans |
| 1789 |
\endoptiongroup |
| 1790 |
% \end{macrocode} |
| 1791 |
% |
| 1792 |
% \subsection*{URL address} |
| 1793 |
% For electronic documents with an Internet address, add a URL entry. |
| 1794 |
% Harvard already has this, but here it is done for all styles. |
| 1795 |
% The URL text will be set with the \verb!\url! command in the \texttt{url} |
| 1796 |
% package by Donald Arseneau. This package must be loaded for the command |
| 1797 |
% to work right. It allows line breaks at punctuations. Otherwise, |
| 1798 |
% \verb!\texttt! is used instead, with no line breaks. The URL text is preceded |
| 1799 |
% by \verb!\urlprefix! which defaults to ``URL '' but may be redefined by the |
| 1800 |
% user to be whatever s/he wants. The final space must be included. |
| 1801 |
% |
| 1802 |
% Note: selecting the REV\TeX\ fields automatically includes this, so the |
| 1803 |
% offer only is made if REV\TeX\ has been rejected. |
| 1804 |
% |
| 1805 |
% \begin{macrocode} |
| 1806 |
\beginoptiongroup{URL ADDRESS: |
| 1807 |
(without REVTeX fields)}{\ifmytemp*\fi} |
| 1808 |
\optdef{*}{}{No URL}{for electronic (Internet) documents} |
| 1809 |
\optdef{u}{url,url-blk}{Include URL}{as regular item block} |
| 1810 |
\optdef{n}{url,url-nt}{URL as note}{} |
| 1811 |
\optdef{l}{url,url-nl}{URL on new line}{after rest of reference} |
| 1812 |
\getans |
| 1813 |
\endoptiongroup |
| 1814 |
\endoptiongroup |
| 1815 |
% \end{macrocode} |
| 1816 |
% |
| 1817 |
% \subsection*{Reference Component Tagging} |
| 1818 |
% If reference component tagging is enabled, we |
| 1819 |
% apply tags like |\bibinfo| and |\eprint| to the fields of data |
| 1820 |
% in the content of the |\bibitem| statement. We also ensure that |
| 1821 |
% these commands have a default meaning within the scope of the |thebibliography| |
| 1822 |
% environment. The default definitions simply print the field and ignore the |
| 1823 |
% tag. However, other programs or packages might make use of the tag |
| 1824 |
% information to separate authors from title, for example. |
| 1825 |
% |
| 1826 |
% \begin{macrocode} |
| 1827 |
\beginoptiongroup{REFERENCE COMPONENT TAGS:}{} |
| 1828 |
\optdef{*}{}{No reference component tags} |
| 1829 |
{in the \string\bibitem\space entries} |
| 1830 |
\optdef{b}{bibinfo}{Reference component tags} |
| 1831 |
{like \string\bibinfo\space in the content of \string\bibitem} |
| 1832 |
\getans |
| 1833 |
\endoptiongroup |
| 1834 |
% \end{macrocode} |
| 1835 |
% |
| 1836 |
% \subsection*{Define emphasis} |
| 1837 |
% In everything that been mentioned so far, italicization should be |
| 1838 |
% understood to mean `emphasize' in the \LaTeX{} sense. This means that the |
| 1839 |
% command |\em| is used. This is not the same as |\it|, which is always |
| 1840 |
% italics. Rather, with |\em|, the font style switches between |\rm| and |
| 1841 |
% |\it| depending on the context. Here one may choose to true italics, or |
| 1842 |
% to switch off italics altogether. |
| 1843 |
% \begin{macrocode} |
| 1844 |
\beginoptiongroup{EMPHASIS: |
| 1845 |
(affects all so-called italics)}{} |
| 1846 |
\optdef{*}{}{Use emphasis}{ie, \string\em, allows font switching} |
| 1847 |
\optdef{i}{em-it}{Use true italics}{ie, \string\it, absolute italics} |
| 1848 |
\optdef{x}{em-x}{No italics}{at all} |
| 1849 |
\optdef{u}{em-ul}{Underlining}{in place of italics, best with ulem package} |
| 1850 |
\getans |
| 1851 |
\endoptiongroup |
| 1852 |
% \end{macrocode} |
| 1853 |
% |
| 1854 |
% \subsection*{Plain \TeX\ compatibility} |
| 1855 |
% Bold face, italics, and emphasis are made with the \LaTeXe\ commands, |
| 1856 |
% which makes them incompatible with the obsolete \LaTeX2.09, and with |
| 1857 |
% Plain \TeX. There are also some extra testing for existing commands |
| 1858 |
% that best work with \LaTeXe\ syntax. |
| 1859 |
% |
| 1860 |
% If the bibliography style file is to be fully compatible with Plain \TeX, |
| 1861 |
% do not select the option \texttt{nfss} but do take \texttt{plntx}. |
| 1862 |
% \begin{macrocode} |
| 1863 |
\beginoptiongroup{COMPATIBILITY WITH PLAIN TEX:}{} |
| 1864 |
\optdef{*}{nfss}{Use LaTeX commands}{which may not work with Plain TeX} |
| 1865 |
\optdef{t}{plntx}{Use only Plain TeX}{commands for fonts and testing} |
| 1866 |
\getans |
| 1867 |
\endoptiongroup |
| 1868 |
% \end{macrocode} |
| 1869 |
% |
| 1870 |
% Terminate the options list. If a language definition file has been called, |
| 1871 |
% then we have a closing brace too many, so add another dummy opening brace. |
| 1872 |
% \begin{macrocode} |
| 1873 |
\if!\cfile\jfile!\else |
| 1874 |
\begingroup\MBswitch |
| 1875 |
\wr(,{\pc) |
| 1876 |
\endgroup |
| 1877 |
\fi |
| 1878 |
|
| 1879 |
\endoptions |
| 1880 |
%</options> |
| 1881 |
% \end{macrocode} |
| 1882 |
% |
| 1883 |
% \section{The Bibliographic Coding} |
| 1884 |
% |
| 1885 |
% \begin{macrocode} |
| 1886 |
%<*!options&!driver&!bblbst> |
| 1887 |
%<*!tail> |
| 1888 |
% For use with BibTeX version 0.99a or later |
| 1889 |
% ------------------------------------------------------------------- |
| 1890 |
%<*(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))> |
| 1891 |
% WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 1892 |
% The input dbj file contains one of the options |
| 1893 |
%<nmft-it|nmft-sc|nmft-bf|nmft-def> % nmft-it, nmft-bf, nmft-sc, or nmft-def |
| 1894 |
%<lab-it|lab-sc|lab-bf|lab-def> % lab-it, lab-bf, lab-sc, or lab-def |
| 1895 |
% without the corresponding general option(s): |
| 1896 |
%<nmft-it|nmft-sc|nmft-bf|nmft-def> % nmft |
| 1897 |
%<lab-it|lab-sc|lab-bf|lab-def> % lab |
| 1898 |
% (You may be using an older dbj with a newer version of merlin.mbs) |
| 1899 |
% Please edit your dbj file to add the general option(s) and reprocess. |
| 1900 |
% |
| 1901 |
%</(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))> |
| 1902 |
%<*!exlang> |
| 1903 |
%<!babel> % This bibliography style file is intended for texts in ENGLISH |
| 1904 |
%<*babel> |
| 1905 |
% This bibliography style file requires a file named babelbst.tex |
| 1906 |
% containing the definitions of word commands like \bbleditor, etc. |
| 1907 |
%</babel> |
| 1908 |
%</!exlang> |
| 1909 |
%<*exlang> |
| 1910 |
% This bibliography style file is intended for texts in |
| 1911 |
%<bahasa> % BAHASA |
| 1912 |
%<brazilian> % BRAZILIAN |
| 1913 |
%<catalan> % CATALAN |
| 1914 |
%<croatian> % CROATIAN |
| 1915 |
%<czech> % CZECH |
| 1916 |
%<danish> % DANISH |
| 1917 |
%<dansk> % DANSK |
| 1918 |
%<dutch> % DUTCH |
| 1919 |
%<english> % ENGLISH |
| 1920 |
%<esperanto> % ESPERANTO |
| 1921 |
%<finnish> % FINNISH |
| 1922 |
%<french> % FRENCH |
| 1923 |
%<galacian> % GALACIAN |
| 1924 |
%<german> % GERMAN |
| 1925 |
%<hungarian> % HUNGARIAN |
| 1926 |
%<italian> % ITALIAN |
| 1927 |
%<norwegian> % NORWEGIAN |
| 1928 |
%<norsk> % NORWEGIAN |
| 1929 |
%<polski> % POLISH |
| 1930 |
%<polish> % POLISH |
| 1931 |
%<portuguese> % PORTUGUESE |
| 1932 |
%<romanian> % ROMANIAN |
| 1933 |
%<russian> % RUSSIAN |
| 1934 |
%<slovak> % SLOVAK |
| 1935 |
%<slovenian> % SLOVENIAN |
| 1936 |
%<slovene> % SLOVENIAN |
| 1937 |
%<spanish> % SPANISH |
| 1938 |
%<swedish> % SWEDISH |
| 1939 |
%<turkish> % TURKISH |
| 1940 |
%</exlang> |
| 1941 |
%<*!html> |
| 1942 |
%<*ay> |
| 1943 |
% This is an author-year citation style bibliography. As such, it is |
| 1944 |
% non-standard LaTeX, and requires a special package file to function properly. |
| 1945 |
% Such a package is natbib.sty by Patrick W. Daly |
| 1946 |
%<*alk> |
| 1947 |
% or: apalike.sty by Oren Patashnik |
| 1948 |
% The form of the \bibitem entries is |
| 1949 |
% \bibitem[Jones et al., 1990]{key}... |
| 1950 |
%</alk> |
| 1951 |
%<*!(har|ast|alk|cay|nmd|cn)> |
| 1952 |
% The form of the \bibitem entries is |
| 1953 |
% \bibitem[Jones et al.(1990)]{key}... |
| 1954 |
%<nat> % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}... |
| 1955 |
% The essential feature is that the label (the part in brackets) consists |
| 1956 |
% of the author names, as they should appear in the citation, with the year |
| 1957 |
% in parentheses following. There must be no space before the opening |
| 1958 |
% parenthesis! |
| 1959 |
%<nat> % With natbib v5.3, a full list of authors may also follow the year. |
| 1960 |
% In natbib.sty, it is possible to define the type of enclosures that is |
| 1961 |
% really wanted (brackets or parentheses), but in either case, there must |
| 1962 |
% be parentheses in the label. |
| 1963 |
% The \cite command functions as follows: |
| 1964 |
% \citet{key} ==>> Jones et al. (1990) |
| 1965 |
%<nat> % \citet*{key} ==>> Jones, Baker, and Smith (1990) |
| 1966 |
% \citep{key} ==>> (Jones et al., 1990) |
| 1967 |
%<nat> % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) |
| 1968 |
% \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) |
| 1969 |
% \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) |
| 1970 |
% \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32) |
| 1971 |
% \citeauthor{key} ==>> Jones et al. |
| 1972 |
%<nat> % \citeauthor*{key} ==>> Jones, Baker, and Smith |
| 1973 |
% \citeyear{key} ==>> 1990 |
| 1974 |
%</!(har|ast|alk|cay|nmd|cn)> |
| 1975 |
%<*har> |
| 1976 |
% or: harvard.sty by Peter Williams and Thorsten Schnier |
| 1977 |
%<harnm> % (needs natbib v5.3 or harvard v2.0.3) |
| 1978 |
% The form of the bibitem entries is |
| 1979 |
% \harvarditem[Jones et al.]{Jones, Baker, and Smith}{1990}{key}... |
| 1980 |
%</har> |
| 1981 |
%<*cay> |
| 1982 |
% or: chicago.sty |
| 1983 |
% The form of the bibitem entries is |
| 1984 |
% \bibitem[\protect\citeauthoryear{Jones, Baker, and Smith} |
| 1985 |
% {Jones et al.}{1990}{key}... |
| 1986 |
%</cay> |
| 1987 |
%<*nmd> |
| 1988 |
% or: named.sty |
| 1989 |
% The form of the bibitem entries is |
| 1990 |
% \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}... |
| 1991 |
%</nmd> |
| 1992 |
%<*ast> |
| 1993 |
% or: astron.sty |
| 1994 |
% The form of the bibitem entries is |
| 1995 |
% \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}... |
| 1996 |
%</ast> |
| 1997 |
%<*cn> |
| 1998 |
% or: authordate1-4.sty |
| 1999 |
% The form of the bibitem entries is |
| 2000 |
% \bibitem[\protect\citename{Jones et al.}1990]{key}... |
| 2001 |
%</cn> |
| 2002 |
%</ay> |
| 2003 |
%<*!ay> |
| 2004 |
%<*!alph&!cite> |
| 2005 |
% This is a numerical citation style, and as such is standard LaTeX. |
| 2006 |
%</!alph&!cite> |
| 2007 |
%<*alph> |
| 2008 |
% This is a labelled citation style similar to the standard alpha.bst, |
| 2009 |
% where labels are of the form Dal90 or DBK89. |
| 2010 |
%</alph> |
| 2011 |
%<*cite&!alph> |
| 2012 |
% This is a special pseudo-numerical bibliography style, intended to be |
| 2013 |
% used to list all the entries in a bib database |
| 2014 |
%</cite&!alph> |
| 2015 |
% It requires no extra package to interface to the main text. |
| 2016 |
% The form of the \bibitem entries is |
| 2017 |
%<!alph&!cite> % \bibitem{key}... |
| 2018 |
%<alph> % \bibitem[label]{key}... |
| 2019 |
%<!alph&cite> % \bibitem[key]{key}... |
| 2020 |
%<*!cite|alph> |
| 2021 |
% Usage of \cite is as follows: |
| 2022 |
%<*!alph&!cite> |
| 2023 |
% \cite{key} ==>> [#] |
| 2024 |
% \cite[chap. 2]{key} ==>> [#, chap. 2] |
| 2025 |
% where # is a number determined by the ordering in the reference list. |
| 2026 |
%</!alph&!cite> |
| 2027 |
%<*alph> |
| 2028 |
% \cite{key} ==>> [label] |
| 2029 |
% \cite[chap. 2]{key} ==>> [label, chap. 2] |
| 2030 |
% The order in the reference list is by label. |
| 2031 |
%</alph> |
| 2032 |
%<*seq-no&!alph> |
| 2033 |
% The order in the reference list is that by which the works were originally |
| 2034 |
% cited in the text, or that in the database. |
| 2035 |
%</seq-no&!alph> |
| 2036 |
%<*!seq-no&!alph> |
| 2037 |
% The order in the reference list is alphabetical by authors. |
| 2038 |
%</!seq-no&!alph> |
| 2039 |
%</!cite|alph> |
| 2040 |
%</!ay> |
| 2041 |
%</!html> |
| 2042 |
%<*html> |
| 2043 |
% This bibliographic style file produces HTML output instead of LaTeX. |
| 2044 |
% The LaTeX special characters are not translated, so that the output |
| 2045 |
% (which has the .bbl ending still) will have to be further massaged, |
| 2046 |
% and renamed with .html or .htm. The title and heading may also need |
| 2047 |
% to be revised. |
| 2048 |
% |
| 2049 |
%<htlist&!htdes> % The output is a numbered list. |
| 2050 |
%<htdes> % The output is an unnumbered list with the keys printed |
| 2051 |
%<htdes> % before each entry. |
| 2052 |
%<!htlist&!htdes> % The output is lists each entry as one paragraph. |
| 2053 |
%</html> |
| 2054 |
% ------------------------------------------------------------------- |
| 2055 |
|
| 2056 |
% \end{macrocode} |
| 2057 |
% |
| 2058 |
% \begin{macro}{`ENTRY'} |
| 2059 |
% The new \texttt{harvard.sty} of \LaTeXe{} includes an entry URL, or |
| 2060 |
% rather it is included in the new \texttt{.bst} files for it. Add it |
| 2061 |
% here too, but only for option \texttt{harnm}. |
| 2062 |
% |
| 2063 |
% Books normally have an ISBN number. |
| 2064 |
% This entry is (optionally) included, modelled after that in |
| 2065 |
% \texttt{xbtxbst.doc}. |
| 2066 |
% \begin{macrocode} |
| 2067 |
ENTRY |
| 2068 |
{ address |
| 2069 |
%<annote> annote |
| 2070 |
%<eprint> archive |
| 2071 |
author |
| 2072 |
booktitle |
| 2073 |
chapter |
| 2074 |
%<revdata> collaboration |
| 2075 |
%<doi|url-doi> doi |
| 2076 |
edition |
| 2077 |
editor |
| 2078 |
eid |
| 2079 |
%<eprint> eprint |
| 2080 |
howpublished |
| 2081 |
institution |
| 2082 |
%<isbn> isbn |
| 2083 |
%<issn> issn |
| 2084 |
journal |
| 2085 |
key |
| 2086 |
%<lang> language |
| 2087 |
month |
| 2088 |
note |
| 2089 |
number |
| 2090 |
%<revdata> numpages |
| 2091 |
organization |
| 2092 |
pages |
| 2093 |
publisher |
| 2094 |
school |
| 2095 |
series |
| 2096 |
title |
| 2097 |
type |
| 2098 |
%<url|harnm|revdata> url |
| 2099 |
volume |
| 2100 |
year |
| 2101 |
} |
| 2102 |
{} |
| 2103 |
%<!ay&!alph> { label } |
| 2104 |
%<!ay&alph> { label extra.label sort.label } |
| 2105 |
%<ay> { label extra.label sort.label short.list } |
| 2106 |
% \end{macrocode} |
| 2107 |
% \end{macro} |
| 2108 |
% |
| 2109 |
% \begin{macrocode} |
| 2110 |
INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
| 2111 |
% \end{macrocode} |
| 2112 |
% |
| 2113 |
% \begin{macro}{`init.state.consts'} |
| 2114 |
% \begin{macrocode} |
| 2115 |
FUNCTION {init.state.consts} |
| 2116 |
{ #0 'before.all := |
| 2117 |
#1 'mid.sentence := |
| 2118 |
#2 'after.sentence := |
| 2119 |
#3 'after.block := |
| 2120 |
} |
| 2121 |
% \end{macrocode} |
| 2122 |
% \end{macro} |
| 2123 |
% |
| 2124 |
% |s| and |t| are general-purpose scratch registers whose value does not persist |
| 2125 |
% past the end of a function. They also do not appear to be used to communicate |
| 2126 |
% between functions or to be clobbered within a sub-function call. Hopefully. |
| 2127 |
% \begin{macrocode} |
| 2128 |
STRINGS { s t} |
| 2129 |
% \end{macrocode} |
| 2130 |
% |
| 2131 |
% \begin{macro}{`output.nonnull'} |
| 2132 |
% \begin{macrocode} |
| 2133 |
FUNCTION {output.nonnull} |
| 2134 |
{ 's := |
| 2135 |
output.state mid.sentence = |
| 2136 |
%<!blk-com|(!com-semi&!com-blank)> { ", " * write$ } |
| 2137 |
%<blk-com&com-semi> { "; " * write$ } |
| 2138 |
%<blk-com&!com-semi&com-blank> { " " * write$ } |
| 2139 |
{ output.state after.block = |
| 2140 |
{ add.period$ write$ |
| 2141 |
newline$ |
| 2142 |
%<!html> "\newblock " write$ |
| 2143 |
} |
| 2144 |
{ output.state before.all = |
| 2145 |
'write$ |
| 2146 |
{ add.period$ " " * write$ } |
| 2147 |
if$ |
| 2148 |
} |
| 2149 |
if$ |
| 2150 |
mid.sentence 'output.state := |
| 2151 |
} |
| 2152 |
if$ |
| 2153 |
s |
| 2154 |
} |
| 2155 |
% \end{macrocode} |
| 2156 |
% \end{macro} |
| 2157 |
% |
| 2158 |
% \begin{macro}{`output'} |
| 2159 |
% \begin{macrocode} |
| 2160 |
FUNCTION {output} |
| 2161 |
{ duplicate$ empty$ |
| 2162 |
'pop$ |
| 2163 |
'output.nonnull |
| 2164 |
if$ |
| 2165 |
} |
| 2166 |
% \end{macrocode} |
| 2167 |
% \end{macro} |
| 2168 |
% |
| 2169 |
% \begin{macro}{`output.check'} |
| 2170 |
% \begin{macrocode} |
| 2171 |
FUNCTION {output.check} |
| 2172 |
{ 't := |
| 2173 |
duplicate$ empty$ |
| 2174 |
{ pop$ "empty " t * " in " * cite$ * warning$ } |
| 2175 |
'output.nonnull |
| 2176 |
if$ |
| 2177 |
} |
| 2178 |
% \end{macrocode} |
| 2179 |
% \end{macro} |
| 2180 |
% |
| 2181 |
% \begin{macro}{`fin.entry'} |
| 2182 |
% I have often been asked to add an annotation function. This suggestion is |
| 2183 |
% from Soren Dayton; it inputs a file with the same name as the cite key, or |
| 2184 |
% uses the text in the \texttt{annote} field. It will only work with \LaTeXe. |
| 2185 |
% \begin{macrocode} |
| 2186 |
FUNCTION {fin.entry} |
| 2187 |
%<*!fin-bare> |
| 2188 |
{ add.period$ |
| 2189 |
write$ |
| 2190 |
%</!fin-bare> |
| 2191 |
%<*fin-bare> |
| 2192 |
{ duplicate$ empty$ |
| 2193 |
'pop$ |
| 2194 |
'write$ |
| 2195 |
if$ |
| 2196 |
%</fin-bare> |
| 2197 |
%<html&htdes> "</dd>" write$ |
| 2198 |
%<html&!htdes&htlist> "</li>" write$ |
| 2199 |
%<html&!htdes&!htlist> "</p>" write$ |
| 2200 |
newline$ |
| 2201 |
%<*annote> |
| 2202 |
%<*!html> |
| 2203 |
annote missing$ |
| 2204 |
{ "\bibAnnoteFile{" cite$ * "}" * write$ newline$ } |
| 2205 |
{ "\bibAnnote{" cite$ * "}{" * annote * "}" * write$ newline$ |
| 2206 |
} |
| 2207 |
if$ |
| 2208 |
%</!html> |
| 2209 |
%<*html> |
| 2210 |
"<blockquote><strong>Key:</strong> " |
| 2211 |
cite$ * write$ |
| 2212 |
annote missing$ |
| 2213 |
{ newline$ } |
| 2214 |
{ "<br><strong>Annotation:</strong>" write$ newline$ |
| 2215 |
annote write$ newline$ |
| 2216 |
} |
| 2217 |
if$ |
| 2218 |
"</blockquote>" write$ newline$ |
| 2219 |
%</html> |
| 2220 |
%</annote> |
| 2221 |
} |
| 2222 |
|
| 2223 |
% \end{macrocode} |
| 2224 |
% \end{macro} |
| 2225 |
% |
| 2226 |
% \begin{macro}{`new.block'} |
| 2227 |
% \begin{macrocode} |
| 2228 |
FUNCTION {new.block} |
| 2229 |
{ output.state before.all = |
| 2230 |
'skip$ |
| 2231 |
{ after.block 'output.state := } |
| 2232 |
if$ |
| 2233 |
} |
| 2234 |
% \end{macrocode} |
| 2235 |
% \end{macro} |
| 2236 |
% |
| 2237 |
% \begin{macro}{`new.sentence'} |
| 2238 |
% \begin{macrocode} |
| 2239 |
FUNCTION {new.sentence} |
| 2240 |
{ output.state after.block = |
| 2241 |
'skip$ |
| 2242 |
{ output.state before.all = |
| 2243 |
'skip$ |
| 2244 |
{ after.sentence 'output.state := } |
| 2245 |
if$ |
| 2246 |
} |
| 2247 |
if$ |
| 2248 |
} |
| 2249 |
% \end{macrocode} |
| 2250 |
% \end{macro} |
| 2251 |
% |
| 2252 |
% \begin{macro}{`add.blank'} |
| 2253 |
% When text is printed with \texttt{output} or |
| 2254 |
% \texttt{output.check}, the \texttt{output.state} is set such that |
| 2255 |
% a comma will precede the next output text. For special effects, we want to |
| 2256 |
% suppress this comma, inserting a blank instead. Hence the |
| 2257 |
% \texttt{output.state} is changed to \texttt{before.all}, meaning no |
| 2258 |
% punctuation is to be inserted. |
| 2259 |
% \begin{macrocode} |
| 2260 |
FUNCTION {add.blank} |
| 2261 |
{ " " * before.all 'output.state := |
| 2262 |
} |
| 2263 |
|
| 2264 |
% \end{macrocode} |
| 2265 |
% \end{macro} |
| 2266 |
% |
| 2267 |
% \begin{macro}{`add.colon'} |
| 2268 |
% \begin{macrocode} |
| 2269 |
%<*au-col|tit-col> |
| 2270 |
FUNCTION {add.colon} |
| 2271 |
{ duplicate$ empty$ |
| 2272 |
'skip$ |
| 2273 |
{ ":" * add.blank } |
| 2274 |
if$ |
| 2275 |
} |
| 2276 |
|
| 2277 |
%</au-col|tit-col> |
| 2278 |
% \end{macrocode} |
| 2279 |
% \end{macro} |
| 2280 |
% |
| 2281 |
% \begin{macro}{`no.blank.or.punct'} |
| 2282 |
% Another frill is to suppresss both blanks and punctuation. The |\hspace| |
| 2283 |
% permits a line break at this point. |
| 2284 |
% \begin{macrocode} |
| 2285 |
%<*yrpp-xsp> |
| 2286 |
FUNCTION {no.blank.or.punct} |
| 2287 |
%<*!html> |
| 2288 |
{ "\hspace{0pt}" * before.all 'output.state := |
| 2289 |
} |
| 2290 |
%</!html> |
| 2291 |
%<html>{ before.all 'output.state := } |
| 2292 |
|
| 2293 |
%</yrpp-xsp> |
| 2294 |
% \end{macrocode} |
| 2295 |
% \end{macro} |
| 2296 |
% |
| 2297 |
% \begin{macro}{`date.block'} |
| 2298 |
% The \texttt{date.block} function is used for special punctuating effects |
| 2299 |
% after the date. |
| 2300 |
% \begin{macrocode} |
| 2301 |
FUNCTION {date.block} |
| 2302 |
{ |
| 2303 |
%<*!yrp-x> |
| 2304 |
%<yrp-col> ":" * |
| 2305 |
%<*!yrp-col> |
| 2306 |
%<yrp-semi> ";" * |
| 2307 |
%<*!yrp-semi> |
| 2308 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 2309 |
%<(blk-com|blk-tit|blk-tita)&!yrp-per> skip$ |
| 2310 |
%<(blk-com|blk-tit|blk-tita)&yrp-per> new.sentence |
| 2311 |
%</!yrp-semi> |
| 2312 |
%</!yrp-col> |
| 2313 |
%</!yrp-x> |
| 2314 |
%<*yrp-x|yrp-col|yrp-semi> |
| 2315 |
%<!yrpp-xsp> add.blank |
| 2316 |
%<yrpp-xsp> no.blank.or.punct |
| 2317 |
%</yrp-x|yrp-col|yrp-semi> |
| 2318 |
} |
| 2319 |
|
| 2320 |
% \end{macrocode} |
| 2321 |
% \end{macro} |
| 2322 |
% |
| 2323 |
% \begin{macro}{`not'} |
| 2324 |
% \begin{macrocode} |
| 2325 |
FUNCTION {not} |
| 2326 |
{ { #0 } |
| 2327 |
{ #1 } |
| 2328 |
if$ |
| 2329 |
} |
| 2330 |
% \end{macrocode} |
| 2331 |
% \end{macro} |
| 2332 |
% |
| 2333 |
% \begin{macro}{`and'} |
| 2334 |
% \begin{macrocode} |
| 2335 |
FUNCTION {and} |
| 2336 |
{ 'skip$ |
| 2337 |
{ pop$ #0 } |
| 2338 |
if$ |
| 2339 |
} |
| 2340 |
% \end{macrocode} |
| 2341 |
% \end{macro} |
| 2342 |
% |
| 2343 |
% \begin{macro}{`or'} |
| 2344 |
% \begin{macrocode} |
| 2345 |
FUNCTION {or} |
| 2346 |
{ { pop$ #1 } |
| 2347 |
'skip$ |
| 2348 |
if$ |
| 2349 |
} |
| 2350 |
% \end{macrocode} |
| 2351 |
% \end{macro} |
| 2352 |
% |
| 2353 |
% \begin{macro}{`non.stop'} |
| 2354 |
% This function (my invention) tests if the last character in the string |
| 2355 |
% on the stack is \texttt{. ! ?} by using \texttt{add.period\$}. It is to |
| 2356 |
% be used for conditional italic correction or adding commas. |
| 2357 |
% \begin{macrocode} |
| 2358 |
%<*!tit-it&tit-qq> |
| 2359 |
FUNCTION {non.stop} |
| 2360 |
{ duplicate$ |
| 2361 |
"}" * add.period$ |
| 2362 |
#-1 #1 substring$ "." = |
| 2363 |
} |
| 2364 |
|
| 2365 |
%</!tit-it&tit-qq> |
| 2366 |
% \end{macrocode} |
| 2367 |
% \end{macro} |
| 2368 |
% |
| 2369 |
% \begin{macro}{`remove.dots'} |
| 2370 |
% This macro removes any periods from the string on the stack. To be used |
| 2371 |
% for undotting journal names, months, and juniors. Previously |
| 2372 |
% \texttt{purify\$} was used for this, but that removes more than just |
| 2373 |
% dots. |
| 2374 |
% |
| 2375 |
% May 2007, Joseph A. Wright (Morning Star, UK) contributed a revision to allow |
| 2376 |
% the dot accent |\.| to be retained. |
| 2377 |
% \begin{macrocode} |
| 2378 |
%<*nm-rv|nm-rvx|nm-rvcx|mth-bare|jxper> |
| 2379 |
STRINGS {z} |
| 2380 |
|
| 2381 |
FUNCTION {remove.dots} |
| 2382 |
{ 'z := |
| 2383 |
"" |
| 2384 |
{ z empty$ not } |
| 2385 |
{ z #1 #2 substring$ |
| 2386 |
duplicate$ "\." = |
| 2387 |
{ z #3 global.max$ substring$ 'z := * } |
| 2388 |
{ pop$ |
| 2389 |
z #1 #1 substring$ |
| 2390 |
z #2 global.max$ substring$ 'z := |
| 2391 |
duplicate$ "." = 'pop$ |
| 2392 |
{ * } |
| 2393 |
if$ |
| 2394 |
} |
| 2395 |
if$ |
| 2396 |
} |
| 2397 |
while$ |
| 2398 |
} |
| 2399 |
%</nm-rv|nm-rvx|nm-rvcx|mth-bare|jxper> |
| 2400 |
% \end{macrocode} |
| 2401 |
% \end{macro} |
| 2402 |
% |
| 2403 |
% \begin{macro}{`new.block.checka'} |
| 2404 |
% \begin{macrocode} |
| 2405 |
%<*!ay> |
| 2406 |
FUNCTION {new.block.checka} |
| 2407 |
{ empty$ |
| 2408 |
'skip$ |
| 2409 |
'new.block |
| 2410 |
if$ |
| 2411 |
} |
| 2412 |
%</!ay> |
| 2413 |
% \end{macrocode} |
| 2414 |
% \end{macro} |
| 2415 |
% |
| 2416 |
% \begin{macro}{`new.block.checkb'} |
| 2417 |
% \begin{macrocode} |
| 2418 |
FUNCTION {new.block.checkb} |
| 2419 |
{ empty$ |
| 2420 |
swap$ empty$ |
| 2421 |
and |
| 2422 |
'skip$ |
| 2423 |
'new.block |
| 2424 |
if$ |
| 2425 |
} |
| 2426 |
% \end{macrocode} |
| 2427 |
% \end{macro} |
| 2428 |
% |
| 2429 |
% \begin{macro}{`new.sentence.checka'} |
| 2430 |
% \begin{macrocode} |
| 2431 |
%<*!ay> |
| 2432 |
FUNCTION {new.sentence.checka} |
| 2433 |
{ empty$ |
| 2434 |
'skip$ |
| 2435 |
'new.sentence |
| 2436 |
if$ |
| 2437 |
} |
| 2438 |
%</!ay> |
| 2439 |
% \end{macrocode} |
| 2440 |
% \end{macro} |
| 2441 |
% |
| 2442 |
% \begin{macro}{`new.sentence.checkb'} |
| 2443 |
% \begin{macrocode} |
| 2444 |
%<*!ay> |
| 2445 |
FUNCTION {new.sentence.checkb} |
| 2446 |
{ empty$ |
| 2447 |
swap$ empty$ |
| 2448 |
and |
| 2449 |
'skip$ |
| 2450 |
'new.sentence |
| 2451 |
if$ |
| 2452 |
} |
| 2453 |
%</!ay> |
| 2454 |
% \end{macrocode} |
| 2455 |
% \end{macro} |
| 2456 |
% |
| 2457 |
% \begin{macro}{`field.or.null'} |
| 2458 |
% \begin{macrocode} |
| 2459 |
FUNCTION {field.or.null} |
| 2460 |
{ duplicate$ empty$ |
| 2461 |
{ pop$ "" } |
| 2462 |
'skip$ |
| 2463 |
if$ |
| 2464 |
} |
| 2465 |
% \end{macrocode} |
| 2466 |
% \end{macro} |
| 2467 |
% |
| 2468 |
% \begin{macro}{`emphasize'} |
| 2469 |
% Emphasis can be either italic or the alternating font. The font command |
| 2470 |
% may be NFSS or regular \LaTeX~2.09 declarations. |
| 2471 |
% \begin{macrocode} |
| 2472 |
FUNCTION {emphasize} |
| 2473 |
%<*!em-x> |
| 2474 |
{ duplicate$ empty$ |
| 2475 |
{ pop$ "" } |
| 2476 |
%<html> { "<i>" swap$ * "</i>" * } |
| 2477 |
%<*!html> |
| 2478 |
%<em-ul> { "\uline{" swap$ * "}" * } |
| 2479 |
%<*!em-ul> |
| 2480 |
%<*!nfss> |
| 2481 |
%<!em-it> { "{\em " swap$ * "\/}" * } |
| 2482 |
%<em-it> { "{\it " swap$ * "\/}" * } |
| 2483 |
%</!nfss> |
| 2484 |
%<*nfss> |
| 2485 |
%<!em-it> { "\emph{" swap$ * "}" * } |
| 2486 |
%<em-it> { "\textit{" swap$ * "}" * } |
| 2487 |
%</nfss> |
| 2488 |
%</!em-ul> |
| 2489 |
%</!html> |
| 2490 |
if$ |
| 2491 |
} |
| 2492 |
%</!em-x> |
| 2493 |
%<em-x>{ skip$ } |
| 2494 |
% \end{macrocode} |
| 2495 |
% \end{macro} |
| 2496 |
% |
| 2497 |
% \begin{macro}{`bolden'} |
| 2498 |
% The bold font command may be NFSS or the regular \LaTeX~2.09 declaration. |
| 2499 |
% \begin{macrocode} |
| 2500 |
%<*nmft-bf|vol-bf|vol-2bf|lab-bf|dtbf|pres-bf> |
| 2501 |
FUNCTION {bolden} |
| 2502 |
{ duplicate$ empty$ |
| 2503 |
{ pop$ "" } |
| 2504 |
%<html> { "<b>" swap$ * "</b>" * } |
| 2505 |
%<*!html> |
| 2506 |
%<!nfss> { "{\bf " swap$ * "}" * } |
| 2507 |
%<nfss> { "\textbf{" swap$ * "}" * } |
| 2508 |
%</!html> |
| 2509 |
if$ |
| 2510 |
} |
| 2511 |
%</nmft-bf|vol-bf|vol-2bf|lab-bf|dtbf|pres-bf> |
| 2512 |
% \end{macrocode} |
| 2513 |
% \end{macro} |
| 2514 |
% |
| 2515 |
% \begin{macro}{`scaps'} |
| 2516 |
% To put text into small caps. |
| 2517 |
% \begin{macrocode} |
| 2518 |
%<*lab-sc|nmft-sc|pres-sc> |
| 2519 |
FUNCTION {scaps} |
| 2520 |
{ duplicate$ empty$ |
| 2521 |
{ pop$ "" } |
| 2522 |
%<html> { skip$ } |
| 2523 |
%<*!html> |
| 2524 |
%<!nfss> { "{\sc " swap$ * "}" * } |
| 2525 |
%<nfss> { "\textsc{" swap$ * "}" * } |
| 2526 |
%</!html> |
| 2527 |
if$ |
| 2528 |
} |
| 2529 |
%</lab-sc|nmft-sc|pres-sc> |
| 2530 |
% \end{macrocode} |
| 2531 |
% \end{macro} |
| 2532 |
% |
| 2533 |
% \begin{macro}{`bib.name.font'} |
| 2534 |
% \begin{macro}{`bib.fname.font'} |
| 2535 |
% \begin{macro}{`cite.name.font'} |
| 2536 |
% Define functions for formatting the author/editor names, one for the |
| 2537 |
% surnames (\texttt{bib.name.font}) and one for the first names |
| 2538 |
% (\texttt{bib.fname.font}). These could be identical, or the latter is |
| 2539 |
% deactivated if first names are not to be formatted, only the last names. |
| 2540 |
% |
| 2541 |
% For citations, we have \texttt{cite.name.font}. Here only surnames appear. |
| 2542 |
% |
| 2543 |
% It is also possible to have a user-defined font command for each, which the |
| 2544 |
% user must define in his work. These are |\bibnamefont{}| and |\bibfnamefont{}|, |
| 2545 |
% and some defaults are provided that simply repeat the arguments. Two commands |
| 2546 |
% are needed if \texttt{nmft-def} and \texttt{fnm-def} are both given. |
| 2547 |
% |
| 2548 |
% If neither \texttt{fnm-def} nor \texttt{fnm-rm} are given, then the first names |
| 2549 |
% are formatted the same as the surnames. |
| 2550 |
% \begin{macrocode} |
| 2551 |
%<*nmft> |
| 2552 |
FUNCTION {bib.name.font} |
| 2553 |
%<nmft-it>{ emphasize } |
| 2554 |
%<!nmft-it&nmft-bf>{ bolden } |
| 2555 |
%<!nmft-it&!nmft-bf&nmft-sc>{ scaps } |
| 2556 |
%<*!nmft-it&!nmft-bf&!nmft-sc&nmft-def> |
| 2557 |
{ duplicate$ empty$ |
| 2558 |
{ pop$ "" } |
| 2559 |
%<!html> { "\bibnamefont{" swap$ * "}" * } |
| 2560 |
%<html> { skip$ } |
| 2561 |
if$ |
| 2562 |
} |
| 2563 |
%</!nmft-it&!nmft-bf&!nmft-sc&nmft-def> |
| 2564 |
FUNCTION {bib.fname.font} |
| 2565 |
%<!fnm-rm&!fnm-def>{ bib.name.font } |
| 2566 |
%<fnm-rm>{ skip$ } |
| 2567 |
%<*!fnm-rm&fnm-def> |
| 2568 |
{ duplicate$ empty$ |
| 2569 |
{ pop$ "" } |
| 2570 |
%<!html> { "\bibfnamefont{" swap$ * "}" * } |
| 2571 |
%<html> { skip$ } |
| 2572 |
if$ |
| 2573 |
} |
| 2574 |
%</!fnm-rm&fnm-def> |
| 2575 |
%</nmft> |
| 2576 |
% \end{macrocode} |
| 2577 |
% |
| 2578 |
% \begin{macrocode} |
| 2579 |
%<*lab> |
| 2580 |
FUNCTION {cite.name.font} |
| 2581 |
%<lab-it>{ emphasize } |
| 2582 |
%<!lab-it&lab-bf>{ bolden } |
| 2583 |
%<!lab-it&!lab-bf&lab-sc>{ scaps } |
| 2584 |
%<*!lab-it&!lab-bf&!lab-sc&lab-def> |
| 2585 |
{ duplicate$ empty$ |
| 2586 |
{ pop$ "" } |
| 2587 |
%<!html> { "\citenamefont{" swap$ * "}" * } |
| 2588 |
%<html> { skip$ } |
| 2589 |
if$ |
| 2590 |
} |
| 2591 |
%</!lab-it&!lab-bf&!lab-sc&lab-def> |
| 2592 |
%</lab> |
| 2593 |
% \end{macrocode} |
| 2594 |
% \end{macro} |
| 2595 |
% \end{macro} |
| 2596 |
% \end{macro} |
| 2597 |
% |
| 2598 |
% \begin{macro}{`tie.or.space.prefix'} |
| 2599 |
% The function \texttt{tie.or.space.prefix} determines whether |
| 2600 |
% the top item on the stack requires a tie character and |
| 2601 |
% slips that (or a space character if not) ahead of it. |
| 2602 |
% At this point a font switch or other function can be applied to |
| 2603 |
% the top item on the stack, and the appropriate space found |
| 2604 |
% just ahead of it on the stack. |
| 2605 |
% |
| 2606 |
% The sequence \texttt{tie.or.space.prefix} \texttt{*} \texttt{*} is a common idiom |
| 2607 |
% for joining the top two stack objects with a tie or space |
| 2608 |
% depending on the length of the top object. |
| 2609 |
% |
| 2610 |
% Another idiom is to apply \texttt{tie.or.space.prefix}, apply a font switch, |
| 2611 |
% and then swap and join. In this case the tie or space follows the object. |
| 2612 |
% \begin{macrocode} |
| 2613 |
FUNCTION {tie.or.space.prefix} |
| 2614 |
{ duplicate$ text.length$ #3 < |
| 2615 |
{ "~" } |
| 2616 |
{ " " } |
| 2617 |
if$ |
| 2618 |
swap$ |
| 2619 |
} |
| 2620 |
% \end{macrocode} |
| 2621 |
% \end{macro} |
| 2622 |
% |
| 2623 |
% \begin{macro}{`capitalize'} |
| 2624 |
% Capitalizing is easy for regular languages, but for \texttt{babel}, |
| 2625 |
% some trickery stuff is needed; definitions of |\capitalize| and |
| 2626 |
% |\Capitalize| are written to the \texttt{.bbl} file. |
| 2627 |
% \begin{macrocode} |
| 2628 |
|
| 2629 |
FUNCTION {capitalize} |
| 2630 |
%<!babel>{ "u" change.case$ "t" change.case$ } |
| 2631 |
%<babel>{ "\capitalize" swap$ * } |
| 2632 |
|
| 2633 |
% \end{macrocode} |
| 2634 |
% \end{macro} |
| 2635 |
% |
| 2636 |
% \begin{macro}{`space.word'} |
| 2637 |
% The function \texttt{space.word} adds a space before and after the word or |
| 2638 |
% words currently on the stack. This was added for the \texttt{bbl.}$nnn$ |
| 2639 |
% functions, that contain only a word without spacing, but replace explicit |
| 2640 |
% text in the originals that were spaced out. Its seems more flexible to |
| 2641 |
% define the word functions to be without spacing. |
| 2642 |
% \begin{macrocode} |
| 2643 |
FUNCTION {space.word} |
| 2644 |
{ " " swap$ * " " * } |
| 2645 |
% \end{macrocode} |
| 2646 |
% \end{macro} |
| 2647 |
% |
| 2648 |
% \begin{macrocode} |
| 2649 |
% Here are the language-specific definitions for explicit words. |
| 2650 |
% Each function has a name bbl.xxx where xxx is the English word. |
| 2651 |
% \end{macrocode} |
| 2652 |
% |
| 2653 |
% \begin{macrocode} |
| 2654 |
%<*!exlang> |
| 2655 |
% \end{macrocode} |
| 2656 |
% |
| 2657 |
% \begin{macro}{`bbl.xxx'} |
| 2658 |
% These are the default English words. There is no default language |
| 2659 |
% option: one of \texttt{english} or \texttt{babel} must be given. |
| 2660 |
% \begin{macrocode} |
| 2661 |
%<*!babel> |
| 2662 |
% The language selected here is ENGLISH |
| 2663 |
FUNCTION {bbl.and} |
| 2664 |
%<!varand|html>{ "and"} |
| 2665 |
%<varand&!html>{ "\protect\BIBand{}"} |
| 2666 |
|
| 2667 |
FUNCTION {bbl.etal} |
| 2668 |
{ "et~al." } |
| 2669 |
|
| 2670 |
FUNCTION {bbl.editors} |
| 2671 |
%<!ed>{ "editors" } |
| 2672 |
%<ed>{ "eds." } |
| 2673 |
|
| 2674 |
FUNCTION {bbl.editor} |
| 2675 |
%<!ed>{ "editor" } |
| 2676 |
%<ed>{ "ed." } |
| 2677 |
|
| 2678 |
FUNCTION {bbl.edby} |
| 2679 |
{ "edited by" } |
| 2680 |
|
| 2681 |
FUNCTION {bbl.edition} |
| 2682 |
%<!abr>{ "edition" } |
| 2683 |
%<abr&!ednx>{ "edn." } |
| 2684 |
%<abr&ednx>{ "ed." } |
| 2685 |
|
| 2686 |
FUNCTION {bbl.volume} |
| 2687 |
%<!abr>{ "volume" } |
| 2688 |
%<abr>{ "vol." } |
| 2689 |
|
| 2690 |
FUNCTION {bbl.of} |
| 2691 |
{ "of" } |
| 2692 |
|
| 2693 |
FUNCTION {bbl.number} |
| 2694 |
%<!abr>{ "number" } |
| 2695 |
%<abr>{ "no." } |
| 2696 |
|
| 2697 |
FUNCTION {bbl.nr} |
| 2698 |
{ "no." } |
| 2699 |
|
| 2700 |
FUNCTION {bbl.in} |
| 2701 |
{ "in" } |
| 2702 |
|
| 2703 |
FUNCTION {bbl.pages} |
| 2704 |
%<!pp&!ppx>{ "pages" } |
| 2705 |
%<pp>{ "pp." } |
| 2706 |
%<!pp&ppx>{ "" } |
| 2707 |
|
| 2708 |
FUNCTION {bbl.page} |
| 2709 |
%<!pp&!ppx>{ "page" } |
| 2710 |
%<pp>{ "p." } |
| 2711 |
%<!pp&ppx>{ "" } |
| 2712 |
|
| 2713 |
%<*revdata> |
| 2714 |
FUNCTION {bbl.eidpp} |
| 2715 |
{ "pages" } |
| 2716 |
|
| 2717 |
%</revdata> |
| 2718 |
FUNCTION {bbl.chapter} |
| 2719 |
%<!abr>{ "chapter" } |
| 2720 |
%<abr>{ "chap." } |
| 2721 |
|
| 2722 |
FUNCTION {bbl.techrep} |
| 2723 |
%<!abr>{ "Technical Report" } |
| 2724 |
%<abr>{ "Tech. Rep." } |
| 2725 |
|
| 2726 |
FUNCTION {bbl.mthesis} |
| 2727 |
{ "Master's thesis" } |
| 2728 |
|
| 2729 |
FUNCTION {bbl.phdthesis} |
| 2730 |
{ "Ph.D. thesis" } |
| 2731 |
|
| 2732 |
%<*!xedn> |
| 2733 |
FUNCTION {bbl.first} |
| 2734 |
%<!ord>{ "First" } |
| 2735 |
%<ord>{ "1st" } |
| 2736 |
|
| 2737 |
FUNCTION {bbl.second} |
| 2738 |
%<!ord>{ "Second" } |
| 2739 |
%<ord>{ "2nd" } |
| 2740 |
|
| 2741 |
FUNCTION {bbl.third} |
| 2742 |
%<!ord>{ "Third" } |
| 2743 |
%<ord>{ "3rd" } |
| 2744 |
|
| 2745 |
FUNCTION {bbl.fourth} |
| 2746 |
%<!ord>{ "Fourth" } |
| 2747 |
%<ord>{ "4th" } |
| 2748 |
|
| 2749 |
FUNCTION {bbl.fifth} |
| 2750 |
%<!ord>{ "Fifth" } |
| 2751 |
%<ord>{ "5th" } |
| 2752 |
|
| 2753 |
FUNCTION {bbl.st} |
| 2754 |
{ "st" } |
| 2755 |
|
| 2756 |
FUNCTION {bbl.nd} |
| 2757 |
{ "nd" } |
| 2758 |
|
| 2759 |
FUNCTION {bbl.rd} |
| 2760 |
{ "rd" } |
| 2761 |
|
| 2762 |
FUNCTION {bbl.th} |
| 2763 |
{ "th" } |
| 2764 |
|
| 2765 |
%</!xedn> |
| 2766 |
%<*!abr> |
| 2767 |
MACRO {jan} {"January"} |
| 2768 |
|
| 2769 |
MACRO {feb} {"February"} |
| 2770 |
|
| 2771 |
MACRO {mar} {"March"} |
| 2772 |
|
| 2773 |
MACRO {apr} {"April"} |
| 2774 |
|
| 2775 |
MACRO {may} {"May"} |
| 2776 |
|
| 2777 |
MACRO {jun} {"June"} |
| 2778 |
|
| 2779 |
MACRO {jul} {"July"} |
| 2780 |
|
| 2781 |
MACRO {aug} {"August"} |
| 2782 |
|
| 2783 |
MACRO {sep} {"September"} |
| 2784 |
|
| 2785 |
MACRO {oct} {"October"} |
| 2786 |
|
| 2787 |
MACRO {nov} {"November"} |
| 2788 |
|
| 2789 |
MACRO {dec} {"December"} |
| 2790 |
|
| 2791 |
%</!abr> |
| 2792 |
%<*abr> |
| 2793 |
MACRO {jan} {"Jan."} |
| 2794 |
|
| 2795 |
MACRO {feb} {"Feb."} |
| 2796 |
|
| 2797 |
MACRO {mar} {"Mar."} |
| 2798 |
|
| 2799 |
MACRO {apr} {"Apr."} |
| 2800 |
|
| 2801 |
MACRO {may} {"May"} |
| 2802 |
|
| 2803 |
MACRO {jun} {"Jun."} |
| 2804 |
|
| 2805 |
MACRO {jul} {"Jul."} |
| 2806 |
|
| 2807 |
MACRO {aug} {"Aug."} |
| 2808 |
|
| 2809 |
MACRO {sep} {"Sep."} |
| 2810 |
|
| 2811 |
MACRO {oct} {"Oct."} |
| 2812 |
|
| 2813 |
MACRO {nov} {"Nov."} |
| 2814 |
|
| 2815 |
MACRO {dec} {"Dec."} |
| 2816 |
|
| 2817 |
%</abr> |
| 2818 |
%</!babel> |
| 2819 |
% \end{macrocode} |
| 2820 |
% |
| 2821 |
% Here are the definitions for \texttt{babel} option, i.e., explicit |
| 2822 |
% translations are not used, but rather only \LaTeX{} macros that must be |
| 2823 |
% defined in the file \texttt{babelbst.tex}. This could allow automatic |
| 2824 |
% language selection. |
| 2825 |
% \begin{macrocode} |
| 2826 |
%<*babel> |
| 2827 |
% The BABEL language selection is made here; definitions in babelbst.tex. |
| 2828 |
FUNCTION {bbl.and} |
| 2829 |
{ "\bbland{}"} |
| 2830 |
|
| 2831 |
FUNCTION {bbl.etal} |
| 2832 |
{ "\bbletal{}"} |
| 2833 |
|
| 2834 |
FUNCTION {bbl.editors} |
| 2835 |
%<!ed>{ "\bbleditors{}" } |
| 2836 |
%<ed>{ "\bbleds{}" } |
| 2837 |
|
| 2838 |
FUNCTION {bbl.editor} |
| 2839 |
%<!ed>{ "\bbleditor{}" } |
| 2840 |
%<ed>{ "\bbled{}" } |
| 2841 |
|
| 2842 |
FUNCTION {bbl.edby} |
| 2843 |
{ "\bbledby{}" } |
| 2844 |
|
| 2845 |
FUNCTION {bbl.edition} |
| 2846 |
%<!abr>{ "\bbledition{}" } |
| 2847 |
%<abr>{ "\bbledn{}" } |
| 2848 |
|
| 2849 |
FUNCTION {bbl.volume} |
| 2850 |
%<!abr>{ "\bblvolume{}" } |
| 2851 |
%<abr>{ "\bblvol{}" } |
| 2852 |
|
| 2853 |
FUNCTION {bbl.of} |
| 2854 |
{ "\bblof{}" } |
| 2855 |
|
| 2856 |
FUNCTION {bbl.number} |
| 2857 |
%<!abr>{ "\bblnumber{}" } |
| 2858 |
%<abr>{ "\bblno{}" } |
| 2859 |
|
| 2860 |
FUNCTION {bbl.nr} |
| 2861 |
{ "\bblno{}" } |
| 2862 |
|
| 2863 |
FUNCTION {bbl.in} |
| 2864 |
{ "\bblin{}" } |
| 2865 |
|
| 2866 |
FUNCTION {bbl.pages} |
| 2867 |
%<!pp&!ppx>{ "\bblpages{}" } |
| 2868 |
%<pp>{ "\bblpp{}" } |
| 2869 |
%<!pp&ppx>{ "" } |
| 2870 |
|
| 2871 |
FUNCTION {bbl.page} |
| 2872 |
%<!pp&!ppx>{ "\bblpage{}" } |
| 2873 |
%<pp>{ "\bblp{}" } |
| 2874 |
%<!pp&ppx>{ "" } |
| 2875 |
|
| 2876 |
FUNCTION {bbl.chapter} |
| 2877 |
%<!abr>{ "\bblchapter{}" } |
| 2878 |
%<abr>{ "\bblchap{}" } |
| 2879 |
|
| 2880 |
FUNCTION {bbl.techrep} |
| 2881 |
%<!abr>{ "\bbltechreport{}" } |
| 2882 |
%<abr>{ "\bbltechrep{}" } |
| 2883 |
|
| 2884 |
FUNCTION {bbl.mthesis} |
| 2885 |
{ "\bblmthesis{}" } |
| 2886 |
|
| 2887 |
FUNCTION {bbl.phdthesis} |
| 2888 |
{ "\bblphdthesis{}" } |
| 2889 |
|
| 2890 |
%<*revdata> |
| 2891 |
FUNCTION {bbl.eidpp} |
| 2892 |
{ "\bbleidpp{}" } |
| 2893 |
|
| 2894 |
%</revdata> |
| 2895 |
%<*!xedn> |
| 2896 |
FUNCTION {bbl.first} |
| 2897 |
%<!ord>{ "\bblfirst{}" } |
| 2898 |
%<ord>{ "\bblfirsto{}" } |
| 2899 |
|
| 2900 |
FUNCTION {bbl.second} |
| 2901 |
%<!ord>{ "\bblsecond{}" } |
| 2902 |
%<ord>{ "\bblsecondo{}" } |
| 2903 |
|
| 2904 |
FUNCTION {bbl.third} |
| 2905 |
%<!ord>{ "\bblthird{}" } |
| 2906 |
%<ord>{ "\bblthirdo{}" } |
| 2907 |
|
| 2908 |
FUNCTION {bbl.fourth} |
| 2909 |
%<!ord>{ "\bblfourth{}" } |
| 2910 |
%<ord>{ "\bblfourtho{}" } |
| 2911 |
|
| 2912 |
FUNCTION {bbl.fifth} |
| 2913 |
%<!ord>{ "\bblfifth{}" } |
| 2914 |
%<ord>{ "\bblfiftho{}" } |
| 2915 |
|
| 2916 |
FUNCTION {bbl.st} |
| 2917 |
{ "\bblst{}" } |
| 2918 |
|
| 2919 |
FUNCTION {bbl.nd} |
| 2920 |
{ "\bblnd{}" } |
| 2921 |
|
| 2922 |
FUNCTION {bbl.rd} |
| 2923 |
{ "\bblrd{}" } |
| 2924 |
|
| 2925 |
FUNCTION {bbl.th} |
| 2926 |
{ "\bblth{}" } |
| 2927 |
|
| 2928 |
%</!xedn> |
| 2929 |
MACRO {jan} {"\bbljan{}"} |
| 2930 |
|
| 2931 |
MACRO {feb} {"\bblfeb{}"} |
| 2932 |
|
| 2933 |
MACRO {mar} {"\bblmar{}"} |
| 2934 |
|
| 2935 |
MACRO {apr} {"\bblapr{}"} |
| 2936 |
|
| 2937 |
MACRO {may} {"\bblmay{}"} |
| 2938 |
|
| 2939 |
MACRO {jun} {"\bbljun{}"} |
| 2940 |
|
| 2941 |
MACRO {jul} {"\bbljul{}"} |
| 2942 |
|
| 2943 |
MACRO {aug} {"\bblaug{}"} |
| 2944 |
|
| 2945 |
MACRO {sep} {"\bblsep{}"} |
| 2946 |
|
| 2947 |
MACRO {oct} {"\bbloct{}"} |
| 2948 |
|
| 2949 |
MACRO {nov} {"\bblnov{}"} |
| 2950 |
|
| 2951 |
MACRO {dec} {"\bbldec{}"} |
| 2952 |
|
| 2953 |
%</babel> |
| 2954 |
% \end{macrocode} |
| 2955 |
% |
| 2956 |
% \begin{macro}{`eng.ord'} |
| 2957 |
% This function adds English endings for ordinals 1, 2, 3. However, if |
| 2958 |
% the second last digit is 1, then the ending is `th' for all last digits. |
| 2959 |
% So far, all other languages included do not have this problem, and it is |
| 2960 |
% sufficient to add the \textsl{th} equivalent. This might change with further |
| 2961 |
% languages. |
| 2962 |
% |
| 2963 |
% This function must be included with \texttt{babel} too, since that includes |
| 2964 |
% English. This means that the language definition files must also provide |
| 2965 |
% for |\bblst|, |\bblnd|, and |\bblrd|, setting them all equal to |\bblth|. |
| 2966 |
% |
| 2967 |
% \begin{macrocode} |
| 2968 |
%<*(english|!exlang)&!xedn> |
| 2969 |
FUNCTION {eng.ord} |
| 2970 |
{ duplicate$ "1" swap$ * |
| 2971 |
#-2 #1 substring$ "1" = |
| 2972 |
{ bbl.th * } |
| 2973 |
{ duplicate$ #-1 #1 substring$ |
| 2974 |
duplicate$ "1" = |
| 2975 |
{ pop$ bbl.st * } |
| 2976 |
{ duplicate$ "2" = |
| 2977 |
{ pop$ bbl.nd * } |
| 2978 |
{ "3" = |
| 2979 |
{ bbl.rd * } |
| 2980 |
{ bbl.th * } |
| 2981 |
if$ |
| 2982 |
} |
| 2983 |
if$ |
| 2984 |
} |
| 2985 |
if$ |
| 2986 |
} |
| 2987 |
if$ |
| 2988 |
} |
| 2989 |
|
| 2990 |
%</(english|!exlang)&!xedn> |
| 2991 |
% \end{macrocode} |
| 2992 |
% \end{macro} |
| 2993 |
% |
| 2994 |
% \begin{macrocode} |
| 2995 |
%</!exlang> |
| 2996 |
% \end{macrocode} |
| 2997 |
% |
| 2998 |
% \begin{macrocode} |
| 2999 |
%</!tail> |
| 3000 |
% \end{macrocode} |
| 3001 |
% |
| 3002 |
% \begin{macrocode} |
| 3003 |
%<*!head> |
| 3004 |
% \end{macrocode} |
| 3005 |
% \end{macro} |
| 3006 |
% |
| 3007 |
% \begin{macrocode} |
| 3008 |
%<*!jabr> |
| 3009 |
MACRO {acmcs} {"ACM Computing Surveys"} |
| 3010 |
|
| 3011 |
MACRO {acta} {"Acta Informatica"} |
| 3012 |
|
| 3013 |
MACRO {cacm} {"Communications of the ACM"} |
| 3014 |
|
| 3015 |
MACRO {ibmjrd} {"IBM Journal of Research and Development"} |
| 3016 |
|
| 3017 |
MACRO {ibmsj} {"IBM Systems Journal"} |
| 3018 |
|
| 3019 |
MACRO {ieeese} {"IEEE Transactions on Software Engineering"} |
| 3020 |
|
| 3021 |
MACRO {ieeetc} {"IEEE Transactions on Computers"} |
| 3022 |
|
| 3023 |
MACRO {ieeetcad} |
| 3024 |
{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} |
| 3025 |
|
| 3026 |
MACRO {ipl} {"Information Processing Letters"} |
| 3027 |
|
| 3028 |
MACRO {jacm} {"Journal of the ACM"} |
| 3029 |
|
| 3030 |
MACRO {jcss} {"Journal of Computer and System Sciences"} |
| 3031 |
|
| 3032 |
MACRO {scp} {"Science of Computer Programming"} |
| 3033 |
|
| 3034 |
MACRO {sicomp} {"SIAM Journal on Computing"} |
| 3035 |
|
| 3036 |
MACRO {tocs} {"ACM Transactions on Computer Systems"} |
| 3037 |
|
| 3038 |
MACRO {tods} {"ACM Transactions on Database Systems"} |
| 3039 |
|
| 3040 |
MACRO {tog} {"ACM Transactions on Graphics"} |
| 3041 |
|
| 3042 |
MACRO {toms} {"ACM Transactions on Mathematical Software"} |
| 3043 |
|
| 3044 |
MACRO {toois} {"ACM Transactions on Office Information Systems"} |
| 3045 |
|
| 3046 |
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} |
| 3047 |
|
| 3048 |
MACRO {tcs} {"Theoretical Computer Science"} |
| 3049 |
%</!jabr> |
| 3050 |
% \end{macrocode} |
| 3051 |
% |
| 3052 |
% Journal abbreviations have been revised from the original Patashnik |
| 3053 |
% ones with help of Conrado Badenas and the IUA recommendations. |
| 3054 |
% \begin{macrocode} |
| 3055 |
%<*jabr> |
| 3056 |
MACRO {acmcs} {"ACM Comput. Surv."} |
| 3057 |
|
| 3058 |
MACRO {acta} {"Acta Inf."} |
| 3059 |
|
| 3060 |
MACRO {cacm} {"Commun. ACM"} |
| 3061 |
|
| 3062 |
MACRO {ibmjrd} {"IBM J. Res. Dev."} |
| 3063 |
|
| 3064 |
MACRO {ibmsj} {"IBM Syst.~J."} |
| 3065 |
|
| 3066 |
MACRO {ieeese} {"IEEE Trans. Software Eng."} |
| 3067 |
|
| 3068 |
MACRO {ieeetc} {"IEEE Trans. Comput."} |
| 3069 |
|
| 3070 |
MACRO {ieeetcad} |
| 3071 |
{"IEEE Trans. Comput. Aid. Des."} |
| 3072 |
|
| 3073 |
MACRO {ipl} {"Inf. Process. Lett."} |
| 3074 |
|
| 3075 |
MACRO {jacm} {"J.~ACM"} |
| 3076 |
|
| 3077 |
MACRO {jcss} {"J.~Comput. Syst. Sci."} |
| 3078 |
|
| 3079 |
MACRO {scp} {"Sci. Comput. Program."} |
| 3080 |
|
| 3081 |
MACRO {sicomp} {"SIAM J. Comput."} |
| 3082 |
|
| 3083 |
MACRO {tocs} {"ACM Trans. Comput. Syst."} |
| 3084 |
|
| 3085 |
MACRO {tods} {"ACM Trans. Database Syst."} |
| 3086 |
|
| 3087 |
MACRO {tog} {"ACM Trans. Graphic."} |
| 3088 |
|
| 3089 |
MACRO {toms} {"ACM Trans. Math. Software"} |
| 3090 |
|
| 3091 |
MACRO {toois} {"ACM Trans. Office Inf. Syst."} |
| 3092 |
|
| 3093 |
MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} |
| 3094 |
|
| 3095 |
MACRO {tcs} {"Theor. Comput. Sci."} |
| 3096 |
|
| 3097 |
%</jabr> |
| 3098 |
% \end{macrocode} |
| 3099 |
% |
| 3100 |
% \begin{macro}{`bibinfo.check'} |
| 3101 |
% Define functions that encapsulate the argument |
| 3102 |
% in a \TeX\ macro that allows for further processing when the |
| 3103 |
% bibliography is processed, or allows for a separate computer |
| 3104 |
% program to parse the |\bibitem| contents. |
| 3105 |
% |
| 3106 |
% The following table summarizes how each of the \btx{} entries |
| 3107 |
% is accessed for output; these are the points where |
| 3108 |
% the \texttt{format.bibinfo} or \texttt{bibinfo.check} functions |
| 3109 |
% are called. |
| 3110 |
% \subsubsection*{Trapped via \texttt{format.bibinfo}} |
| 3111 |
% \begin{description} |
| 3112 |
% \item[ \texttt{author} ]\texttt{format.names} |
| 3113 |
% \item[ \texttt{collaboration} ]\texttt{format.authors} |
| 3114 |
% \item[ \texttt{editor} ]\texttt{format.editors} (\texttt{book}, \texttt{inbook}, \texttt{proceedings}), \texttt{format.names.ed} (\texttt{format.in.ed.booktitle}) |
| 3115 |
% \item[ \texttt{eid} ]\texttt{format.journal.eid} (\texttt{format.vol.num.pages}, article) checks the output from \texttt{format.journal.pages} |
| 3116 |
% \item[ \texttt{isbn} ]\texttt{format.isbn} |
| 3117 |
% \item[ \texttt{issn} ]\texttt{format.issn} |
| 3118 |
% \item[ \texttt{journal} ]\texttt{format.article.crossref}, article |
| 3119 |
% \item[ \texttt{numpages} ]\texttt{format.journal.eid} |
| 3120 |
% \item[ \texttt{organization} ]\texttt{format.organization.address} (\texttt{inproceedings}, \texttt{proceedings}), \texttt{manual} |
| 3121 |
% \item[ \texttt{pages} ]\texttt{format.book}.pages (\texttt{book}, \texttt{booklet}), \texttt{format.pages} (\texttt{format.journal.pages}, \texttt{format.chapter.pages}, \texttt{article}, \texttt{inbook}, \texttt{incollection}, \texttt{inproceedings}) |
| 3122 |
% \item[ \texttt{publisher} ]\texttt{format.publisher.address} (like \texttt{output.check}, \texttt{inproceedings}, \texttt{proceedings}) |
| 3123 |
% \item[ \texttt{title} ]\texttt{format.title}, \texttt{format.btitle}, \texttt{misc}, \texttt{presort}, \texttt{bib.sort.order} |
| 3124 |
% \item[ \texttt{volume} ]\texttt{format.bvolume}, \texttt{format.vol.num.pages}, \texttt{format.book.crossref} |
| 3125 |
% \item[ \texttt{year} ]in optional argument of \texttt{\char`\\bibitem}, \texttt{format.date} (as part of date), \texttt{format.year}, \texttt{format.org.or.pub} |
| 3126 |
% \item[ \texttt{booktitle} ]\texttt{format.in.ed.booktitle} (\texttt{incollection}, \texttt{inproceedings}), \texttt{format.incoll.inproc.crossref} |
| 3127 |
% \item[ \texttt{howpublished} ]\texttt{booklet}, \texttt{misc} |
| 3128 |
% \item[ \texttt{edition} ]\texttt{convert.edition.format.edition} |
| 3129 |
% \item[ \texttt{institution} ]\texttt{techreport} |
| 3130 |
% \item[ \texttt{school} ]\texttt{mastersthesis}, \texttt{phdthesis} |
| 3131 |
% \item[ \texttt{address} ]\texttt{format.org.or.pub}, \texttt{booklet}, \texttt{manual}, \texttt{mastersthesis}, \texttt{phdthesis}, \texttt{techreport} |
| 3132 |
% \item[ \texttt{chapter} ]\texttt{format.chapter.pages} |
| 3133 |
% \item[ \texttt{number} ]\texttt{format.number.series}, \texttt{format.vol.num.pages}, \texttt{format.tr.number} |
| 3134 |
% \item[ \texttt{series} ]\texttt{format.bvolume}, \texttt{format.number.series}, \texttt{format.book.crossref} |
| 3135 |
% \item[ \texttt{type} ]\texttt{format.chapter.pages}, \texttt{format.thesis.type}, \texttt{format.tr.number} |
| 3136 |
% \item[ \texttt{month} ]\texttt{format.date} |
| 3137 |
% \item[ \texttt{note} ]\texttt{format.note} |
| 3138 |
% \item[ \texttt{annote} ]\texttt{fin.entry} |
| 3139 |
% \end{description} |
| 3140 |
% |
| 3141 |
% \subsubsection*{Encapsulated via \texttt{\char`\\url}} |
| 3142 |
% \begin{description} |
| 3143 |
% \item[ \texttt{url} ]\texttt{format.url} (\texttt{\char`\\harvardurl}, \texttt{\char`\\url}), \texttt{format.url} (\texttt{\char`\\url}), \texttt{format.note} (\texttt{\char`\\url}) |
| 3144 |
% \end{description} |
| 3145 |
% |
| 3146 |
% \subsubsection*{Encapsulated via \texttt{\char`\\doi}} |
| 3147 |
% \begin{description} |
| 3148 |
% \item[ \texttt{doi} ]\texttt{format.doi} (\texttt{\char`\\doi}) |
| 3149 |
% \end{description} |
| 3150 |
% |
| 3151 |
% \subsubsection*{Encapsulated via \texttt{\char`\\eprint}} |
| 3152 |
% \begin{description} |
| 3153 |
% \item[ \texttt{eprint} ]\texttt{format.eprint} |
| 3154 |
% \item[ \texttt{archive} ]\texttt{format.eprint} |
| 3155 |
% \end{description} |
| 3156 |
% |
| 3157 |
% \subsubsection*{Not encapsulated:} |
| 3158 |
% \begin{description} |
| 3159 |
% \item[ \texttt{key} ]cite key |
| 3160 |
% \item[ \texttt{language} ]operand of \texttt{\char`\\selectlanguage} |
| 3161 |
% \end{description} |
| 3162 |
% |
| 3163 |
% \subsubsection*{\texttt{bibinfo} tag, but not a \btx{} field} |
| 3164 |
% \begin{description} |
| 3165 |
% \item[ \texttt{date} ]\texttt{format.date} |
| 3166 |
% \end{description} |
| 3167 |
% |
| 3168 |
% Provides robust access to fields, checking against \texttt{missing\$} |
| 3169 |
% and \texttt{empty\$}. A \dtx{} option allows giving |
| 3170 |
% a warning if either is the case. |
| 3171 |
% |
| 3172 |
% If not, it encapsulates the argument in a \TeX\ macro |\bibinfo|. |
| 3173 |
% The encapsulation is enabled by the \texttt{bibinfo} \dtx{} option: |
| 3174 |
% if turned off, it simply pops the unneeded object. |
| 3175 |
% |
| 3176 |
% \texttt{field} \texttt{string} \texttt{->} \texttt{encapsulated-field} |
| 3177 |
% |
| 3178 |
% \texttt{empty} \texttt{string} \texttt{->} \texttt{empty} |
| 3179 |
% Side effect: warning. |
| 3180 |
% \begin{macrocode} |
| 3181 |
FUNCTION {bibinfo.check} |
| 3182 |
{ swap$ |
| 3183 |
duplicate$ missing$ |
| 3184 |
{ |
| 3185 |
%<bibinfo.warning> swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ |
| 3186 |
%<!bibinfo.warning> pop$ pop$ |
| 3187 |
"" |
| 3188 |
} |
| 3189 |
{ duplicate$ empty$ |
| 3190 |
{ |
| 3191 |
%<bibinfo.warning> swap$ "empty " swap$ * " in " * cite$ * warning$ |
| 3192 |
%<!bibinfo.warning> swap$ pop$ |
| 3193 |
} |
| 3194 |
{ swap$ |
| 3195 |
%<bibinfo> "\bibinfo{" swap$ * "}{" * swap$ * "}" * |
| 3196 |
%<!bibinfo> pop$ |
| 3197 |
} |
| 3198 |
if$ |
| 3199 |
} |
| 3200 |
if$ |
| 3201 |
} |
| 3202 |
% \end{macrocode} |
| 3203 |
% \end{macro} |
| 3204 |
% |
| 3205 |
% \begin{macro}{`bibinfo.warn'} |
| 3206 |
% Replaces \texttt{output.check} |
| 3207 |
% with \texttt{bibinfo.warn} followed by \texttt{output}. |
| 3208 |
% |
| 3209 |
% \texttt{field} \texttt{string} \texttt{->} \texttt{encapsulated-field} |
| 3210 |
% |
| 3211 |
% \texttt{empty} \texttt{string} \texttt{->} \texttt{empty} |
| 3212 |
% |
| 3213 |
% Side effect: warning if the field is empty. |
| 3214 |
% Note: if the \dtx{} option \texttt{bibinfo} is not in effect, |
| 3215 |
% then no encapsulation is done. |
| 3216 |
% \begin{macrocode} |
| 3217 |
FUNCTION {bibinfo.warn} |
| 3218 |
{ swap$ |
| 3219 |
duplicate$ missing$ |
| 3220 |
{ |
| 3221 |
swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ |
| 3222 |
"" |
| 3223 |
} |
| 3224 |
{ duplicate$ empty$ |
| 3225 |
{ |
| 3226 |
swap$ "empty " swap$ * " in " * cite$ * warning$ |
| 3227 |
} |
| 3228 |
{ swap$ |
| 3229 |
%<bibinfo> "\bibinfo{" swap$ * "}{" * swap$ * "}" * |
| 3230 |
%<!bibinfo> pop$ |
| 3231 |
} |
| 3232 |
if$ |
| 3233 |
} |
| 3234 |
if$ |
| 3235 |
} |
| 3236 |
% \end{macrocode} |
| 3237 |
% \end{macro} |
| 3238 |
% |
| 3239 |
% \begin{macro}{`format.eprint'} |
| 3240 |
% The access function for the \texttt{eprint} field. |
| 3241 |
% |
| 3242 |
% If the \texttt{bibinfo} \dtx{} option is selected, then this function |
| 3243 |
% encapsulates the argument in a \TeX\ macro |\eprint|. |
| 3244 |
% |
| 3245 |
% \texttt{->} \texttt{encapsulated-URL} |
| 3246 |
% \begin{macrocode} |
| 3247 |
%<*eprint> |
| 3248 |
FUNCTION {format.eprint} |
| 3249 |
{ eprint duplicate$ empty$ |
| 3250 |
'skip$ |
| 3251 |
{ "\eprint" |
| 3252 |
archive empty$ |
| 3253 |
'skip$ |
| 3254 |
{ "[" * archive * "]" * } |
| 3255 |
if$ |
| 3256 |
"{" * swap$ * "}" * |
| 3257 |
} |
| 3258 |
if$ |
| 3259 |
} |
| 3260 |
%</eprint> |
| 3261 |
% \end{macrocode} |
| 3262 |
% \end{macro} |
| 3263 |
% |
| 3264 |
% \begin{macro}{`write.url'} |
| 3265 |
% This function taken over from \texttt{agsm.sty}, the main \texttt{harvard} |
| 3266 |
% bib style. For non-Harvard styles that want to add the URL on a new line |
| 3267 |
% after the reference, use this function too, but defined slightly |
| 3268 |
% differently. |
| 3269 |
% \begin{macrocode} |
| 3270 |
%<*(harnm|url-nl)&!revdata> |
| 3271 |
FUNCTION {write.url} |
| 3272 |
%<*!html> |
| 3273 |
{ |
| 3274 |
%<*url-doi&url> |
| 3275 |
doi empty$ |
| 3276 |
{ url } |
| 3277 |
{ "http://dx.doi.org/" doi * } |
| 3278 |
if$ |
| 3279 |
%</url-doi&url> |
| 3280 |
%<!url-doi|!url> url |
| 3281 |
duplicate$ empty$ |
| 3282 |
{ pop$ } |
| 3283 |
%<harnm> { "\newline\harvardurl{" swap$ * "}" * write$ newline$ } |
| 3284 |
%<!harnm&url-nl> { "\newline\urlprefix\url{" swap$ * "}" * write$ newline$ } |
| 3285 |
if$ |
| 3286 |
} |
| 3287 |
%</!html> |
| 3288 |
%<*html> |
| 3289 |
{ |
| 3290 |
%<*url-doi&url> |
| 3291 |
doi empty$ |
| 3292 |
{ url } |
| 3293 |
{ "http://dx.doi.org/" doi * } |
| 3294 |
if$ |
| 3295 |
%</url-doi&url> |
| 3296 |
%<!url-doi|!url> url |
| 3297 |
duplicate$ empty$ |
| 3298 |
{ pop$ } |
| 3299 |
{ duplicate$ "<br><a href=" quote$ * swap$ * quote$ |
| 3300 |
* ">" * swap$ * "</a>" * write$ newline$ } |
| 3301 |
if$ |
| 3302 |
} |
| 3303 |
%</html> |
| 3304 |
|
| 3305 |
%</(harnm|url-nl)&!revdata> |
| 3306 |
% \end{macrocode} |
| 3307 |
% \end{macro} |
| 3308 |
% |
| 3309 |
% \begin{macro}{`format.url'} |
| 3310 |
% This function is reworked for \texttt{\filename} to provide a |
| 3311 |
% cleaner URL for DOIs. The definition of \cmd{\urldoi} is written in |
| 3312 |
% the \texttt{.bbl} file by the function \texttt{begin.bib}. When the |
| 3313 |
% package \pkg{hyperref} is loaded, the \meta{doi} is a hyperlink to |
| 3314 |
% \texttt{https://doi.org/\meta{doi}}. |
| 3315 |
% \begin{macrocode} |
| 3316 |
%<*(url-blk&!harnm)|revdata> |
| 3317 |
FUNCTION {format.url} |
| 3318 |
{ |
| 3319 |
%<url-doi&url> doi empty$ |
| 3320 |
%<url-doi&url> { |
| 3321 |
url |
| 3322 |
duplicate$ empty$ |
| 3323 |
{ pop$ "" } |
| 3324 |
%<!html> { "\urlprefix\url{" swap$ * "}" * } |
| 3325 |
%<html> { |
| 3326 |
%<html> duplicate$ "<a href=" quote$ * swap$ * quote$ * |
| 3327 |
%<html> ">" * swap$ * "</a>" * |
| 3328 |
%<html> } |
| 3329 |
if$ |
| 3330 |
%<*url-doi&url> |
| 3331 |
} |
| 3332 |
{ |
| 3333 |
doi |
| 3334 |
%<!html> "\doiprefix\urldoi{" swap$ * "}" * |
| 3335 |
%<html> duplicate$ "doi:<a href=" quote$ * "https://doi.org/" * |
| 3336 |
%<html> swap$ * quote$ * ">" * swap$ * "</a>" * |
| 3337 |
} |
| 3338 |
if$ |
| 3339 |
%</url-doi&url> |
| 3340 |
} |
| 3341 |
|
| 3342 |
%</(url-blk&!harnm)|revdata> |
| 3343 |
% \end{macrocode} |
| 3344 |
% \end{macro} |
| 3345 |
% |
| 3346 |
% \begin{macro}{`check.speaker'} |
| 3347 |
% The \texttt{presentation} type uses the \texttt{key} entry to indicate which |
| 3348 |
% author is the speaker, as the sequence number in the author list. The speaker's |
| 3349 |
% name is put into a different font, depending on the extra option. If no font |
| 3350 |
% is specified, all names are the same. |
| 3351 |
% \begin{macrocode} |
| 3352 |
INTEGERS { nameptr namesleft numnames } |
| 3353 |
|
| 3354 |
%<*pres-bf|pres-it|pres-sc> |
| 3355 |
FUNCTION {check.speaker} |
| 3356 |
{ key empty$ 'skip$ |
| 3357 |
{ key nameptr int.to.str$ = |
| 3358 |
{ |
| 3359 |
%<pres-bf> bolden |
| 3360 |
%<pres-it&!pres-bf> emphasize |
| 3361 |
%<pres-sc&!pres-it&!pres-bf> scaps |
| 3362 |
} |
| 3363 |
'skip$ |
| 3364 |
if$ |
| 3365 |
} |
| 3366 |
if$ |
| 3367 |
} |
| 3368 |
|
| 3369 |
%</pres-bf|pres-it|pres-sc> |
| 3370 |
% \end{macrocode} |
| 3371 |
% \end{macro} |
| 3372 |
|
| 3373 |
% \begin{macro}{`format.names'} |
| 3374 |
% The \texttt{harvard} package now (version 2.0.3, for \LaTeXe) uses |
| 3375 |
% |\harvardand| in place of the word \textsl{and} so that it can be changed |
| 3376 |
% at run time. This is allowed for with the option \texttt{harnm}, which |
| 3377 |
% need not be used only with the \texttt{har} option. |
| 3378 |
% This seems like a useless feature for \texttt{.bst} files made from |
| 3379 |
% this multilanguage source. However, it is included anyway, which means |
| 3380 |
% if \texttt{harnm} option selected, one must redefine |\harvardand| |
| 3381 |
% in the document for the language being used. |
| 3382 |
% |
| 3383 |
% The location of the junior part for reversed name is not obvious. Prior |
| 3384 |
% to version 4.0, I always had it attached to the last name, as |
| 3385 |
% Smith, Jr, John, put it probably is better as Smith, John, Jr. For the |
| 3386 |
% AGU \texttt{nm-rev1} I always did it this way, probably because I had a |
| 3387 |
% good AGU example to follow. Dilemma: do I just change them all or add an |
| 3388 |
% option to do it? The option will maintain consistency with older |
| 3389 |
% versions, but this could also be considered a bug fix rather than a new |
| 3390 |
% feature. Solution: use the option, since I have found other \texttt{.bst} |
| 3391 |
% files from Beebe and Harvard that put junior between surname and first |
| 3392 |
% name. |
| 3393 |
% |
| 3394 |
% |bibinfo| is a variable used to store a string telling it whether the |
| 3395 |
% names being formatted are authors or editors, since this function is called |
| 3396 |
% for both purposes. Every call to this function must push the string onto the stack |
| 3397 |
% just before the call. |
| 3398 |
% \begin{macrocode} |
| 3399 |
STRINGS { bibinfo} |
| 3400 |
|
| 3401 |
% \end{macrocode} |
| 3402 |
% |
| 3403 |
% Stack note: if the names argument is a non-nil list, this function returns |
| 3404 |
% one object on the stack, the formatted list of names. |
| 3405 |
% |
| 3406 |
% \texttt{names`string} \texttt{bibinfo`string} \texttt{->} \texttt{author-list`string} |
| 3407 |
% \begin{macrocode} |
| 3408 |
FUNCTION {format.names} |
| 3409 |
{ 'bibinfo := |
| 3410 |
duplicate$ empty$ 'skip$ { |
| 3411 |
's := |
| 3412 |
"" 't := |
| 3413 |
#1 'nameptr := |
| 3414 |
s num.names$ 'numnames := |
| 3415 |
numnames 'namesleft := |
| 3416 |
{ namesleft #0 > } |
| 3417 |
{ s nameptr |
| 3418 |
% \end{macrocode} |
| 3419 |
% Here is the author formatting when the names are not set in any special |
| 3420 |
% font, or when the entire name set in a single special font. |
| 3421 |
% \begin{macrocode} |
| 3422 |
%<*!(nmft&(fnm-rm|fnm-def))> |
| 3423 |
%<*!nm-rev1&!nm-revv1> |
| 3424 |
%<nm-init> "{f.~}{vv~}{ll}{, jj}" |
| 3425 |
%<*!nm-init> |
| 3426 |
%<nm-rev&!jnrlst> "{vv~}{ll}{, jj}{, f.}" |
| 3427 |
%<nm-rev&jnrlst> "{vv~}{ll}{, f.}{, jj}" |
| 3428 |
%<*!nm-rev> |
| 3429 |
%<nm-rv&!jnrlst> "{vv~}{ll}{ jj}{ f{~}}" |
| 3430 |
%<nm-rv&jnrlst> "{vv~}{ll}{ f{~}}{ jj}" |
| 3431 |
%<*!nm-rv> |
| 3432 |
%<nm-rvx&!jnrlst> "{vv~}{ll}{ jj}{ f{}}" |
| 3433 |
%<nm-rvx&jnrlst> "{vv~}{ll}{ f{}}{ jj}" |
| 3434 |
%<*!nm-rvx> |
| 3435 |
%<nm-rvcx&!jnrlst> "{vv~}{ll}{, jj}{, f{}}" |
| 3436 |
%<nm-rvcx&jnrlst> "{vv~}{ll}{, f{}}{, jj}" |
| 3437 |
%<*!nm-rvcx> |
| 3438 |
%<nm-rvv&!jnrlst> "{vv~}{ll}{ jj}{ f{.}.}" |
| 3439 |
%<nm-rvv&jnrlst> "{vv~}{ll}{ f{.}.}{ jj}" |
| 3440 |
%<*!nm-rvv> |
| 3441 |
%<nm-rvvc&!jnrlst> "{vv~}{ll}{, jj}{, f{.}.}" |
| 3442 |
%<nm-rvvc&jnrlst> "{vv~}{ll}{, f{.}.}{, jj}" |
| 3443 |
%<*!nm-rvvc> |
| 3444 |
%<nm-revf&!jnrlst> "{vv~}{ll}{, jj}{, ff}" |
| 3445 |
%<nm-revf&jnrlst> "{vv~}{ll}{, ff}{, jj}" |
| 3446 |
%<*!nm-revf> |
| 3447 |
"{ff~}{vv~}{ll}{, jj}" |
| 3448 |
%</!nm-revf> |
| 3449 |
%</!nm-rvvc> |
| 3450 |
%</!nm-rvv> |
| 3451 |
%</!nm-rvcx> |
| 3452 |
%</!nm-rvx> |
| 3453 |
%</!nm-rv> |
| 3454 |
%</!nm-rev> |
| 3455 |
%</!nm-init> |
| 3456 |
%</!nm-rev1&!nm-revv1> |
| 3457 |
%<*nm-rev1> |
| 3458 |
duplicate$ #1 > |
| 3459 |
{ "{f.~}{vv~}{ll}{, jj}" } |
| 3460 |
%<!jnrlst> { "{vv~}{ll}{, jj}{, f.}" } |
| 3461 |
%<jnrlst> { "{vv~}{ll}{, f.}{, jj}" } |
| 3462 |
if$ |
| 3463 |
%</nm-rev1> |
| 3464 |
%<*!nm-rev1&nm-revv1> |
| 3465 |
duplicate$ #1 > |
| 3466 |
{ "{ff~}{vv~}{ll}{, jj}" } |
| 3467 |
%<!jnrlst> { "{vv~}{ll}{, jj}{, ff}" } |
| 3468 |
%<jnrlst> { "{vv~}{ll}{, ff}{, jj}" } |
| 3469 |
if$ |
| 3470 |
%</!nm-rev1&nm-revv1> |
| 3471 |
format.name$ |
| 3472 |
%<nm-rv|nm-rvx> remove.dots |
| 3473 |
%<nmft&nmand-rm> bib.name.font |
| 3474 |
%</!(nmft&(fnm-rm|fnm-def))> |
| 3475 |
% \end{macrocode} |
| 3476 |
% Here is the author formatting when the first and last names are |
| 3477 |
% set in (possibly different) special fonts. |
| 3478 |
% |
| 3479 |
% The junior part is optionally between the reversed names, or after them. |
| 3480 |
% \begin{macrocode} |
| 3481 |
%<*nmft&(fnm-rm|fnm-def)> |
| 3482 |
%<*!nm-rev1&!nm-revv1> |
| 3483 |
%<*nm-init> |
| 3484 |
"{f.}" format.name$ duplicate$ empty$ 'skip$ |
| 3485 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3486 |
if$ |
| 3487 |
s nameptr |
| 3488 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3489 |
s nameptr |
| 3490 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3491 |
{ bib.fname.font ", " swap$ * } |
| 3492 |
if$ |
| 3493 |
%</nm-init> |
| 3494 |
%<*!nm-init> |
| 3495 |
%<*nm-rev> |
| 3496 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3497 |
s nameptr |
| 3498 |
%<!jnrlst> "{jj, }{f.}" |
| 3499 |
%<jnrlst> "{f.}{, jj}" |
| 3500 |
format.name$ duplicate$ empty$ 'skip$ |
| 3501 |
{ bib.fname.font ", " swap$ * } |
| 3502 |
if$ |
| 3503 |
%</nm-rev> |
| 3504 |
%<*!nm-rev> |
| 3505 |
%<*nm-rv> |
| 3506 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3507 |
s nameptr |
| 3508 |
%<!jnrlst> "{jj }{f{~}}" |
| 3509 |
%<jnrlst> "{f{~}}{ jj}" |
| 3510 |
format.name$ duplicate$ empty$ 'skip$ |
| 3511 |
{ remove.dots bib.fname.font " " swap$ * } |
| 3512 |
if$ |
| 3513 |
%</nm-rv> |
| 3514 |
%<*!nm-rv> |
| 3515 |
%<*nm-rvx> |
| 3516 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3517 |
s nameptr |
| 3518 |
%<!jnrlst> "{jj }{f{}}" |
| 3519 |
%<jnrlst> "{f{}}{ jj}" |
| 3520 |
format.name$ duplicate$ empty$ 'skip$ |
| 3521 |
{ remove.dots bib.fname.font " " swap$ * } |
| 3522 |
if$ |
| 3523 |
%</nm-rvx> |
| 3524 |
%<*!nm-rvx> |
| 3525 |
%<*nm-rvcx> |
| 3526 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3527 |
s nameptr |
| 3528 |
%<!jnrlst> "{jj, }{f{}}" |
| 3529 |
%<jnrlst> "{f{}}{, jj}" |
| 3530 |
format.name$ duplicate$ empty$ 'skip$ |
| 3531 |
{ remove.dots bib.fname.font ", " swap$ * } |
| 3532 |
if$ |
| 3533 |
%</nm-rvcx> |
| 3534 |
%<*!nm-rvcx> |
| 3535 |
%<*nm-rvv> |
| 3536 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3537 |
s nameptr |
| 3538 |
%<!jnrlst> "{jj }{f{.}.}" |
| 3539 |
%<jnrlst> "{f{.}.}{ jj}" |
| 3540 |
format.name$ duplicate$ empty$ 'skip$ |
| 3541 |
{ bib.fname.font " " swap$ * } |
| 3542 |
if$ |
| 3543 |
%</nm-rvv> |
| 3544 |
%<*!nm-rvv> |
| 3545 |
%<*nm-rvvc> |
| 3546 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3547 |
s nameptr |
| 3548 |
%<!jnrlst> "{jj, }{f{.}.}" |
| 3549 |
%<jnrlst> "{f{.}.}{, jj}" |
| 3550 |
format.name$ duplicate$ empty$ 'skip$ |
| 3551 |
{ bib.fname.font ", " swap$ * } |
| 3552 |
if$ |
| 3553 |
%</nm-rvvc> |
| 3554 |
%<*!nm-rvvc> |
| 3555 |
%<*nm-revf> |
| 3556 |
"{vv~}{ll}" format.name$ bib.name.font |
| 3557 |
s nameptr |
| 3558 |
%<!jnrlst> "{jj, }{ff}" |
| 3559 |
%<jnrlst> "{ff}{, jj}" |
| 3560 |
format.name$ duplicate$ empty$ 'skip$ |
| 3561 |
{ bib.fname.font ", " swap$ * } |
| 3562 |
if$ |
| 3563 |
%</nm-revf> |
| 3564 |
%<*!nm-revf> |
| 3565 |
"{ff}" format.name$ duplicate$ empty$ 'skip$ |
| 3566 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3567 |
if$ |
| 3568 |
s nameptr |
| 3569 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3570 |
s nameptr |
| 3571 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3572 |
{ bib.fname.font ", " swap$ * } |
| 3573 |
if$ |
| 3574 |
%</!nm-revf> |
| 3575 |
%</!nm-rvvc> |
| 3576 |
%</!nm-rvv> |
| 3577 |
%</!nm-rvcx> |
| 3578 |
%</!nm-rvx> |
| 3579 |
%</!nm-rv> |
| 3580 |
%</!nm-rev> |
| 3581 |
%</!nm-init> |
| 3582 |
%</!nm-rev1&!nm-revv1> |
| 3583 |
%<*nm-rev1> |
| 3584 |
nameptr #1 > |
| 3585 |
{ "{f.}" format.name$ duplicate$ empty$ 'skip$ |
| 3586 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3587 |
if$ |
| 3588 |
s nameptr |
| 3589 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3590 |
s nameptr |
| 3591 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3592 |
{ bib.fname.font ", " swap$ * } |
| 3593 |
if$ |
| 3594 |
} |
| 3595 |
{ "{vv~}{ll}" format.name$ bib.name.font |
| 3596 |
s nameptr |
| 3597 |
%<!jnrlst> "{jj, }{f.}" |
| 3598 |
%<jnrlst> "{f.}{, jj}" |
| 3599 |
format.name$ duplicate$ empty$ 'skip$ |
| 3600 |
{ bib.fname.font ", " swap$ * } |
| 3601 |
if$ |
| 3602 |
} |
| 3603 |
if$ |
| 3604 |
%</nm-rev1> |
| 3605 |
%<*!nm-rev1&nm-revv1> |
| 3606 |
nameptr #1 > |
| 3607 |
{ "{ff}" format.name$ duplicate$ empty$ 'skip$ |
| 3608 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3609 |
if$ |
| 3610 |
s nameptr |
| 3611 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3612 |
s nameptr |
| 3613 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3614 |
{ bib.fname.font ", " swap$ * } |
| 3615 |
if$ |
| 3616 |
} |
| 3617 |
{ "{vv~}{ll}" format.name$ bib.name.font |
| 3618 |
s nameptr |
| 3619 |
%<!jnrlst> "{jj, }{ff}" |
| 3620 |
%<jnrlst> "{ff}{, jj}" |
| 3621 |
format.name$ duplicate$ empty$ 'skip$ |
| 3622 |
{ bib.fname.font ", " swap$ * } |
| 3623 |
if$ |
| 3624 |
} |
| 3625 |
if$ |
| 3626 |
%</!nm-rev1&nm-revv1> |
| 3627 |
* |
| 3628 |
%</nmft&(fnm-rm|fnm-def)> |
| 3629 |
bibinfo bibinfo.check |
| 3630 |
%<*pres-bf|pres-it|pres-sc> |
| 3631 |
type$ "presentation" = |
| 3632 |
{ check.speaker } |
| 3633 |
'skip$ |
| 3634 |
if$ |
| 3635 |
%</pres-bf|pres-it|pres-sc> |
| 3636 |
't := |
| 3637 |
nameptr #1 > |
| 3638 |
{ |
| 3639 |
%<*nmlm> |
| 3640 |
%<m1> nameptr #1 |
| 3641 |
%<m2> nameptr #2 |
| 3642 |
%<m3> nameptr #3 |
| 3643 |
%<m4> nameptr #4 |
| 3644 |
%<m5> nameptr #5 |
| 3645 |
%<m6> nameptr #6 |
| 3646 |
%<m7> nameptr #7 |
| 3647 |
%<m8> nameptr #8 |
| 3648 |
%<m9> nameptr #9 |
| 3649 |
%<m0> nameptr #0 |
| 3650 |
%<m10> #10 + |
| 3651 |
%<m20> #20 + |
| 3652 |
%<m30> #30 + |
| 3653 |
%<m40> #40 + |
| 3654 |
%<m50> #50 + |
| 3655 |
%<m60> #60 + |
| 3656 |
%<m70> #70 + |
| 3657 |
%<m80> #80 + |
| 3658 |
%<m90> #90 + |
| 3659 |
#1 + = |
| 3660 |
%<x1> numnames #1 |
| 3661 |
%<x2> numnames #2 |
| 3662 |
%<x3> numnames #3 |
| 3663 |
%<x4> numnames #4 |
| 3664 |
%<x5> numnames #5 |
| 3665 |
%<x6> numnames #6 |
| 3666 |
%<x7> numnames #7 |
| 3667 |
%<x8> numnames #8 |
| 3668 |
%<x9> numnames #9 |
| 3669 |
%<x0> numnames #0 |
| 3670 |
%<x10> #10 + |
| 3671 |
%<x20> #20 + |
| 3672 |
%<x30> #30 + |
| 3673 |
%<x40> #40 + |
| 3674 |
%<x50> #50 + |
| 3675 |
%<x60> #60 + |
| 3676 |
%<x70> #70 + |
| 3677 |
%<x80> #80 + |
| 3678 |
%<x90> #90 + |
| 3679 |
> and |
| 3680 |
{ "others" 't := |
| 3681 |
#1 'namesleft := } |
| 3682 |
'skip$ |
| 3683 |
if$ |
| 3684 |
%</nmlm> |
| 3685 |
namesleft #1 > |
| 3686 |
%<!aunm-semi&!aunm-sl> { ", " * t * } |
| 3687 |
%<aunm-semi> { "; " * t * } |
| 3688 |
%<aunm-sl&!aunm-semi> { "/ " * t * } |
| 3689 |
{ |
| 3690 |
s nameptr "{ll}" format.name$ duplicate$ "others" = |
| 3691 |
{ 't := } |
| 3692 |
{ pop$ } |
| 3693 |
if$ |
| 3694 |
%<(and-com|xand)&!aunm-semi&!aunm-sl> "," * |
| 3695 |
%<(and-com|xand)&aunm-semi> ";" * |
| 3696 |
%<(and-com|xand)&aunm-sl&!aunm-semi> "/" * |
| 3697 |
%<*!and-xcom&!and-com&!xand> |
| 3698 |
numnames #2 > |
| 3699 |
%<etal-xc> t "others" = not and |
| 3700 |
%<!aunm-semi&!aunm-sl> { "," * } |
| 3701 |
%<aunm-semi> { ";" * } |
| 3702 |
%<aunm-sl&!aunm-semi> { "/" * } |
| 3703 |
'skip$ |
| 3704 |
if$ |
| 3705 |
%</!and-xcom&!and-com&!xand> |
| 3706 |
t "others" = |
| 3707 |
{ |
| 3708 |
%<nmft&!nmand-rm&!(fnm-rm|fnm-def)&(etal-it|etal-rm)> bib.name.font |
| 3709 |
%<*!etal-it> |
| 3710 |
%<nmft&(nmand-rm|(fnm-rm|fnm-def))&!etal-rm> " " * bbl.etal bib.name.font * |
| 3711 |
%<!(nmft&(nmand-rm|(fnm-rm|fnm-def)))|etal-rm> " " * bbl.etal * |
| 3712 |
%</!etal-it> |
| 3713 |
%<etal-it> " " * bbl.etal emphasize * |
| 3714 |
%<nmft&!nmand-rm&!(fnm-rm|fnm-def)&!(etal-it|etal-rm)> bib.name.font |
| 3715 |
} |
| 3716 |
%<*!xand> |
| 3717 |
{ |
| 3718 |
%<*!harnm> |
| 3719 |
%<!amper> bbl.and |
| 3720 |
%<amper> "\&" |
| 3721 |
%</!harnm> |
| 3722 |
%<harnm> "\harvardand{}" |
| 3723 |
%<nmft&!nmand-rm&(fnm-rm|fnm-def)> bib.name.font |
| 3724 |
space.word * t * |
| 3725 |
} |
| 3726 |
%</!xand> |
| 3727 |
%<xand> { " " * t * } |
| 3728 |
if$ |
| 3729 |
} |
| 3730 |
if$ |
| 3731 |
} |
| 3732 |
't |
| 3733 |
if$ |
| 3734 |
nameptr #1 + 'nameptr := |
| 3735 |
namesleft #1 - 'namesleft := |
| 3736 |
} |
| 3737 |
while$ |
| 3738 |
%<*nmft&!nmand-rm&!(fnm-rm|fnm-def)> |
| 3739 |
t "others" = |
| 3740 |
'skip$ |
| 3741 |
{ bib.name.font } |
| 3742 |
if$ |
| 3743 |
%</nmft&!nmand-rm&!(fnm-rm|fnm-def)> |
| 3744 |
} if$ |
| 3745 |
} |
| 3746 |
% \end{macrocode} |
| 3747 |
% \end{macro} |
| 3748 |
% |
| 3749 |
% \begin{macro}{`format.names.ed'} |
| 3750 |
% When editors are used in place of authors to identify the work, the |
| 3751 |
% names are always formatted just like authors'. However, in collections, |
| 3752 |
% where ``edited by'' or ``\emph{names} (editors)'' are given, it is |
| 3753 |
% normal not to reverse the names, even if the authors' are. The option |
| 3754 |
% \texttt{ed-rev} sees to it that editor names are always formatted exactly |
| 3755 |
% like those of authors, being reversed if necessary. |
| 3756 |
% |
| 3757 |
% The option \texttt{ed-au} is identical to \texttt{ed-rev}, but is more |
| 3758 |
% logical. It means editors (in incollections) are formatted exactly like |
| 3759 |
% authors, with all the font, reversing, and number limitations. This is |
| 3760 |
% selected automatically with \texttt{nm-init} and \texttt{nm-} default to save |
| 3761 |
% programming memory. |
| 3762 |
% |
| 3763 |
% The option \texttt{nm-revf} in this case acts the same as the default |
| 3764 |
% when no \texttt{nm-} option given: full names with surname last. Therefore |
| 3765 |
% it is not necessary to test for it at all, since it, like the default, |
| 3766 |
% has the lowest priority: any other \texttt{nm-} option clobbers it. |
| 3767 |
% |
| 3768 |
% The options \texttt{aunm-semi} and \texttt{aunm-sl} will put a semi-colon or |
| 3769 |
% slash between editor names, just as for authors, when \texttt{ed-rev} not |
| 3770 |
% selected, in keeping with the idea that in this case both authors and editors |
| 3771 |
% are to be formatted the same. |
| 3772 |
% |
| 3773 |
% This function either dispatches to \texttt{format.names} or executes code |
| 3774 |
% which is similar. In the latter case, names are always presented first |
| 3775 |
% followed by surname (``last name''); name limit processing (\texttt{nmlm}) is not executed; |
| 3776 |
% and endgame processing differs in being qualified by \texttt{nmfted}. |
| 3777 |
% |
| 3778 |
% Stack note: if the names (second) argument is a non-nil list, this function returns |
| 3779 |
% with one object on the stack, the formatted list of names. |
| 3780 |
% |
| 3781 |
% \texttt{names`string} \texttt{bibinfo`string} \texttt{->} \texttt{author-list`string} |
| 3782 |
% \begin{macrocode} |
| 3783 |
FUNCTION {format.names.ed} |
| 3784 |
{ |
| 3785 |
%<ed-rev|ed-au> format.names |
| 3786 |
%<*!ed-rev&!ed-au> |
| 3787 |
'bibinfo := |
| 3788 |
duplicate$ empty$ 'skip$ { |
| 3789 |
's := |
| 3790 |
"" 't := |
| 3791 |
#1 'nameptr := |
| 3792 |
s num.names$ 'numnames := |
| 3793 |
numnames 'namesleft := |
| 3794 |
{ namesleft #0 > } |
| 3795 |
{ s nameptr |
| 3796 |
% \end{macrocode} |
| 3797 |
% Editor name is handled as a single object, with no separation of first and last name. |
| 3798 |
% \begin{macrocode} |
| 3799 |
%<*!(nmft&nmfted&(fnm-rm|fnm-def))> |
| 3800 |
%<nm-init|nm-rev|nm-rev1> "{f.~}{vv~}{ll}{, jj}" |
| 3801 |
%<*!nm-init&!nm-rev&!nm-rev1> |
| 3802 |
%<nm-revv1> "{ff~}{vv~}{ll}{, jj}" |
| 3803 |
%<*!nm-revv1> |
| 3804 |
%<nm-rv> "{f{~}~}{vv~}{ll}{ jj}" |
| 3805 |
%<*!nm-rv> |
| 3806 |
%<nm-rvx> "{f{}~}{vv~}{ll}{ jj}" |
| 3807 |
%<*!nm-rvx> |
| 3808 |
%<nm-rvcx> "{f{}~}{vv~}{ll}{ jj}" |
| 3809 |
%<*!nm-rvcx> |
| 3810 |
%<nm-rvv|nm-rvvc> "{f{.}.~}{vv~}{ll}{ jj}" |
| 3811 |
%<*!nm-rvv&!nm-rvvc> |
| 3812 |
"{ff~}{vv~}{ll}{, jj}" |
| 3813 |
%</!nm-rvv&!nm-rvvc> |
| 3814 |
%</!nm-rvcx> |
| 3815 |
%</!nm-rvx> |
| 3816 |
%</!nm-rv> |
| 3817 |
%</!nm-revv1> |
| 3818 |
%</!nm-init&!nm-rev&!nm-rev1> |
| 3819 |
format.name$ |
| 3820 |
%<nm-rv|nm-rvx|nm-rvcx> remove.dots |
| 3821 |
%<nmft&nmfted&nmand-rm> bib.name.font |
| 3822 |
%</!(nmft&nmfted&(fnm-rm|fnm-def))> |
| 3823 |
% \end{macrocode} |
| 3824 |
% Editor first and last name handled separately. |
| 3825 |
% \begin{macrocode} |
| 3826 |
%<*(nmft&nmfted&(fnm-rm|fnm-def))> |
| 3827 |
%<*nm-init|nm-rev|nm-rev1> |
| 3828 |
"{f.}" format.name$ duplicate$ empty$ 'skip$ |
| 3829 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3830 |
if$ |
| 3831 |
s nameptr |
| 3832 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3833 |
s nameptr |
| 3834 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3835 |
{ bib.fname.font ", " swap$ * } |
| 3836 |
if$ |
| 3837 |
%</nm-init|nm-rev|nm-rev1> |
| 3838 |
%<*!nm-init&!nm-rev&!nm-rev1> |
| 3839 |
%<*nm-revv1> |
| 3840 |
"{ff}" format.name$ duplicate$ empty$ 'skip$ |
| 3841 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3842 |
if$ |
| 3843 |
s nameptr |
| 3844 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3845 |
s nameptr |
| 3846 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3847 |
{ bib.fname.font ", " swap$ * } |
| 3848 |
if$ |
| 3849 |
%</nm-revv1> |
| 3850 |
%<*!nm-revv1> |
| 3851 |
%<*nm-rv> |
| 3852 |
"{f{~}}" format.name$ duplicate$ empty$ 'skip$ |
| 3853 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3854 |
if$ |
| 3855 |
s nameptr |
| 3856 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3857 |
s nameptr |
| 3858 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3859 |
{ remove.dots bib.fname.font " " swap$ * } |
| 3860 |
if$ |
| 3861 |
%</nm-rv> |
| 3862 |
%<*!nm-rv> |
| 3863 |
%<*nm-rvx|nm-rvcx> |
| 3864 |
"{f{}}" format.name$ duplicate$ empty$ 'skip$ |
| 3865 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3866 |
if$ |
| 3867 |
s nameptr |
| 3868 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3869 |
s nameptr |
| 3870 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3871 |
{ remove.dots bib.fname.font " " swap$ * } |
| 3872 |
if$ |
| 3873 |
%</nm-rvx|nm-rvcx> |
| 3874 |
%<*!nm-rvx&!nm-rvcx> |
| 3875 |
%<*nm-rvv|nm-rvvc> |
| 3876 |
"{f{.}.}" format.name$ duplicate$ empty$ 'skip$ |
| 3877 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3878 |
if$ |
| 3879 |
s nameptr |
| 3880 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3881 |
s nameptr |
| 3882 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3883 |
{ bib.fname.font " " swap$ * } |
| 3884 |
if$ |
| 3885 |
%</nm-rvv|nm-rvvc> |
| 3886 |
%<*!nm-rvv&!nm-rvvc> |
| 3887 |
"{ff}" format.name$ duplicate$ empty$ 'skip$ |
| 3888 |
{ tie.or.space.prefix bib.fname.font swap$ * } |
| 3889 |
if$ |
| 3890 |
s nameptr |
| 3891 |
"{vv~}{ll}" format.name$ bib.name.font * |
| 3892 |
s nameptr |
| 3893 |
"{jj}" format.name$ duplicate$ empty$ 'skip$ |
| 3894 |
{ bib.fname.font ", " swap$ * } |
| 3895 |
if$ |
| 3896 |
%</!nm-rvv&!nm-rvvc> |
| 3897 |
%</!nm-rvx&!nm-rvcx> |
| 3898 |
%</!nm-rv> |
| 3899 |
%</!nm-revv1> |
| 3900 |
%</!nm-init&!nm-rev&!nm-rev1> |
| 3901 |
* |
| 3902 |
%</(nmft&nmfted&(fnm-rm|fnm-def))> |
| 3903 |
bibinfo bibinfo.check |
| 3904 |
't := |
| 3905 |
nameptr #1 > |
| 3906 |
{ |
| 3907 |
namesleft #1 > |
| 3908 |
%<!aunm-semi&!aunm-sl> { ", " * t * } |
| 3909 |
%<aunm-semi> { "; " * t * } |
| 3910 |
%<aunm-sl&!aunm-semi> { "/ " * t * } |
| 3911 |
{ |
| 3912 |
s nameptr "{ll}" format.name$ duplicate$ "others" = |
| 3913 |
{ 't := } |
| 3914 |
{ pop$ } |
| 3915 |
if$ |
| 3916 |
%<(and-com-ed|xand)&!aunm-semi&!aunm-sl> "," * |
| 3917 |
%<(and-com-ed|xand)&aunm-semi> ";" * |
| 3918 |
%<(and-com-ed|xand)&aunm-sl&!aunm-semi> "/" * |
| 3919 |
%<*!and-xcom&!and-com-ed&!xand> |
| 3920 |
numnames #2 > |
| 3921 |
%<etal-xc> t "others" = not and |
| 3922 |
%<!aunm-semi&!aunm-sl> { "," * } |
| 3923 |
%<aunm-semi> { ";" * } |
| 3924 |
%<aunm-sl&!aunm-semi> { "/" * } |
| 3925 |
'skip$ |
| 3926 |
if$ |
| 3927 |
%</!and-xcom&!and-com-ed&!xand> |
| 3928 |
t "others" = |
| 3929 |
{ |
| 3930 |
|
| 3931 |
%<nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)&(etal-it|etal-rm)> bib.name.font |
| 3932 |
%<*!etal-it> |
| 3933 |
%<nmft&nmfted&(nmand-rm|(fnm-rm|fnm-def))&!etal-rm> " " * bbl.etal bib.name.font * |
| 3934 |
%<!(nmft&nmfted&(nmand-rm|(fnm-rm|fnm-def)))|etal-rm> " " * bbl.etal * |
| 3935 |
%</!etal-it> |
| 3936 |
%<etal-it> " " * bbl.etal emphasize * |
| 3937 |
%<nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)&!(etal-it|etal-rm)> bib.name.font |
| 3938 |
} |
| 3939 |
%<*!xand> |
| 3940 |
{ |
| 3941 |
%<*!harnm> |
| 3942 |
%<!amper> bbl.and |
| 3943 |
%<amper> "\&" |
| 3944 |
%</!harnm> |
| 3945 |
%<harnm> "\harvardand{}" |
| 3946 |
%<nmft&nmfted&!nmand-rm&(fnm-rm|fnm-def)> bib.name.font |
| 3947 |
space.word * t * |
| 3948 |
} |
| 3949 |
%</!xand> |
| 3950 |
%<xand> { " " * t * } |
| 3951 |
if$ |
| 3952 |
} |
| 3953 |
if$ |
| 3954 |
} |
| 3955 |
't |
| 3956 |
if$ |
| 3957 |
nameptr #1 + 'nameptr := |
| 3958 |
namesleft #1 - 'namesleft := |
| 3959 |
} |
| 3960 |
while$ |
| 3961 |
%<*nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)> |
| 3962 |
t "others" = |
| 3963 |
'skip$ |
| 3964 |
{ bib.name.font } |
| 3965 |
if$ |
| 3966 |
%</nmft&nmfted&!nmand-rm&!(fnm-rm|fnm-def)> |
| 3967 |
} if$ |
| 3968 |
%</!ed-rev&!ed-au> |
| 3969 |
} |
| 3970 |
% \end{macrocode} |
| 3971 |
% \end{macro} |
| 3972 |
% |
| 3973 |
% \begin{macro}{`format.key'} |
| 3974 |
% \begin{macrocode} |
| 3975 |
%<*ay> |
| 3976 |
FUNCTION {format.key} |
| 3977 |
{ empty$ |
| 3978 |
{ key field.or.null } |
| 3979 |
{ "" } |
| 3980 |
if$ |
| 3981 |
} |
| 3982 |
|
| 3983 |
%</ay> |
| 3984 |
% \end{macrocode} |
| 3985 |
% \end{macro} |
| 3986 |
% |
| 3987 |
% \begin{macro}{`format.authors'} |
| 3988 |
% |
| 3989 |
% \begin{macrocode} |
| 3990 |
FUNCTION {format.authors} |
| 3991 |
{ author "author" format.names |
| 3992 |
%<*revdata> |
| 3993 |
duplicate$ empty$ 'skip$ |
| 3994 |
{ collaboration "collaboration" bibinfo.check |
| 3995 |
duplicate$ empty$ 'skip$ |
| 3996 |
{ " (" swap$ * ")" * } |
| 3997 |
if$ |
| 3998 |
* |
| 3999 |
} |
| 4000 |
if$ |
| 4001 |
%</revdata> |
| 4002 |
} |
| 4003 |
% \end{macrocode} |
| 4004 |
% \end{macro} |
| 4005 |
% |
| 4006 |
% \begin{macro}{`get.bbl.editor'} |
| 4007 |
% Use this function universally when accessing the ``editor'' text entity. |
| 4008 |
% \begin{macrocode} |
| 4009 |
FUNCTION {get.bbl.editor} |
| 4010 |
{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } |
| 4011 |
|
| 4012 |
% \end{macrocode} |
| 4013 |
% \end{macro} |
| 4014 |
% |
| 4015 |
% \begin{macro}{`format.editors'} |
| 4016 |
% The option \texttt{edpar} puts the word `editor' in parentheses. |
| 4017 |
% In \texttt{genbst.mbs}, this occurred automatically with the option |
| 4018 |
% \texttt{ed}, to abbreviate `editor' to `ed'. In \texttt{babel.mbs}, |
| 4019 |
% this was not the case, because of complications with the word functions. |
| 4020 |
% Now this possibility is added as a special option, which means there is |
| 4021 |
% some inconsistency with older \texttt{.dbj} files that called \texttt{ed}: |
| 4022 |
% the abbreviated `ed' is not put in parentheses unless \texttt{edpar} is |
| 4023 |
% also called. |
| 4024 |
% |
| 4025 |
% Note that the code here is very similar to code in \texttt{format.in.ed.booktitle}; |
| 4026 |
% the two should be kept coordinated. |
| 4027 |
% \begin{macrocode} |
| 4028 |
FUNCTION {format.editors} |
| 4029 |
{ editor "editor" format.names duplicate$ empty$ 'skip$ |
| 4030 |
{ |
| 4031 |
%<!edpar&!edparxc> "," * |
| 4032 |
" " * |
| 4033 |
get.bbl.editor |
| 4034 |
%<bkedcap> capitalize |
| 4035 |
%<edpar|edparc|edparxc> "(" swap$ * ")" * |
| 4036 |
* |
| 4037 |
} |
| 4038 |
if$ |
| 4039 |
} |
| 4040 |
% \end{macrocode} |
| 4041 |
% \end{macro} |
| 4042 |
% |
| 4043 |
% \begin{macro}{`format.in.editors'} |
| 4044 |
% See the note about the option \texttt{edpar} above. |
| 4045 |
% |
| 4046 |
% \end{macro} |
| 4047 |
% |
| 4048 |
% \begin{macro}{`format.book.pages'} |
| 4049 |
% \begin{macrocode} |
| 4050 |
%<*pg-bk> |
| 4051 |
FUNCTION {format.book.pages} |
| 4052 |
{ pages "pages" bibinfo.check |
| 4053 |
duplicate$ empty$ 'skip$ |
| 4054 |
{ " " * bbl.pages * } |
| 4055 |
if$ |
| 4056 |
} |
| 4057 |
%</pg-bk> |
| 4058 |
% \end{macrocode} |
| 4059 |
% \end{macro} |
| 4060 |
% |
| 4061 |
% \begin{macro}{`format.isbn'} |
| 4062 |
% \begin{macrocode} |
| 4063 |
%<*isbn> |
| 4064 |
FUNCTION {format.isbn} |
| 4065 |
{ isbn "isbn" bibinfo.check |
| 4066 |
duplicate$ empty$ 'skip$ |
| 4067 |
{ |
| 4068 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 4069 |
"ISBN " swap$ * |
| 4070 |
} |
| 4071 |
if$ |
| 4072 |
} |
| 4073 |
|
| 4074 |
%</isbn> |
| 4075 |
% \end{macrocode} |
| 4076 |
% \end{macro} |
| 4077 |
% |
| 4078 |
% \begin{macro}{`format.issn'} |
| 4079 |
% \begin{macrocode} |
| 4080 |
%<*issn> |
| 4081 |
FUNCTION {format.issn} |
| 4082 |
{ issn "issn" bibinfo.check |
| 4083 |
duplicate$ empty$ 'skip$ |
| 4084 |
{ |
| 4085 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 4086 |
"ISSN " swap$ * |
| 4087 |
} |
| 4088 |
if$ |
| 4089 |
} |
| 4090 |
|
| 4091 |
%</issn> |
| 4092 |
% \end{macrocode} |
| 4093 |
% \end{macro} |
| 4094 |
% |
| 4095 |
% \begin{macro}{`format.doi'} |
| 4096 |
% DOIs like URLs are encapsulated by their own commands, so need no \texttt{bibinfo.check}. |
| 4097 |
% \begin{macrocode} |
| 4098 |
%<*doi|(url-doi&!url)> |
| 4099 |
FUNCTION {format.doi} |
| 4100 |
{ doi empty$ |
| 4101 |
{ "" } |
| 4102 |
{ |
| 4103 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 4104 |
%<!html> "\doi{" doi * "}" * |
| 4105 |
%<html> "doi:" doi * |
| 4106 |
} |
| 4107 |
if$ |
| 4108 |
} |
| 4109 |
%</doi|(url-doi&!url)> |
| 4110 |
% \end{macrocode} |
| 4111 |
% \end{macro} |
| 4112 |
% |
| 4113 |
% \begin{macro}{`select.language'} |
| 4114 |
% The \texttt{language} field code has been provided by Bernd Feige, of the |
| 4115 |
% University of Freiburg. |
| 4116 |
% \begin{macrocode} |
| 4117 |
%<*lang> |
| 4118 |
FUNCTION {select.language} |
| 4119 |
{ duplicate$ empty$ |
| 4120 |
'pop$ |
| 4121 |
{ language empty$ |
| 4122 |
'skip$ |
| 4123 |
{ "{\selectlanguage{" language * "}" * swap$ * "}" * } |
| 4124 |
if$ |
| 4125 |
} |
| 4126 |
if$ |
| 4127 |
} |
| 4128 |
|
| 4129 |
%</lang> |
| 4130 |
% \end{macrocode} |
| 4131 |
% \end{macro} |
| 4132 |
% |
| 4133 |
% \begin{macro}{`format.note'} |
| 4134 |
% Notes should be entered as though they were a sentence on their own. |
| 4135 |
% However, if they appear mid-sentence rather than after a block or sentence, |
| 4136 |
% the first letter must be lowercase. Thus if a note begins with a proper |
| 4137 |
% noun, it must be in braces. To avoid a warning about unmatched braces |
| 4138 |
% with the \texttt{change.case\$} function, check first if the leading |
| 4139 |
% character is an opening brace. |
| 4140 |
% |
| 4141 |
% With options \texttt{url,url-nt}, the URL text is treated as a note, and |
| 4142 |
% added here. It is output directly, not prepended to the note text. This |
| 4143 |
% means, if the note is to be a new sentence, the URL text starts that |
| 4144 |
% sentence, and the regular note is added to that sentence, comma between. |
| 4145 |
% |
| 4146 |
% \begin{macrocode} |
| 4147 |
FUNCTION {format.note} |
| 4148 |
{ |
| 4149 |
%<*url-nt&!revdata> |
| 4150 |
url empty$ |
| 4151 |
'skip$ |
| 4152 |
%<!html> { "\urlprefix\url{" url * "}" * output } |
| 4153 |
%<html> { "<a href=" quote$ * url * quote$ |
| 4154 |
%<html> * ">" * url * "</a>" * output } |
| 4155 |
if$ |
| 4156 |
%</url-nt&!revdata> |
| 4157 |
note empty$ |
| 4158 |
{ "" } |
| 4159 |
{ note #1 #1 substring$ |
| 4160 |
duplicate$ "{" = |
| 4161 |
'skip$ |
| 4162 |
{ output.state mid.sentence = |
| 4163 |
{ "l" } |
| 4164 |
{ "u" } |
| 4165 |
if$ |
| 4166 |
change.case$ |
| 4167 |
} |
| 4168 |
if$ |
| 4169 |
note #2 global.max$ substring$ * "note" bibinfo.check |
| 4170 |
} |
| 4171 |
if$ |
| 4172 |
} |
| 4173 |
|
| 4174 |
% \end{macrocode} |
| 4175 |
% \end{macro} |
| 4176 |
% |
| 4177 |
% \begin{macro}{`format.title'} |
| 4178 |
% For a quoted title, any punctuation in the title goes inside the quote. |
| 4179 |
% Otherwise, the comma or period following the title also goes inside. |
| 4180 |
% Exception is with \texttt{qx} option, in which case the comma goes |
| 4181 |
% outside, even when punctuation present; for period (\texttt{!blk-com}) |
| 4182 |
% is added outside only when punctuation is absent. |
| 4183 |
% \begin{macrocode} |
| 4184 |
FUNCTION {format.title} |
| 4185 |
{ title |
| 4186 |
%<*!atit-u> |
| 4187 |
duplicate$ empty$ 'skip$ |
| 4188 |
{ "t" change.case$ } |
| 4189 |
if$ |
| 4190 |
%</!atit-u> |
| 4191 |
"title" bibinfo.check |
| 4192 |
%<*tit-it|tit-qq|lang> |
| 4193 |
duplicate$ empty$ 'skip$ |
| 4194 |
{ |
| 4195 |
%<tit-it> emphasize |
| 4196 |
%<*!tit-it&tit-qq> |
| 4197 |
"\enquote{" swap$ * |
| 4198 |
%<*!qx> |
| 4199 |
%<*blk-com> |
| 4200 |
non.stop |
| 4201 |
%<!com-semi&!com-blank> { ",} " * } |
| 4202 |
%<com-semi> { ";} " * } |
| 4203 |
%<!com-semi&com-blank> { "} " * } |
| 4204 |
{ "} " * } |
| 4205 |
if$ |
| 4206 |
%</blk-com> |
| 4207 |
%<!blk-com> add.period$ "}" * |
| 4208 |
%</!qx> |
| 4209 |
%<*qx> |
| 4210 |
%<*blk-com> |
| 4211 |
%<!com-semi&!com-blank> "}, " * |
| 4212 |
%<com-semi> "}; " * |
| 4213 |
%<!com-semi&com-blank> "} " * |
| 4214 |
%</blk-com> |
| 4215 |
%<!blk-com> "}" * |
| 4216 |
%</qx> |
| 4217 |
%</!tit-it&tit-qq> |
| 4218 |
%<lang> select.language |
| 4219 |
} |
| 4220 |
if$ |
| 4221 |
%</tit-it|tit-qq|lang> |
| 4222 |
} |
| 4223 |
% \end{macrocode} |
| 4224 |
% \end{macro} |
| 4225 |
% |
| 4226 |
% \begin{macro}{`end.quote.title'} |
| 4227 |
% For a quoted title, the punctuation appears in the quotes. For commas |
| 4228 |
% between block, this means the inter-block punctuation is already present, |
| 4229 |
% so it must be suppressed after every \texttt{format.title output}. This |
| 4230 |
% is done by setting the \texttt{output.state} to \texttt{before.all}, but |
| 4231 |
% only if there really was a title. Call this macro every time after |
| 4232 |
% titles are output. |
| 4233 |
% \begin{macrocode} |
| 4234 |
%<*blk-com&tit-qq> |
| 4235 |
FUNCTION {end.quote.title} |
| 4236 |
{ title empty$ |
| 4237 |
'skip$ |
| 4238 |
{ before.all 'output.state := } |
| 4239 |
if$ |
| 4240 |
} |
| 4241 |
%</blk-com&tit-qq> |
| 4242 |
% \end{macrocode} |
| 4243 |
% \end{macro} |
| 4244 |
% |
| 4245 |
% \begin{macro}{`end.quote.btitle'} |
| 4246 |
% Similar to |end.quote.title| except that it is only applied if titles of |
| 4247 |
% proceedings and collections are quoted, and if |
| 4248 |
% neither \texttt{edby}, \texttt{edby-par}, nor \texttt{edby-par} are selected |
| 4249 |
% (this is the default case in the relevant menu of the \texttt{makebst.tex} run). |
| 4250 |
% These options add text after the booktitle, |
| 4251 |
% so additional punctuation need not be suppressed. Unless there is no editor! |
| 4252 |
% |
| 4253 |
% Note: this function is called after the result of \texttt{format.in.ed.booktitle} |
| 4254 |
% has been output, and attempts to predict what that output had been. |
| 4255 |
% Would it not be better to call this function while that result is still |
| 4256 |
% on the stack? |
| 4257 |
% \begin{macrocode} |
| 4258 |
%<*bt-qq> |
| 4259 |
FUNCTION {end.quote.btitle} |
| 4260 |
{ booktitle empty$ |
| 4261 |
'skip$ |
| 4262 |
%<!edby&!edby-par&!edby-parc> { before.all 'output.state := } |
| 4263 |
%<*edby|edby-par|edby-parc> |
| 4264 |
{ editor empty$ |
| 4265 |
{ before.all 'output.state := } |
| 4266 |
'skip$ |
| 4267 |
if$ |
| 4268 |
} |
| 4269 |
%</edby|edby-par|edby-parc> |
| 4270 |
if$ |
| 4271 |
} |
| 4272 |
%</bt-qq> |
| 4273 |
% \end{macrocode} |
| 4274 |
% \end{macro} |
| 4275 |
% |
| 4276 |
% \begin{macro}{`make.full.names'} |
| 4277 |
% In versions before 2.2, there were two functions \texttt{calc.long.label} |
| 4278 |
% and \texttt{format.long.lab.names} that made up the string |
| 4279 |
% \texttt{long.label} for each entry. This contains the full author list. |
| 4280 |
% However, there was a bug in the one routine, entered by mistake when an |
| 4281 |
% earlier bug was removed, and more seriously, the string |
| 4282 |
% \texttt{long.label} was limited to \texttt{entry.max\$} characters, 100 on |
| 4283 |
% my system. Author lists were truncated. Thus, \texttt{make.full.names} |
| 4284 |
% is used instead to enter the full list of names directly in the |
| 4285 |
% \texttt{output.bibitem} function, without an intermediate string. This |
| 4286 |
% involves changing the order of some function definitions, especially |
| 4287 |
% \texttt{output.bibitem} must come later. |
| 4288 |
% \begin{macrocode} |
| 4289 |
%<*har|cay|nat> |
| 4290 |
FUNCTION {format.full.names} |
| 4291 |
{'s := |
| 4292 |
"" 't := |
| 4293 |
#1 'nameptr := |
| 4294 |
s num.names$ 'numnames := |
| 4295 |
numnames 'namesleft := |
| 4296 |
{ namesleft #0 > } |
| 4297 |
{ s nameptr |
| 4298 |
%<!jnrlab> "{vv~}{ll}" format.name$ |
| 4299 |
%<*jnrlab> |
| 4300 |
%<!nm-rv&!nm-rvv&!nm-rvx&!nm-rvcx> "{vv~}{ll}{, jj}" format.name$ |
| 4301 |
%<nm-rv|nm-rvv|nm-rvx|nm-rvcx> "{vv~}{ll}{ jj}" format.name$ |
| 4302 |
%</jnrlab> |
| 4303 |
%<lab&and-rm> cite.name.font |
| 4304 |
't := |
| 4305 |
nameptr #1 > |
| 4306 |
{ |
| 4307 |
%<*nmlm> |
| 4308 |
%<m1> nameptr #1 |
| 4309 |
%<m2> nameptr #2 |
| 4310 |
%<m3> nameptr #3 |
| 4311 |
%<m4> nameptr #4 |
| 4312 |
%<m5> nameptr #5 |
| 4313 |
%<m6> nameptr #6 |
| 4314 |
%<m7> nameptr #7 |
| 4315 |
%<m8> nameptr #8 |
| 4316 |
%<m9> nameptr #9 |
| 4317 |
%<m0> nameptr #0 |
| 4318 |
%<m10> #10 + |
| 4319 |
%<m20> #20 + |
| 4320 |
%<m30> #30 + |
| 4321 |
%<m40> #40 + |
| 4322 |
%<m50> #50 + |
| 4323 |
%<m60> #60 + |
| 4324 |
%<m70> #70 + |
| 4325 |
%<m80> #80 + |
| 4326 |
%<m90> #90 + |
| 4327 |
#1 + = |
| 4328 |
%<x1> numnames #1 |
| 4329 |
%<x2> numnames #2 |
| 4330 |
%<x3> numnames #3 |
| 4331 |
%<x4> numnames #4 |
| 4332 |
%<x5> numnames #5 |
| 4333 |
%<x6> numnames #6 |
| 4334 |
%<x7> numnames #7 |
| 4335 |
%<x8> numnames #8 |
| 4336 |
%<x9> numnames #9 |
| 4337 |
%<x0> numnames #0 |
| 4338 |
%<x10> #10 + |
| 4339 |
%<x20> #20 + |
| 4340 |
%<x30> #30 + |
| 4341 |
%<x40> #40 + |
| 4342 |
%<x50> #50 + |
| 4343 |
%<x60> #60 + |
| 4344 |
%<x70> #70 + |
| 4345 |
%<x80> #80 + |
| 4346 |
%<x90> #90 + |
| 4347 |
> and |
| 4348 |
{ "others" 't := |
| 4349 |
#1 'namesleft := } |
| 4350 |
'skip$ |
| 4351 |
if$ |
| 4352 |
%</nmlm> |
| 4353 |
namesleft #1 > |
| 4354 |
{ ", " * t * } |
| 4355 |
{ |
| 4356 |
s nameptr "{ll}" format.name$ duplicate$ "others" = |
| 4357 |
{ 't := } |
| 4358 |
{ pop$ } |
| 4359 |
if$ |
| 4360 |
t "others" = |
| 4361 |
{ |
| 4362 |
%<lab&!and-rm&(etal-it|etal-rm)> cite.name.font |
| 4363 |
%<*!etal-it> |
| 4364 |
%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font * |
| 4365 |
%<!lab|!and-rm|etal-rm> " " * bbl.etal * |
| 4366 |
%</!etal-it> |
| 4367 |
%<etal-it> " " * bbl.etal emphasize * |
| 4368 |
%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font |
| 4369 |
} |
| 4370 |
{ |
| 4371 |
%<*!harnm> |
| 4372 |
%<*!and-xcom> |
| 4373 |
numnames #2 > |
| 4374 |
{ "," * } |
| 4375 |
'skip$ |
| 4376 |
if$ |
| 4377 |
%</!and-xcom> |
| 4378 |
%<!amper> bbl.and |
| 4379 |
%<amper> "\&" |
| 4380 |
%</!harnm> |
| 4381 |
%<harnm> "\harvardand{}" |
| 4382 |
space.word * t * |
| 4383 |
} |
| 4384 |
if$ |
| 4385 |
} |
| 4386 |
if$ |
| 4387 |
} |
| 4388 |
't |
| 4389 |
if$ |
| 4390 |
nameptr #1 + 'nameptr := |
| 4391 |
namesleft #1 - 'namesleft := |
| 4392 |
} |
| 4393 |
while$ |
| 4394 |
%<*lab&!and-rm> |
| 4395 |
t "others" = |
| 4396 |
'skip$ |
| 4397 |
{ cite.name.font } |
| 4398 |
if$ |
| 4399 |
%</lab&!and-rm> |
| 4400 |
} |
| 4401 |
|
| 4402 |
FUNCTION {author.editor.key.full} |
| 4403 |
{ author empty$ |
| 4404 |
{ editor empty$ |
| 4405 |
{ key empty$ |
| 4406 |
{ cite$ #1 #3 substring$ } |
| 4407 |
'key |
| 4408 |
if$ |
| 4409 |
} |
| 4410 |
{ editor format.full.names } |
| 4411 |
if$ |
| 4412 |
} |
| 4413 |
{ author format.full.names } |
| 4414 |
if$ |
| 4415 |
} |
| 4416 |
|
| 4417 |
FUNCTION {author.key.full} |
| 4418 |
{ author empty$ |
| 4419 |
{ key empty$ |
| 4420 |
{ cite$ #1 #3 substring$ } |
| 4421 |
'key |
| 4422 |
if$ |
| 4423 |
} |
| 4424 |
{ author format.full.names } |
| 4425 |
if$ |
| 4426 |
} |
| 4427 |
|
| 4428 |
FUNCTION {editor.key.full} |
| 4429 |
{ editor empty$ |
| 4430 |
{ key empty$ |
| 4431 |
{ cite$ #1 #3 substring$ } |
| 4432 |
'key |
| 4433 |
if$ |
| 4434 |
} |
| 4435 |
{ editor format.full.names } |
| 4436 |
if$ |
| 4437 |
} |
| 4438 |
|
| 4439 |
FUNCTION {make.full.names} |
| 4440 |
{ type$ "book" = |
| 4441 |
type$ "inbook" = |
| 4442 |
or |
| 4443 |
'author.editor.key.full |
| 4444 |
{ type$ "proceedings" = |
| 4445 |
'editor.key.full |
| 4446 |
'author.key.full |
| 4447 |
if$ |
| 4448 |
} |
| 4449 |
if$ |
| 4450 |
} |
| 4451 |
|
| 4452 |
%</har|cay|nat> |
| 4453 |
% \end{macrocode} |
| 4454 |
% \end{macro} |
| 4455 |
% |
| 4456 |
% \begin{macro}{`output.bibitem'} |
| 4457 |
% A user has pointed out to me that if the label argument in square brackets |
| 4458 |
% are put into braces (within the squares) it is then resistent to any |
| 4459 |
% problems if square braces should appear within the label. Do this, but |
| 4460 |
% only for the \texttt{nat} option. |
| 4461 |
% \begin{macrocode} |
| 4462 |
FUNCTION {output.bibitem} |
| 4463 |
{ newline$ |
| 4464 |
%<*!html> |
| 4465 |
%<*ay> |
| 4466 |
%<!har&!nat> "\bibitem[" write$ |
| 4467 |
%<!har&nat> "\bibitem[{" write$ |
| 4468 |
%<har> "\harvarditem" write$ |
| 4469 |
%<nmd> "\protect\citeauthoryear{" write$ |
| 4470 |
%<ast> "\protect\astroncite{" write$ |
| 4471 |
%<cay> "\protect\citeauthoryear{" make.full.names * "}{" * write$ |
| 4472 |
%<cn> "\protect\citename{" write$ |
| 4473 |
%<!har> label write$ |
| 4474 |
%<har> make.full.names duplicate$ label = |
| 4475 |
%<har> 'skip$ |
| 4476 |
%<har> { "[" label * "]" * write$ } |
| 4477 |
%<har> if$ |
| 4478 |
%<har> "{" swap$ * "}{" * write$ |
| 4479 |
%<har> year duplicate$ empty$ |
| 4480 |
%<cn> ", }" year duplicate$ empty$ |
| 4481 |
%<cay|nmd|ast> "}{" year duplicate$ empty$ |
| 4482 |
%<(har|cn|cay|nmd|ast)&blkyear> { pop$ "" } |
| 4483 |
%<(har|cn|cay|nmd|ast)&!blkyear> { pop$ "????" } |
| 4484 |
%<har|cn|cay|nmd|ast> 'skip$ |
| 4485 |
%<har|cn|cay|nmd|ast> if$ |
| 4486 |
%<har> extra.label * "}{" * write$ |
| 4487 |
%<cn> * extra.label * "]{" * write$ |
| 4488 |
%<cay|nmd|ast> * extra.label * "}]{" * write$ |
| 4489 |
%<alk> "]{" write$ |
| 4490 |
%<!(har|cay|nmd|ast|alk|cn|nat)> ")]{" write$ |
| 4491 |
%<nat> ")" make.full.names duplicate$ short.list = |
| 4492 |
%<nat> { pop$ } |
| 4493 |
%<nat> { * } |
| 4494 |
%<nat> if$ |
| 4495 |
%<nat> "}]{" * write$ |
| 4496 |
%</ay> |
| 4497 |
%<!ay&!(cite|alph)> "\bibitem{" write$ |
| 4498 |
%<!ay&(cite|alph)> "\bibitem[" label * "]{" * write$ |
| 4499 |
cite$ write$ |
| 4500 |
"}" write$ |
| 4501 |
newline$ |
| 4502 |
"" |
| 4503 |
%</!html> |
| 4504 |
%<*html> |
| 4505 |
%<*htdes> |
| 4506 |
"<dt><strong><tt>" write$ |
| 4507 |
cite$ write$ |
| 4508 |
"</tt></strong></dt>" write$ newline$ |
| 4509 |
"<dd>" |
| 4510 |
%</htdes> |
| 4511 |
%<htlist&!htdes> "<li>" |
| 4512 |
%<!htlist&!htdes> "<p>" |
| 4513 |
%</html> |
| 4514 |
before.all 'output.state := |
| 4515 |
} |
| 4516 |
|
| 4517 |
% \end{macrocode} |
| 4518 |
% \end{macro} |
| 4519 |
% |
| 4520 |
% \begin{macro}{`if.digit'} |
| 4521 |
% Add \texttt{if.digit} and \texttt{n.separate} to convert large page numbers |
| 4522 |
% to a separated number. |
| 4523 |
% \begin{macrocode} |
| 4524 |
%<*pgsep-c|pgsep-s|pgsep-p> |
| 4525 |
FUNCTION {if.digit} |
| 4526 |
{ duplicate$ "0" = |
| 4527 |
swap$ duplicate$ "1" = |
| 4528 |
swap$ duplicate$ "2" = |
| 4529 |
swap$ duplicate$ "3" = |
| 4530 |
swap$ duplicate$ "4" = |
| 4531 |
swap$ duplicate$ "5" = |
| 4532 |
swap$ duplicate$ "6" = |
| 4533 |
swap$ duplicate$ "7" = |
| 4534 |
swap$ duplicate$ "8" = |
| 4535 |
swap$ "9" = or or or or or or or or or |
| 4536 |
} |
| 4537 |
% \end{macrocode} |
| 4538 |
% \end{macro} |
| 4539 |
% |
| 4540 |
% \begin{macro}{`n.separate'} |
| 4541 |
% \texttt{pgsep-s}, \texttt{pgsep-p} |
| 4542 |
% Large page numbers are to be separated in threes, with thin space, comma |
| 4543 |
% or period. The number must be 5 digits before the separation occurs. |
| 4544 |
% No provision is made for numbers of 7 or more digits. |
| 4545 |
% \begin{macrocode} |
| 4546 |
FUNCTION {n.separate} |
| 4547 |
{ 't := |
| 4548 |
"" |
| 4549 |
#0 'numnames := |
| 4550 |
{ t empty$ not } |
| 4551 |
{ t #-1 #1 substring$ if.digit |
| 4552 |
{ numnames #1 + 'numnames := } |
| 4553 |
{ #0 'numnames := } |
| 4554 |
if$ |
| 4555 |
t #-1 #1 substring$ swap$ * |
| 4556 |
t #-2 global.max$ substring$ 't := |
| 4557 |
numnames #5 = |
| 4558 |
{ duplicate$ #1 #2 substring$ swap$ |
| 4559 |
#3 global.max$ substring$ |
| 4560 |
%<pgsep-c> "," swap$ * * |
| 4561 |
%<pgsep-p> "." swap$ * * |
| 4562 |
%<pgsep-s&!html> "\," swap$ * * |
| 4563 |
%<pgsep-s&html> " " swap$ * * |
| 4564 |
} |
| 4565 |
'skip$ |
| 4566 |
if$ |
| 4567 |
} |
| 4568 |
while$ |
| 4569 |
} |
| 4570 |
%</pgsep-c|pgsep-s|pgsep-p> |
| 4571 |
% \end{macrocode} |
| 4572 |
% \end{macro} |
| 4573 |
% |
| 4574 |
% \begin{macro}{`n.dashify'} |
| 4575 |
% \begin{macrocode} |
| 4576 |
FUNCTION {n.dashify} |
| 4577 |
{ |
| 4578 |
%<pgsep-c|pgsep-s|pgsep-p> n.separate |
| 4579 |
't := |
| 4580 |
"" |
| 4581 |
{ t empty$ not } |
| 4582 |
{ t #1 #1 substring$ "-" = |
| 4583 |
{ t #1 #2 substring$ "--" = not |
| 4584 |
{ "--" * |
| 4585 |
t #2 global.max$ substring$ 't := |
| 4586 |
} |
| 4587 |
{ { t #1 #1 substring$ "-" = } |
| 4588 |
{ "-" * |
| 4589 |
t #2 global.max$ substring$ 't := |
| 4590 |
} |
| 4591 |
while$ |
| 4592 |
} |
| 4593 |
if$ |
| 4594 |
} |
| 4595 |
{ t #1 #1 substring$ * |
| 4596 |
t #2 global.max$ substring$ 't := |
| 4597 |
} |
| 4598 |
if$ |
| 4599 |
} |
| 4600 |
while$ |
| 4601 |
} |
| 4602 |
|
| 4603 |
% \end{macrocode} |
| 4604 |
% \end{macro} |
| 4605 |
% |
| 4606 |
% \begin{macro}{`word.in'} |
| 4607 |
% The function \texttt{word.in} prints the word \textsl{in} for references |
| 4608 |
% that are |
| 4609 |
% contained in a larger work, or in conference proceedings. One may have a |
| 4610 |
% colon after the word with the option \texttt{in-col}. If blocks of text are |
| 4611 |
% to be separated with commas (option \texttt{blk-com}) then the word remains |
| 4612 |
% in lower case, as it is defined in \texttt{bbl.in}; but if blocks act as |
| 4613 |
% sentences, then it must be capitalized. |
| 4614 |
% \begin{macrocode} |
| 4615 |
FUNCTION {word.in} |
| 4616 |
%<in-x>{ "" } |
| 4617 |
%<*!in-x> |
| 4618 |
%<blk-com|blk-tita>{ bbl.in |
| 4619 |
%<!blk-com&!blk-tita>{ bbl.in capitalize |
| 4620 |
%<in-col> ":" * |
| 4621 |
%<in-it> emphasize |
| 4622 |
" " * } |
| 4623 |
%</!in-x> |
| 4624 |
|
| 4625 |
% \end{macrocode} |
| 4626 |
% \end{macro} |
| 4627 |
% |
| 4628 |
% \begin{macro}{`format.date'} |
| 4629 |
% The new \texttt{harvard.sty} allows variable brackets around the date |
| 4630 |
% in the reference list. It uses |\harvardyearleft| and |\harvardyearright| |
| 4631 |
% in the \texttt{.bst} files. Allow this with the option \texttt{harnm}, |
| 4632 |
% which could actually be used without the \texttt{har} option. Note that |
| 4633 |
% this overrides the other year formatting options, except for the preceding punctuation. |
| 4634 |
% \begin{macrocode} |
| 4635 |
%<*ay> |
| 4636 |
FUNCTION {format.date} |
| 4637 |
{ year "year" bibinfo.check duplicate$ empty$ |
| 4638 |
{ |
| 4639 |
%<*!blkyear> |
| 4640 |
"empty year in " cite$ * "; set to ????" * warning$ |
| 4641 |
pop$ "????" |
| 4642 |
%</!blkyear> |
| 4643 |
} |
| 4644 |
'skip$ |
| 4645 |
if$ |
| 4646 |
%<*aymth> |
| 4647 |
month "month" bibinfo.check duplicate$ empty$ |
| 4648 |
'skip$ |
| 4649 |
{ |
| 4650 |
%<dtrev> swap$ |
| 4651 |
" " * swap$ |
| 4652 |
} |
| 4653 |
if$ |
| 4654 |
* |
| 4655 |
%<mth-bare> remove.dots |
| 4656 |
%</aymth> |
| 4657 |
%<dtbf> bolden |
| 4658 |
extra.label * |
| 4659 |
%<*!harnm> |
| 4660 |
%<*yr-par|yr-brk|yr-col|yr-blk|yr-com|yr-per> |
| 4661 |
before.all 'output.state := |
| 4662 |
%<yr-par> " (" swap$ * ")" * |
| 4663 |
%<!yr-par&yr-brk> " [" swap$ * "]" * |
| 4664 |
%<!yr-par&!yr-brk&yr-col> ": " swap$ * |
| 4665 |
%<!yr-par&!yr-brk&!yr-col&yr-com> ", " swap$ * |
| 4666 |
%<!yr-par&!yr-brk&!yr-col&!yr-com&yr-per> after.sentence 'output.state := |
| 4667 |
%<!yr-par&!yr-brk&!yr-col&!yr-com&!yr-per&yr-blk> " " swap$ * |
| 4668 |
%</yr-par|yr-brk|yr-col|yr-blk|yr-com|yr-per> |
| 4669 |
%</!harnm> |
| 4670 |
%<*harnm> |
| 4671 |
before.all 'output.state := |
| 4672 |
" \harvardyearleft " swap$ * "\harvardyearright{}" * |
| 4673 |
%<yr-col> ":" swap$ * |
| 4674 |
%<!yr-col&yr-com> "," swap$ * |
| 4675 |
%<!yr-col&!yr-com&yr-per> after.sentence 'output.state := |
| 4676 |
%<!yr-col&!yr-com&!yr-per&yr-blk> " " swap$ * |
| 4677 |
%</harnm> |
| 4678 |
} |
| 4679 |
%</ay> |
| 4680 |
%<*!ay> |
| 4681 |
FUNCTION {format.date} |
| 4682 |
{ |
| 4683 |
%<!xmth> month "month" bibinfo.check |
| 4684 |
%<xmth> "" |
| 4685 |
duplicate$ empty$ |
| 4686 |
year "year" bibinfo.check duplicate$ empty$ |
| 4687 |
{ swap$ 'skip$ |
| 4688 |
{ "there's a month but no year in " cite$ * warning$ } |
| 4689 |
if$ |
| 4690 |
* |
| 4691 |
} |
| 4692 |
{ swap$ 'skip$ |
| 4693 |
{ |
| 4694 |
%<showstack> month year |
| 4695 |
%<!dtrev> swap$ |
| 4696 |
" " * swap$ |
| 4697 |
} |
| 4698 |
if$ |
| 4699 |
* |
| 4700 |
%<mth-bare> remove.dots |
| 4701 |
} |
| 4702 |
if$ |
| 4703 |
%<dtbf> bolden |
| 4704 |
%<*yr-par|yr-brk|yr-col|yr-com|yr-per|yr-blk> |
| 4705 |
duplicate$ empty$ |
| 4706 |
'skip$ |
| 4707 |
{ |
| 4708 |
before.all 'output.state := |
| 4709 |
%<yr-par> " (" swap$ * ")" * |
| 4710 |
%<!yr-par&yr-brk> " [" swap$ * "]" * |
| 4711 |
%<!yr-par&!yr-brk&yr-col> ": " swap$ * |
| 4712 |
%<!yr-par&!yr-brk&!yr-col&yr-com> ", " swap$ * |
| 4713 |
%<!yr-par&!yr-brk&!yr-col&!yr-com&yr-per> after.sentence 'output.state := |
| 4714 |
%<!yr-par&!yr-brk&!yr-col&!yr-com&!yr-per&yr-blk> " " swap$ * |
| 4715 |
} |
| 4716 |
if$ |
| 4717 |
%</yr-par|yr-brk|yr-col|yr-com|yr-per|yr-blk> |
| 4718 |
} |
| 4719 |
%</!ay> |
| 4720 |
% \end{macrocode} |
| 4721 |
% \end{macro} |
| 4722 |
% |
| 4723 |
% \begin{macro}{`format.year'} |
| 4724 |
% For the options that put the year into the journal specifications, use a |
| 4725 |
% special formatter separate from the regular date formatter. |
| 4726 |
% The year is always in parentheses (except for appended to journal name). |
| 4727 |
% \begin{macrocode} |
| 4728 |
%<*jdt-p|jdt-pc|jdt-v|jdt-vs> |
| 4729 |
FUNCTION{format.year} |
| 4730 |
{ year "year" bibinfo.check duplicate$ empty$ |
| 4731 |
{ "empty year in " cite$ * |
| 4732 |
%<ay&!blkyear> "; set to ????" * |
| 4733 |
warning$ |
| 4734 |
%<ay&!blkyear> pop$ "????" |
| 4735 |
} |
| 4736 |
{ |
| 4737 |
%<!ay&jdt-vs> " (" swap$ * ")" * |
| 4738 |
%<!ay&!jdt-vs> "(" swap$ * ")" * |
| 4739 |
} |
| 4740 |
if$ |
| 4741 |
%<*ay> |
| 4742 |
extra.label * |
| 4743 |
%<jdt-vs> " (" swap$ * ")" * |
| 4744 |
%<!jdt-vs> "(" swap$ * ")" * |
| 4745 |
%</ay> |
| 4746 |
} |
| 4747 |
%</jdt-p|jdt-pc|jdt-v|jdt-vs> |
| 4748 |
% \end{macrocode} |
| 4749 |
% \end{macro} |
| 4750 |
% |
| 4751 |
% \begin{macro}{`format.btitle'} |
| 4752 |
% \begin{macrocode} |
| 4753 |
FUNCTION {format.btitle} |
| 4754 |
{ title "title" bibinfo.check |
| 4755 |
duplicate$ empty$ 'skip$ |
| 4756 |
{ |
| 4757 |
%<!btit-rm> emphasize |
| 4758 |
%<lang> select.language |
| 4759 |
} |
| 4760 |
if$ |
| 4761 |
} |
| 4762 |
% \end{macrocode} |
| 4763 |
% \end{macro} |
| 4764 |
% |
| 4765 |
% \begin{macro}{`either.or.check'} |
| 4766 |
% \begin{macrocode} |
| 4767 |
FUNCTION {either.or.check} |
| 4768 |
{ empty$ |
| 4769 |
'pop$ |
| 4770 |
{ "can't use both " swap$ * " fields in " * cite$ * warning$ } |
| 4771 |
if$ |
| 4772 |
} |
| 4773 |
% \end{macrocode} |
| 4774 |
% \end{macro} |
| 4775 |
% |
| 4776 |
% \begin{macro}{`format.bvolume'} |
| 4777 |
% \begin{macrocode} |
| 4778 |
FUNCTION {format.bvolume} |
| 4779 |
{ volume empty$ |
| 4780 |
{ "" } |
| 4781 |
{ bbl.volume volume tie.or.space.prefix |
| 4782 |
"volume" bibinfo.check * * |
| 4783 |
series "series" bibinfo.check |
| 4784 |
duplicate$ empty$ 'pop$ |
| 4785 |
%<*!ser-vol> |
| 4786 |
{ swap$ bbl.of space.word * swap$ |
| 4787 |
emphasize * } |
| 4788 |
%</!ser-vol> |
| 4789 |
%<ser-vol> { emphasize ", " * swap$ * } |
| 4790 |
if$ |
| 4791 |
"volume and number" number either.or.check |
| 4792 |
} |
| 4793 |
if$ |
| 4794 |
} |
| 4795 |
% \end{macrocode} |
| 4796 |
% \end{macro} |
| 4797 |
% |
| 4798 |
% \begin{macro}{`format.number.series'} |
| 4799 |
% \begin{macrocode} |
| 4800 |
FUNCTION {format.number.series} |
| 4801 |
{ volume empty$ |
| 4802 |
{ number empty$ |
| 4803 |
{ series field.or.null } |
| 4804 |
%<*num-xser> |
| 4805 |
{ series empty$ |
| 4806 |
{ number "number" bibinfo.check } |
| 4807 |
{ output.state mid.sentence = |
| 4808 |
{ bbl.number } |
| 4809 |
{ bbl.number capitalize } |
| 4810 |
if$ |
| 4811 |
number tie.or.space.prefix "number" bibinfo.check * * |
| 4812 |
bbl.in space.word * |
| 4813 |
series "series" bibinfo.check * |
| 4814 |
} |
| 4815 |
if$ |
| 4816 |
} |
| 4817 |
%</num-xser> |
| 4818 |
%<*!num-xser> |
| 4819 |
{ output.state mid.sentence = |
| 4820 |
{ bbl.number } |
| 4821 |
{ bbl.number capitalize } |
| 4822 |
if$ |
| 4823 |
number tie.or.space.prefix "number" bibinfo.check * * |
| 4824 |
series empty$ |
| 4825 |
{ "there's a number but no series in " cite$ * warning$ } |
| 4826 |
{ bbl.in space.word * |
| 4827 |
series "series" bibinfo.check * |
| 4828 |
} |
| 4829 |
if$ |
| 4830 |
} |
| 4831 |
%</!num-xser> |
| 4832 |
if$ |
| 4833 |
} |
| 4834 |
{ "" } |
| 4835 |
if$ |
| 4836 |
} |
| 4837 |
% \end{macrocode} |
| 4838 |
% \end{macro} |
| 4839 |
% |
| 4840 |
% \begin{macro}{`is.num'} |
| 4841 |
% This function takes the single-character string on the stack and returns |
| 4842 |
% 1 if it is a digit, else 0. |
| 4843 |
% \begin{macrocode} |
| 4844 |
%<*!xedn> |
| 4845 |
FUNCTION {is.num} |
| 4846 |
{ chr.to.int$ |
| 4847 |
duplicate$ "0" chr.to.int$ < not |
| 4848 |
swap$ "9" chr.to.int$ > not and |
| 4849 |
} |
| 4850 |
|
| 4851 |
% \end{macrocode} |
| 4852 |
% \end{macro} |
| 4853 |
% |
| 4854 |
% \begin{macro}{`extract.num'} |
| 4855 |
% This function tests the string on the stack to see if it begins with a |
| 4856 |
% number. If so, that number is left on the stack; if the string contains |
| 4857 |
% no numbers at the start, it is left unchanged. The idea is to convert |
| 4858 |
% \textsl{1st} to \textsl{1} and leave \textsl{first} as is. |
| 4859 |
% This is used by \code{convert.edition}. |
| 4860 |
% \begin{macrocode} |
| 4861 |
FUNCTION {extract.num} |
| 4862 |
{ duplicate$ 't := |
| 4863 |
"" 's := |
| 4864 |
{ t empty$ not } |
| 4865 |
{ t #1 #1 substring$ |
| 4866 |
t #2 global.max$ substring$ 't := |
| 4867 |
duplicate$ is.num |
| 4868 |
{ s swap$ * 's := } |
| 4869 |
{ pop$ "" 't := } |
| 4870 |
if$ |
| 4871 |
} |
| 4872 |
while$ |
| 4873 |
s empty$ |
| 4874 |
'skip$ |
| 4875 |
{ pop$ s } |
| 4876 |
if$ |
| 4877 |
} |
| 4878 |
|
| 4879 |
% \end{macrocode} |
| 4880 |
% \end{macro} |
| 4881 |
% |
| 4882 |
% \begin{macro}{`convert.edition'} |
| 4883 |
% The function \texttt{convert.edition} takes the text in the field |
| 4884 |
% \texttt{edition} and changes it to the language-specific equivalent. As |
| 4885 |
% originally planned for \btx, this field should contain the words |
| 4886 |
% \textsl{First}, \textsl{Second}, etc. Being so explicit, |
| 4887 |
% it is not so easy to translate, nor to |
| 4888 |
% convert to \textsl{1st}, \textsl{2nd}, etc., if one wanted. |
| 4889 |
% This function carries out the translation, by changing |
| 4890 |
% \textsl{first} or \textsl{1} to \texttt{bbl.first}, and so |
| 4891 |
% on. The field is reduced to lower case to make it case insensitive. If no |
| 4892 |
% translation is found, then the original text in \texttt{edition} is used |
| 4893 |
% instead, as it stands. However, if the original is a number greater than |
| 4894 |
% the maximum for which text is provided, then \texttt{bbl.th} is added to |
| 4895 |
% it. |
| 4896 |
% \begin{macrocode} |
| 4897 |
FUNCTION {convert.edition} |
| 4898 |
{ extract.num "l" change.case$ 's := |
| 4899 |
s "first" = s "1" = or |
| 4900 |
{ bbl.first 't := } |
| 4901 |
{ s "second" = s "2" = or |
| 4902 |
{ bbl.second 't := } |
| 4903 |
{ s "third" = s "3" = or |
| 4904 |
{ bbl.third 't := } |
| 4905 |
{ s "fourth" = s "4" = or |
| 4906 |
{ bbl.fourth 't := } |
| 4907 |
{ s "fifth" = s "5" = or |
| 4908 |
{ bbl.fifth 't := } |
| 4909 |
{ s #1 #1 substring$ is.num |
| 4910 |
%<!english&exlang> { s bbl.th * 't := } |
| 4911 |
%<english|!exlang> { s eng.ord 't := } |
| 4912 |
{ edition 't := } |
| 4913 |
if$ |
| 4914 |
} |
| 4915 |
if$ |
| 4916 |
} |
| 4917 |
if$ |
| 4918 |
} |
| 4919 |
if$ |
| 4920 |
} |
| 4921 |
if$ |
| 4922 |
} |
| 4923 |
if$ |
| 4924 |
t |
| 4925 |
} |
| 4926 |
%</!xedn> |
| 4927 |
|
| 4928 |
% \end{macrocode} |
| 4929 |
% \end{macro} |
| 4930 |
% |
| 4931 |
% \begin{macro}{`format.edition'} |
| 4932 |
% This function formats the text for the edition specification, such as |
| 4933 |
% ``Second edition''. It combines the edition number with the word |
| 4934 |
% \textsl{edition}. |
| 4935 |
% \begin{macrocode} |
| 4936 |
FUNCTION {format.edition} |
| 4937 |
{ edition duplicate$ empty$ 'skip$ |
| 4938 |
{ |
| 4939 |
%<!xedn> convert.edition |
| 4940 |
output.state mid.sentence = |
| 4941 |
{ "l" } |
| 4942 |
{ "t" } |
| 4943 |
if$ change.case$ |
| 4944 |
"edition" bibinfo.check |
| 4945 |
" " * bbl.edition * |
| 4946 |
} |
| 4947 |
if$ |
| 4948 |
} |
| 4949 |
% \end{macrocode} |
| 4950 |
% \end{macro} |
| 4951 |
% |
| 4952 |
% \begin{macrocode} |
| 4953 |
INTEGERS { multiresult } |
| 4954 |
% \end{macrocode} |
| 4955 |
% |
| 4956 |
% \begin{macro}{`multi.page.check'} |
| 4957 |
% \begin{macrocode} |
| 4958 |
FUNCTION {multi.page.check} |
| 4959 |
{ 't := |
| 4960 |
#0 'multiresult := |
| 4961 |
{ multiresult not |
| 4962 |
t empty$ not |
| 4963 |
and |
| 4964 |
} |
| 4965 |
{ t #1 #1 substring$ |
| 4966 |
duplicate$ "-" = |
| 4967 |
swap$ duplicate$ "," = |
| 4968 |
swap$ "+" = |
| 4969 |
or or |
| 4970 |
{ #1 'multiresult := } |
| 4971 |
{ t #2 global.max$ substring$ 't := } |
| 4972 |
if$ |
| 4973 |
} |
| 4974 |
while$ |
| 4975 |
multiresult |
| 4976 |
} |
| 4977 |
% \end{macrocode} |
| 4978 |
% \end{macro} |
| 4979 |
% |
| 4980 |
% \begin{macro}{`format.pages'} |
| 4981 |
% \begin{macrocode} |
| 4982 |
FUNCTION {format.pages} |
| 4983 |
{ pages duplicate$ empty$ 'skip$ |
| 4984 |
{ duplicate$ multi.page.check |
| 4985 |
{ |
| 4986 |
%<!bkpg-x&!ppx> bbl.pages swap$ |
| 4987 |
n.dashify |
| 4988 |
} |
| 4989 |
{ |
| 4990 |
%<!bkpg-x&!ppx> bbl.page swap$ |
| 4991 |
} |
| 4992 |
if$ |
| 4993 |
%<!bkpg-x&!ppx> tie.or.space.prefix |
| 4994 |
"pages" bibinfo.check |
| 4995 |
%<!bkpg-x&!ppx> * * |
| 4996 |
%<bkpg-par> "(" swap$ * ")" * |
| 4997 |
} |
| 4998 |
if$ |
| 4999 |
} |
| 5000 |
% \end{macrocode} |
| 5001 |
% \end{macro} |
| 5002 |
% |
| 5003 |
% \begin{macro}{`first.page'} |
| 5004 |
% \begin{macrocode} |
| 5005 |
%<*jpg-1> |
| 5006 |
FUNCTION {first.page} |
| 5007 |
{ 't := |
| 5008 |
"" |
| 5009 |
{ t empty$ not t #1 #1 substring$ "-" = not and } |
| 5010 |
{ t #1 #1 substring$ * |
| 5011 |
t #2 global.max$ substring$ 't := |
| 5012 |
} |
| 5013 |
while$ |
| 5014 |
} |
| 5015 |
|
| 5016 |
%</jpg-1> |
| 5017 |
% \end{macrocode} |
| 5018 |
% \end{macro} |
| 5019 |
% |
| 5020 |
% \begin{macro}{`format.journal.pages'} |
| 5021 |
% Note: this function gets called with something on the stack. |
| 5022 |
% It may be the volume and number. |
| 5023 |
% \begin{macrocode} |
| 5024 |
FUNCTION {format.journal.pages} |
| 5025 |
{ pages duplicate$ empty$ 'pop$ |
| 5026 |
{ swap$ duplicate$ empty$ |
| 5027 |
{ pop$ pop$ format.pages } |
| 5028 |
{ |
| 5029 |
%<volp-sp> ": " * |
| 5030 |
%<*!volp-sp> |
| 5031 |
%<volp-blk> " " * |
| 5032 |
%<*!volp-blk> |
| 5033 |
%<volp-com> ", " * |
| 5034 |
%<*!volp-com> |
| 5035 |
%<volp-semi> "; " * |
| 5036 |
%<!volp-semi> ":" * |
| 5037 |
%</!volp-com> |
| 5038 |
%</!volp-blk> |
| 5039 |
%</!volp-sp> |
| 5040 |
%<!jdt-v&!jdt-vs&jdt-p> format.year * " " * |
| 5041 |
%<!jdt-v&!jdt-vs&!jdt-p&jdt-pc> format.year * ", " * |
| 5042 |
swap$ |
| 5043 |
%<jpg-1> first.page |
| 5044 |
%<!jpg-1> n.dashify |
| 5045 |
%<*jwdpg> |
| 5046 |
pages multi.page.check |
| 5047 |
'bbl.pages |
| 5048 |
'bbl.page |
| 5049 |
if$ |
| 5050 |
swap$ tie.or.space.prefix |
| 5051 |
%</jwdpg> |
| 5052 |
"pages" bibinfo.check |
| 5053 |
%<jwdpg> * * |
| 5054 |
* |
| 5055 |
} |
| 5056 |
if$ |
| 5057 |
} |
| 5058 |
if$ |
| 5059 |
} |
| 5060 |
% \end{macrocode} |
| 5061 |
% \end{macro} |
| 5062 |
% |
| 5063 |
% \begin{macro}{`format.journal.eid'} |
| 5064 |
% |
| 5065 |
% This function is called with something on the stack (journal vol, number) |
| 5066 |
% and appends \texttt{eid} and \texttt{numpages} if those field are non-empty. |
| 5067 |
% Very similar to \texttt{format.journal.pages}. |
| 5068 |
% |
| 5069 |
% For the AGU style of including the DOI as part of the EID, the DOI number |
| 5070 |
% is appended too. |
| 5071 |
% \begin{macrocode} |
| 5072 |
FUNCTION {format.journal.eid} |
| 5073 |
{ eid "eid" bibinfo.check |
| 5074 |
duplicate$ empty$ 'pop$ |
| 5075 |
{ swap$ duplicate$ empty$ 'skip$ |
| 5076 |
{ |
| 5077 |
%<volp-sp> ": " * |
| 5078 |
%<*!volp-sp> |
| 5079 |
%<volp-blk> " " * |
| 5080 |
%<*!volp-blk> |
| 5081 |
%<volp-com> ", " * |
| 5082 |
%<*!volp-com> |
| 5083 |
%<volp-semi> "; " * |
| 5084 |
%<!volp-semi> ":" * |
| 5085 |
%</!volp-com> |
| 5086 |
%</!volp-blk> |
| 5087 |
%</!volp-sp> |
| 5088 |
} |
| 5089 |
if$ |
| 5090 |
swap$ * |
| 5091 |
%<*revdata> |
| 5092 |
numpages empty$ 'skip$ |
| 5093 |
{ bbl.eidpp numpages tie.or.space.prefix |
| 5094 |
"numpages" bibinfo.check * * |
| 5095 |
" (" swap$ * ")" * * |
| 5096 |
} |
| 5097 |
if$ |
| 5098 |
%</revdata> |
| 5099 |
} |
| 5100 |
if$ |
| 5101 |
} |
| 5102 |
% \end{macrocode} |
| 5103 |
% \end{macro} |
| 5104 |
% |
| 5105 |
% \begin{macro}{`format.vol.num.pages'} |
| 5106 |
% Version 3.84, I have rationalized several options that placed the date in the |
| 5107 |
% journal specifications. It was rather chaotic before, but now it should be |
| 5108 |
% more systematic. This means some options have been removed, something that I |
| 5109 |
% do not like to do. |
| 5110 |
% |
| 5111 |
% The option \texttt{pp-last} suppresses the pages in the formatting macros, and |
| 5112 |
% sees to it that the pages are added just before any notes in those entries |
| 5113 |
% that take pages. This applies to more than just \texttt{article}, but to |
| 5114 |
% \texttt{inbook}, \texttt{incollection} as well. |
| 5115 |
% |
| 5116 |
% \begin{macrocode} |
| 5117 |
FUNCTION {format.vol.num.pages} |
| 5118 |
{ volume field.or.null |
| 5119 |
duplicate$ empty$ 'skip$ |
| 5120 |
{ |
| 5121 |
%<jwdvol> bbl.volume swap$ tie.or.space.prefix |
| 5122 |
"volume" bibinfo.check |
| 5123 |
%<jwdvol> * * |
| 5124 |
} |
| 5125 |
if$ |
| 5126 |
%<vol-bf&!vol-2bf> bolden |
| 5127 |
%<!vol-bf&!vol-2bf&vol-it> emphasize |
| 5128 |
%<jdt-v|jdt-vs> format.year * |
| 5129 |
%<*!vnum-x> |
| 5130 |
number "number" bibinfo.check duplicate$ empty$ 'skip$ |
| 5131 |
{ |
| 5132 |
swap$ duplicate$ empty$ |
| 5133 |
{ "there's a number but no volume in " cite$ * warning$ } |
| 5134 |
'skip$ |
| 5135 |
if$ |
| 5136 |
swap$ |
| 5137 |
%<vnum-sp> "~(" swap$ * ")" * |
| 5138 |
%<!vnum-sp&vnum-cm> ", " swap$ * |
| 5139 |
%<!vnum-sp&!vnum-cm&vnum-nr> ", " bbl.nr * number tie.or.space.prefix pop$ * swap$ * |
| 5140 |
%<!vnum-sp&!vnum-cm&!vnum-nr&vnum-h> ", \#" swap$ * |
| 5141 |
%<!vnum-sp&!vnum-cm&!vnum-nr&!vnum-h&vnum-b> " " swap$ * |
| 5142 |
%<!vnum-sp&!vnum-cm&!vnum-nr&!vnum-h&!vnum-b> "(" swap$ * ")" * |
| 5143 |
} |
| 5144 |
if$ * |
| 5145 |
%<!vol-bf&vol-2bf> bolden |
| 5146 |
%</!vnum-x> |
| 5147 |
%<*!pp-last> |
| 5148 |
eid empty$ |
| 5149 |
{ format.journal.pages } |
| 5150 |
{ format.journal.eid } |
| 5151 |
if$ |
| 5152 |
%</!pp-last> |
| 5153 |
} |
| 5154 |
|
| 5155 |
% \end{macrocode} |
| 5156 |
% \end{macro} |
| 5157 |
% |
| 5158 |
% \begin{macro}{`format.chapter.pages'} |
| 5159 |
% \begin{macrocode} |
| 5160 |
FUNCTION {format.chapter.pages} |
| 5161 |
{ chapter empty$ |
| 5162 |
%<!pp-last> 'format.pages |
| 5163 |
%<pp-last> { "" } |
| 5164 |
{ type empty$ |
| 5165 |
{ bbl.chapter } |
| 5166 |
{ type "l" change.case$ |
| 5167 |
"type" bibinfo.check |
| 5168 |
} |
| 5169 |
if$ |
| 5170 |
chapter tie.or.space.prefix |
| 5171 |
"chapter" bibinfo.check |
| 5172 |
* * |
| 5173 |
%<*!pp-last> |
| 5174 |
pages empty$ |
| 5175 |
'skip$ |
| 5176 |
{ ", " * format.pages * } |
| 5177 |
if$ |
| 5178 |
%</!pp-last> |
| 5179 |
} |
| 5180 |
if$ |
| 5181 |
} |
| 5182 |
|
| 5183 |
% \end{macrocode} |
| 5184 |
% \end{macro} |
| 5185 |
% |
| 5186 |
% \begin{macro}{`bt.enquote'} |
| 5187 |
% This is to place the booktitle for proceedings and collections into quotes. |
| 5188 |
% If punctuation is to be included, then add a comma unless a stop already |
| 5189 |
% exists, or add a period under the only circumstances that |
| 5190 |
% |format.in.ed.booktitle| is followed by |new.sentence|. |
| 5191 |
% \begin{macrocode} |
| 5192 |
%<*bt-qq> |
| 5193 |
FUNCTION {bt.enquote} |
| 5194 |
{ duplicate$ empty$ 'skip$ |
| 5195 |
{ "\enquote{" swap$ * |
| 5196 |
%<*!qx> |
| 5197 |
non.stop |
| 5198 |
{ ",} " * } |
| 5199 |
{ "}, " * } |
| 5200 |
if$ |
| 5201 |
%</!qx> |
| 5202 |
%<*qx> |
| 5203 |
"}, " * |
| 5204 |
%</qx> |
| 5205 |
} |
| 5206 |
if$ |
| 5207 |
} |
| 5208 |
%</bt-qq> |
| 5209 |
% \end{macrocode} |
| 5210 |
% |
| 5211 |
% \end{macro} |
| 5212 |
% |
| 5213 |
% \begin{macro}{`format.booktitle'} |
| 5214 |
% The function \texttt{format.booktitle} pushes one object |
| 5215 |
% (the book title, suitably encapsulated) onto the stack. |
| 5216 |
% It is currently used in \texttt{format.incoll.inproc.crossref} |
| 5217 |
% and in \texttt{format.in.ed.booktitle}, and should be used whenever accessing |
| 5218 |
% the \texttt{booktitle} field for eventual output. |
| 5219 |
% |
| 5220 |
% If the book title is empty or missing, the function pushes an empty string. |
| 5221 |
% \begin{macrocode} |
| 5222 |
FUNCTION {format.booktitle} |
| 5223 |
{ |
| 5224 |
booktitle "booktitle" bibinfo.check |
| 5225 |
%<!bt-qq&!bt-rm> emphasize |
| 5226 |
%<bt-qq> bt.enquote |
| 5227 |
} |
| 5228 |
% \end{macrocode} |
| 5229 |
% \end{macro} |
| 5230 |
% |
| 5231 |
% \begin{macro}{`format.in.ed.booktitle'} |
| 5232 |
% Prior to version 3.81, the \textsl{Editor} or \textsl{Edited by} in |
| 5233 |
% parentheses was meant to be capitalized, but this did not work properly. |
| 5234 |
% Now the option \texttt{edcap} produces this, and default is not capitalized. |
| 5235 |
% |
| 5236 |
% Notes on \dtx{} options: |
| 5237 |
% \begin{itemize} |
| 5238 |
% \item |
| 5239 |
% The following combinations are available through the \texttt{makebst.tex} interface: |
| 5240 |
% \begin{quote} |
| 5241 |
% \verb+(+ \\ |
| 5242 |
% \verb+ <default>+ \\ |
| 5243 |
% \verb+ |edby ( |edbyx |edbyy|edbyw[edcap])+ \\ |
| 5244 |
% \verb+ |edby-par (|edcap|edbyx[edcap]|edbyy )+ \\ |
| 5245 |
% \verb+ |edby-parc(|edcap|edbyx )+ \\ |
| 5246 |
% \verb+)+ |
| 5247 |
% \end{quote} |
| 5248 |
% \item |
| 5249 |
% \texttt{edby}, \texttt{edby-par}, and \texttt{edby-parc} are mutually exclusive |
| 5250 |
% and, except for the default, exhaustive. |
| 5251 |
% \item |
| 5252 |
% \texttt{edbyx}, \texttt{edbyw}, and \texttt{edbyy} are mutually exclusive |
| 5253 |
% and, except for the default, exhaustive. |
| 5254 |
% \item |
| 5255 |
% \texttt{edcap} is independent of the above two groups of options. |
| 5256 |
% \item |
| 5257 |
% When parentheses need to be applied, we make sure that the respective |
| 5258 |
% \dtx{} guard expressions are mutually exclusive. |
| 5259 |
% It makes no sense for \texttt{edbyw} to be in effect if either of |
| 5260 |
% \texttt{edby-par} or \texttt{edby-parc} is in effect. |
| 5261 |
% \item |
| 5262 |
% \texttt{makebst.tex} only activates \texttt{edcap} in certain cases, |
| 5263 |
% but we do no checking here, applying it consistently to the |
| 5264 |
% ``editor'' text entity. |
| 5265 |
% \item |
| 5266 |
% The code between \texttt{<!edpar>} and \verb+<edpar\|edparc>+ |
| 5267 |
% \emph{must} match the corresponding code in \texttt{format.editors}. |
| 5268 |
% This means that in the default case, formatting is controlled by |
| 5269 |
% a \dtx{} mechanism entirely different from the other cases. |
| 5270 |
% \item \texttt{ser-ed} has been added to suit AGU. Result of series plus |
| 5271 |
% volume to go between booktitle and editors; must remove \texttt{format.bvolume} |
| 5272 |
% from \texttt{incollection} and \texttt{inproceedings}. |
| 5273 |
% \end{itemize} |
| 5274 |
% |
| 5275 |
% \begin{macrocode} |
| 5276 |
FUNCTION {format.in.ed.booktitle} |
| 5277 |
{ format.booktitle duplicate$ empty$ 'skip$ |
| 5278 |
{ |
| 5279 |
%<showstack>% btitle |
| 5280 |
%<*ser-ed> |
| 5281 |
format.bvolume duplicate$ empty$ 'pop$ |
| 5282 |
{ ", " swap$ * * } |
| 5283 |
if$ |
| 5284 |
%</ser-ed> |
| 5285 |
editor "editor" format.names.ed duplicate$ empty$ 'pop$ |
| 5286 |
{ |
| 5287 |
%<*!(edby|edby-par|edby-parc)> |
| 5288 |
%<showstack>% btitle ednms |
| 5289 |
%<!edpar&!edparxc> "," * |
| 5290 |
" " * |
| 5291 |
get.bbl.editor |
| 5292 |
%<bkedcap> capitalize |
| 5293 |
%<edpar> "(" swap$ * "), " * |
| 5294 |
%<!edpar&(edparc|edparxc)> "(" swap$ * ") " * |
| 5295 |
%<!edpar&!(edparc|edparxc)> ", " * |
| 5296 |
* swap$ |
| 5297 |
%<showstack>% eds btitle |
| 5298 |
%</!(edby|edby-par|edby-parc)> |
| 5299 |
%<*edby|edby-par|edby-parc> |
| 5300 |
%<showstack>% btitle ednms |
| 5301 |
%<edbyx|edbyy|edbyw> get.bbl.editor |
| 5302 |
%<!(edbyx|edbyy|edbyw)> bbl.edby |
| 5303 |
%<edcap> capitalize |
| 5304 |
%<!(edby-par|edby-parc)&edbyw> "(" swap$ * ")" * |
| 5305 |
%<showstack>% btitle ednms ed |
| 5306 |
%<(edby-par|edby)&edbyy> swap$ "," * |
| 5307 |
" " * swap$ * |
| 5308 |
%<showstack>% btitle ednms-ed |
| 5309 |
%<(edby-par|edby-parc)&!edbyw> "(" swap$ * ")" * |
| 5310 |
swap$ |
| 5311 |
%<edby|edby-parc> "," * |
| 5312 |
" " * swap$ |
| 5313 |
%</edby|edby-par|edby-parc> |
| 5314 |
%<showstack>% btitle ednms-ed (or ednms-ed btitle) |
| 5315 |
* } |
| 5316 |
if$ |
| 5317 |
%<showstack>% btitle-ednms-ed (or ednms-ed-btitle) (or btitle) |
| 5318 |
word.in swap$ * |
| 5319 |
} |
| 5320 |
if$ |
| 5321 |
} |
| 5322 |
% \end{macrocode} |
| 5323 |
% \end{macro} |
| 5324 |
% |
| 5325 |
% \begin{macro}{`empty.misc.check'} |
| 5326 |
% \begin{macrocode} |
| 5327 |
%<*!ay> |
| 5328 |
FUNCTION {empty.misc.check} |
| 5329 |
{ author empty$ title empty$ howpublished empty$ |
| 5330 |
month empty$ year empty$ note empty$ |
| 5331 |
and and and and and |
| 5332 |
%<!seq-no|alph> key empty$ not and |
| 5333 |
{ "all relevant fields are empty in " cite$ * warning$ } |
| 5334 |
'skip$ |
| 5335 |
if$ |
| 5336 |
} |
| 5337 |
%</!ay> |
| 5338 |
% \end{macrocode} |
| 5339 |
% \end{macro} |
| 5340 |
% |
| 5341 |
% \begin{macro}{`format.thesis.type'} |
| 5342 |
% \begin{macrocode} |
| 5343 |
FUNCTION {format.thesis.type} |
| 5344 |
{ type duplicate$ empty$ |
| 5345 |
'pop$ |
| 5346 |
{ swap$ pop$ |
| 5347 |
"t" change.case$ "type" bibinfo.check |
| 5348 |
} |
| 5349 |
if$ |
| 5350 |
} |
| 5351 |
% \end{macrocode} |
| 5352 |
% \end{macro} |
| 5353 |
% |
| 5354 |
% \begin{macro}{`format.tr.number'} |
| 5355 |
% \begin{macrocode} |
| 5356 |
FUNCTION {format.tr.number} |
| 5357 |
{ number "number" bibinfo.check |
| 5358 |
type duplicate$ empty$ |
| 5359 |
{ pop$ bbl.techrep } |
| 5360 |
'skip$ |
| 5361 |
if$ |
| 5362 |
"type" bibinfo.check |
| 5363 |
swap$ duplicate$ empty$ |
| 5364 |
{ pop$ "t" change.case$ } |
| 5365 |
{ tie.or.space.prefix * * } |
| 5366 |
if$ |
| 5367 |
} |
| 5368 |
% \end{macrocode} |
| 5369 |
% \end{macro} |
| 5370 |
% |
| 5371 |
% \begin{macro}{`format.article.crossref'} |
| 5372 |
% The \texttt{journal} field was emphasized emplicitly, but it should be |
| 5373 |
% done by command. |
| 5374 |
% \begin{macrocode} |
| 5375 |
FUNCTION {format.article.crossref} |
| 5376 |
{ |
| 5377 |
%<*!ay> |
| 5378 |
key duplicate$ empty$ |
| 5379 |
{ pop$ |
| 5380 |
journal duplicate$ empty$ |
| 5381 |
{ "need key or journal for " cite$ * " to crossref " * crossref * warning$ } |
| 5382 |
{ "journal" bibinfo.check emphasize word.in swap$ * } |
| 5383 |
if$ |
| 5384 |
} |
| 5385 |
{ word.in swap$ * " " *} |
| 5386 |
if$ |
| 5387 |
%</!ay> |
| 5388 |
%<ay> word.in |
| 5389 |
%<!html> " \cite{" * crossref * "}" * |
| 5390 |
%<html> " <tt>" * crossref * "</tt>" * |
| 5391 |
} |
| 5392 |
% \end{macrocode} |
| 5393 |
% \end{macro} |
| 5394 |
% |
| 5395 |
% \begin{macro}{`format.crossref.editor'} |
| 5396 |
% \begin{macrocode} |
| 5397 |
%<*!ay> |
| 5398 |
FUNCTION {format.crossref.editor} |
| 5399 |
{ editor #1 "{vv~}{ll}" format.name$ |
| 5400 |
%<nmft&nmfted&nmand-rm> bib.name.font |
| 5401 |
"editor" bibinfo.check |
| 5402 |
editor num.names$ duplicate$ |
| 5403 |
#2 > |
| 5404 |
{ pop$ |
| 5405 |
%<nmft&nmfted&!nmand-rm&(etal-it|etal-rm)> bib.name.font |
| 5406 |
"editor" bibinfo.check |
| 5407 |
" " * bbl.etal |
| 5408 |
%<etal-it> emphasize |
| 5409 |
* |
| 5410 |
%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> bib.name.font |
| 5411 |
%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> "others" 't := |
| 5412 |
} |
| 5413 |
{ #2 < |
| 5414 |
'skip$ |
| 5415 |
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 5416 |
{ |
| 5417 |
%<nmft&nmfted&!nmand-rm&(etal-it|etal-rm)> bib.name.font |
| 5418 |
"editor" bibinfo.check |
| 5419 |
" " * bbl.etal |
| 5420 |
%<etal-it> emphasize |
| 5421 |
* |
| 5422 |
%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> bib.name.font |
| 5423 |
%<nmft&nmfted&!nmand-rm&!(etal-it|etal-rm)> "others" 't := |
| 5424 |
} |
| 5425 |
{ |
| 5426 |
%<*!harnm> |
| 5427 |
%<!amper> bbl.and space.word |
| 5428 |
%<amper> " \& " |
| 5429 |
%</!harnm> |
| 5430 |
%<harnm> " \harvardand\ " |
| 5431 |
* editor #2 "{vv~}{ll}" format.name$ |
| 5432 |
%<nmft&nmfted&nmand-rm> bib.name.font |
| 5433 |
"editor" bibinfo.check |
| 5434 |
* |
| 5435 |
} |
| 5436 |
if$ |
| 5437 |
} |
| 5438 |
if$ |
| 5439 |
} |
| 5440 |
if$ |
| 5441 |
%<*nmft&nmfted&!nmand-rm> |
| 5442 |
t "others" = |
| 5443 |
'skip$ |
| 5444 |
{ bib.name.font "editor" bibinfo.check } |
| 5445 |
if$ |
| 5446 |
%</nmft&nmfted&!nmand-rm> |
| 5447 |
} |
| 5448 |
%</!ay> |
| 5449 |
% \end{macrocode} |
| 5450 |
% \end{macro} |
| 5451 |
% |
| 5452 |
% \begin{macro}{`format.book.crossref'} |
| 5453 |
% The \texttt{series} field was emphasized emplicitly, but it should be |
| 5454 |
% done by command. |
| 5455 |
% \begin{macrocode} |
| 5456 |
FUNCTION {format.book.crossref} |
| 5457 |
{ volume duplicate$ empty$ |
| 5458 |
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
| 5459 |
pop$ word.in |
| 5460 |
} |
| 5461 |
{ bbl.volume |
| 5462 |
%<!(blk-com|blk-tita)> capitalize |
| 5463 |
swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * |
| 5464 |
} |
| 5465 |
if$ |
| 5466 |
%<*!ay> |
| 5467 |
editor empty$ |
| 5468 |
editor field.or.null author field.or.null = |
| 5469 |
or |
| 5470 |
{ key empty$ |
| 5471 |
{ series empty$ |
| 5472 |
{ "need editor, key, or series for " cite$ * " to crossref " * |
| 5473 |
crossref * warning$ |
| 5474 |
"" * |
| 5475 |
} |
| 5476 |
{ series emphasize * } |
| 5477 |
if$ |
| 5478 |
} |
| 5479 |
{ key * } |
| 5480 |
if$ |
| 5481 |
} |
| 5482 |
{ format.crossref.editor * } |
| 5483 |
if$ |
| 5484 |
%</!ay> |
| 5485 |
%<!html> " \cite{" * crossref * "}" * |
| 5486 |
%<html> " <tt>" * crossref * "</tt>" * |
| 5487 |
} |
| 5488 |
% \end{macrocode} |
| 5489 |
% \end{macro} |
| 5490 |
% |
| 5491 |
% \begin{macro}{`format.incoll.inproc.crossref'} |
| 5492 |
% The \texttt{booktitle} field was emphasized emplicitly, but it should be |
| 5493 |
% done by command. |
| 5494 |
% \begin{macrocode} |
| 5495 |
FUNCTION {format.incoll.inproc.crossref} |
| 5496 |
{ |
| 5497 |
%<*!ay> |
| 5498 |
editor empty$ |
| 5499 |
editor field.or.null author field.or.null = |
| 5500 |
or |
| 5501 |
{ key empty$ |
| 5502 |
{ format.booktitle duplicate$ empty$ |
| 5503 |
{ "need editor, key, or booktitle for " cite$ * " to crossref " * |
| 5504 |
crossref * warning$ |
| 5505 |
} |
| 5506 |
{ word.in swap$ * } |
| 5507 |
if$ |
| 5508 |
} |
| 5509 |
{ word.in key * " " *} |
| 5510 |
if$ |
| 5511 |
} |
| 5512 |
{ word.in format.crossref.editor * " " *} |
| 5513 |
if$ |
| 5514 |
%</!ay> |
| 5515 |
%<ay> word.in |
| 5516 |
%<!html> " \cite{" * crossref * "}" * |
| 5517 |
%<html> " <tt>" * crossref * "</tt>" * |
| 5518 |
} |
| 5519 |
% \end{macrocode} |
| 5520 |
% \end{macro} |
| 5521 |
% |
| 5522 |
% \begin{macro}{`format.org.or.pub'} |
| 5523 |
% Psychology journals often want \textit{address}: \textit{publisher}. |
| 5524 |
% |
| 5525 |
% \textsl{Nature} wants publisher and date in parentheses, and when both |
| 5526 |
% are there, they are merged into one set. |
| 5527 |
% |
| 5528 |
% Call function \texttt{add.blank} before parentheses so suppress preceding |
| 5529 |
% punctuation, which looks strange when publisher in parentheses. |
| 5530 |
% |
| 5531 |
% MPG Jahrbuch wants publisher and year, but without parentheses. Add |
| 5532 |
% \texttt{pub-nopar} to be used with \texttt{pub-date}. |
| 5533 |
% |
| 5534 |
% Have now (3.87.h) extended this function to include the organization, if |
| 5535 |
% present. This is for \texttt{inproceedings} and \texttt{proceedings} where |
| 5536 |
% the publisher is optional, and organization too. If the publisher is missing, |
| 5537 |
% but the organization present, it is formatted like the publisher. This |
| 5538 |
% complication comes from styles that want the publisher/organization to have |
| 5539 |
% the date included, all in parentheses. |
| 5540 |
% |
| 5541 |
% This function is called by \texttt{format.publisher.address} and |
| 5542 |
% \texttt{format.organization.address}, each putting the appropriate text |
| 5543 |
% into the stack first. |
| 5544 |
% |
| 5545 |
% \begin{macrocode} |
| 5546 |
FUNCTION {format.org.or.pub} |
| 5547 |
{ 't := |
| 5548 |
"" |
| 5549 |
%<*pub-date&!ay> |
| 5550 |
year empty$ |
| 5551 |
{ "empty year in " cite$ * warning$ } |
| 5552 |
'skip$ |
| 5553 |
if$ |
| 5554 |
%</pub-date&!ay> |
| 5555 |
%<*!(pub-date&ay)> |
| 5556 |
address empty$ t empty$ and |
| 5557 |
%<pub-date> year empty$ and |
| 5558 |
'skip$ |
| 5559 |
{ |
| 5560 |
%</!(pub-date&ay)> |
| 5561 |
%<pub-par|(pub-date&!pub-xpar)> add.blank "(" * |
| 5562 |
%<*add-pub> |
| 5563 |
address "address" bibinfo.check * |
| 5564 |
t empty$ |
| 5565 |
'skip$ |
| 5566 |
%</add-pub> |
| 5567 |
%<*!add-pub> |
| 5568 |
t empty$ |
| 5569 |
{ address "address" bibinfo.check * |
| 5570 |
} |
| 5571 |
{ t * |
| 5572 |
address empty$ |
| 5573 |
'skip$ |
| 5574 |
{ ", " * address "address" bibinfo.check * } |
| 5575 |
if$ |
| 5576 |
} |
| 5577 |
%</!add-pub> |
| 5578 |
%<*add-pub> |
| 5579 |
{ address empty$ |
| 5580 |
'skip$ |
| 5581 |
{ ": " * } |
| 5582 |
if$ |
| 5583 |
t * |
| 5584 |
} |
| 5585 |
%</add-pub> |
| 5586 |
if$ |
| 5587 |
%<*pub-date&!ay> |
| 5588 |
year empty$ |
| 5589 |
'skip$ |
| 5590 |
{ t empty$ address empty$ and |
| 5591 |
'skip$ |
| 5592 |
%<!pub-xc> { ", " swap$ * * } |
| 5593 |
%<pub-xc> { " " swap$ * * } |
| 5594 |
if$ |
| 5595 |
year "year" bibinfo.check |
| 5596 |
%<dtbf> bolden |
| 5597 |
* |
| 5598 |
} |
| 5599 |
if$ |
| 5600 |
%</pub-date&!ay> |
| 5601 |
%<*pub-date&ay> |
| 5602 |
year duplicate$ empty$ |
| 5603 |
%<*!blkyear> |
| 5604 |
{ "empty year in " cite$ * "; set to ????" * warning$ |
| 5605 |
pop$ "????" } |
| 5606 |
%</!blkyear> |
| 5607 |
%<*blkyear> |
| 5608 |
{ "empty year in " cite$ * warning$ |
| 5609 |
pop$ "" } |
| 5610 |
%</blkyear> |
| 5611 |
%<!dtbf> { "year" bibinfo.check extra.label * } |
| 5612 |
%<dtbf> { "year" bibinfo.check bolden extra.label * } |
| 5613 |
if$ |
| 5614 |
t empty$ address empty$ and |
| 5615 |
{ * } |
| 5616 |
%<!pub-xc> { ", " swap$ * * } |
| 5617 |
%<pub-xc> { " " swap$ * * } |
| 5618 |
if$ |
| 5619 |
%</pub-date&ay> |
| 5620 |
%<pub-par|(pub-date&!pub-xpar)> ")" * |
| 5621 |
%<*!(pub-date&ay)> |
| 5622 |
} |
| 5623 |
if$ |
| 5624 |
%</!(pub-date&ay)> |
| 5625 |
} |
| 5626 |
% \end{macrocode} |
| 5627 |
% \end{macro} |
| 5628 |
% |
| 5629 |
% \begin{macro}{`format.publisher.address'} |
| 5630 |
% \begin{macrocode} |
| 5631 |
FUNCTION {format.publisher.address} |
| 5632 |
{ publisher "publisher" bibinfo.warn format.org.or.pub |
| 5633 |
} |
| 5634 |
|
| 5635 |
% \end{macrocode} |
| 5636 |
% \end{macro} |
| 5637 |
% |
| 5638 |
% \begin{macro}{`format.organization.address'} |
| 5639 |
% \begin{macrocode} |
| 5640 |
FUNCTION {format.organization.address} |
| 5641 |
{ organization "organization" bibinfo.check format.org.or.pub |
| 5642 |
} |
| 5643 |
|
| 5644 |
% \end{macrocode} |
| 5645 |
% \end{macro} |
| 5646 |
% |
| 5647 |
% \begin{macro}{`name.or.dash'} |
| 5648 |
% This function stores what is on the stack, compares it with previous value, |
| 5649 |
% and replaces it with a long dash if they are equal. What is on the stack |
| 5650 |
% should be author or editor names for the current entry. |
| 5651 |
% \begin{macrocode} |
| 5652 |
%<*nmdash> |
| 5653 |
STRINGS {oldname} |
| 5654 |
|
| 5655 |
FUNCTION {name.or.dash} |
| 5656 |
{ 's := |
| 5657 |
oldname empty$ |
| 5658 |
{ s 'oldname := s } |
| 5659 |
{ s oldname = |
| 5660 |
%<*!au-col> |
| 5661 |
%<!nmd-2&!nmd-3> { "---" } |
| 5662 |
%<nmd-2&!nmd-3> { "---{}---" } |
| 5663 |
%<nmd-3> { "---{}---{}---" } |
| 5664 |
%</!au-col> |
| 5665 |
%<*au-col> |
| 5666 |
%<!nmd-2&!nmd-3> { "---" add.blank } |
| 5667 |
%<nmd-2&!nmd-3> { "---{}---" add.blank } |
| 5668 |
%<nmd-3> { "---{}---{}---" add.blank } |
| 5669 |
%</au-col> |
| 5670 |
{ s 'oldname := s } |
| 5671 |
if$ |
| 5672 |
} |
| 5673 |
if$ |
| 5674 |
} |
| 5675 |
|
| 5676 |
%</nmdash> |
| 5677 |
% \end{macrocode} |
| 5678 |
% \end{macro} |
| 5679 |
% |
| 5680 |
% \begin{macro}{`article'} |
| 5681 |
% \begin{macrocode} |
| 5682 |
FUNCTION {article} |
| 5683 |
{ output.bibitem |
| 5684 |
format.authors "author" output.check |
| 5685 |
%<ay> author format.key output |
| 5686 |
%<au-col> add.colon |
| 5687 |
%<nmdash> name.or.dash |
| 5688 |
%<*dt-beg&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5689 |
format.date "year" output.check |
| 5690 |
date.block |
| 5691 |
%</dt-beg&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5692 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 5693 |
%<*!jtit-x> |
| 5694 |
format.title "title" output.check |
| 5695 |
%<blk-com&tit-qq> end.quote.title |
| 5696 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5697 |
%<*blk-tit|blk-tita> |
| 5698 |
%<!tit-col> new.sentence |
| 5699 |
%<tit-col> add.colon |
| 5700 |
%</blk-tit|blk-tita> |
| 5701 |
%</!jtit-x> |
| 5702 |
crossref missing$ |
| 5703 |
{ |
| 5704 |
journal |
| 5705 |
%<jxper> remove.dots |
| 5706 |
"journal" bibinfo.check |
| 5707 |
%<!jttl-rm> emphasize |
| 5708 |
%<injnl> word.in swap$ * |
| 5709 |
"journal" output.check |
| 5710 |
%<jnm-x> add.blank |
| 5711 |
%<*!dt-beg&!dt-end&dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5712 |
format.date "year" output.check |
| 5713 |
date.block |
| 5714 |
%</!dt-beg&!dt-end&dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5715 |
format.vol.num.pages output |
| 5716 |
%<doi&agu-doi> format.doi output |
| 5717 |
%<*!dt-beg&!dt-end&!dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5718 |
format.date "year" output.check |
| 5719 |
%</!dt-beg&!dt-end&!dt-jnl&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5720 |
} |
| 5721 |
{ format.article.crossref output.nonnull |
| 5722 |
%<!pp-last> format.pages output |
| 5723 |
} |
| 5724 |
if$ |
| 5725 |
%<*pp-last> |
| 5726 |
eid empty$ |
| 5727 |
{ format.journal.pages } |
| 5728 |
{ format.journal.eid } |
| 5729 |
if$ |
| 5730 |
%</pp-last> |
| 5731 |
%<issn> format.issn output |
| 5732 |
%<(doi|(url-doi&!url))&!agu-doi> format.doi output |
| 5733 |
%<*url-blk&!harnm&!revdata> |
| 5734 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5735 |
format.url output |
| 5736 |
%</url-blk&!harnm&!revdata> |
| 5737 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5738 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 5739 |
format.note output |
| 5740 |
%<*!dt-beg&dt-end&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5741 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5742 |
format.date "year" output.check |
| 5743 |
%</!dt-beg&dt-end&!jdt-p&!jdt-pc&!jdt-vs&!jdt-v> |
| 5744 |
%<eprint> format.eprint output |
| 5745 |
%<*revdata> |
| 5746 |
format.url output |
| 5747 |
%</revdata> |
| 5748 |
fin.entry |
| 5749 |
%<harnm|url-nl> write.url |
| 5750 |
} |
| 5751 |
% \end{macrocode} |
| 5752 |
% \end{macro} |
| 5753 |
% |
| 5754 |
% \begin{macro}{`book'} |
| 5755 |
% \begin{macrocode} |
| 5756 |
FUNCTION {book} |
| 5757 |
{ output.bibitem |
| 5758 |
author empty$ |
| 5759 |
{ format.editors "author and editor" output.check |
| 5760 |
%<ay> editor format.key output |
| 5761 |
%<!edpar&(edparc|edparxc)&!au-col> add.blank |
| 5762 |
%<au-col> add.colon |
| 5763 |
%<nmdash> name.or.dash |
| 5764 |
} |
| 5765 |
{ format.authors output.nonnull |
| 5766 |
%<au-col> add.colon |
| 5767 |
%<nmdash> name.or.dash |
| 5768 |
crossref missing$ |
| 5769 |
{ "author and editor" editor either.or.check } |
| 5770 |
'skip$ |
| 5771 |
if$ |
| 5772 |
} |
| 5773 |
if$ |
| 5774 |
%<dt-beg&!pub-date> format.date "year" output.check |
| 5775 |
%<dt-beg&!pub-date> date.block |
| 5776 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 5777 |
format.btitle "title" output.check |
| 5778 |
crossref missing$ |
| 5779 |
{ format.bvolume output |
| 5780 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5781 |
%<blk-tit&!tit-col> new.sentence |
| 5782 |
%<blk-tit&tit-col> add.colon |
| 5783 |
%<!numser> format.number.series output |
| 5784 |
%<pre-edn> format.edition output |
| 5785 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 5786 |
%<numser> format.number.series output |
| 5787 |
%<pg-bk&pg-pre> format.book.pages output |
| 5788 |
format.publisher.address output |
| 5789 |
} |
| 5790 |
{ |
| 5791 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5792 |
%<blk-tit&!tit-col> new.sentence |
| 5793 |
%<blk-tit&tit-col> add.colon |
| 5794 |
format.book.crossref output.nonnull |
| 5795 |
%<!dt-beg&!dt-end&pub-date> format.date "year" output.check |
| 5796 |
} |
| 5797 |
if$ |
| 5798 |
%<!pre-edn> format.edition output |
| 5799 |
%<!dt-beg&!dt-end&!pub-date> format.date "year" output.check |
| 5800 |
%<isbn> format.isbn output |
| 5801 |
%<pg-bk&!pg-pre> format.book.pages output |
| 5802 |
%<doi|(url-doi&!url)> format.doi output |
| 5803 |
%<*url-blk&!harnm&!revdata> |
| 5804 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5805 |
format.url output |
| 5806 |
%</url-blk&!harnm&!revdata> |
| 5807 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5808 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 5809 |
format.note output |
| 5810 |
%<*!dt-beg&dt-end&!pub-date> |
| 5811 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5812 |
format.date "year" output.check |
| 5813 |
%</!dt-beg&dt-end&!pub-date> |
| 5814 |
%<eprint> format.eprint output |
| 5815 |
%<revdata> format.url output |
| 5816 |
fin.entry |
| 5817 |
%<(harnm|url-nl)&!revdata> write.url |
| 5818 |
} |
| 5819 |
% \end{macrocode} |
| 5820 |
% \end{macro} |
| 5821 |
% |
| 5822 |
% \begin{macro}{`booklet'} |
| 5823 |
% \begin{macrocode} |
| 5824 |
FUNCTION {booklet} |
| 5825 |
{ output.bibitem |
| 5826 |
format.authors output |
| 5827 |
%<ay> author format.key output |
| 5828 |
%<au-col> add.colon |
| 5829 |
%<nmdash> name.or.dash |
| 5830 |
%<ay&dt-beg> format.date "year" output.check |
| 5831 |
%<!ay&dt-beg> format.date output |
| 5832 |
%<dt-beg> date.block |
| 5833 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 5834 |
format.title "title" output.check |
| 5835 |
%<blk-com&tit-qq> end.quote.title |
| 5836 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5837 |
%<blk-tit&!tit-col> new.sentence |
| 5838 |
%<blk-tit&tit-col> add.colon |
| 5839 |
howpublished "howpublished" bibinfo.check output |
| 5840 |
address "address" bibinfo.check output |
| 5841 |
%<ay&!dt-beg&!dt-end> format.date "year" output.check |
| 5842 |
%<!ay&!dt-beg&!dt-end> format.date output |
| 5843 |
%<isbn> format.isbn output |
| 5844 |
%<pg-bk> format.book.pages output |
| 5845 |
%<doi|(url-doi&!url)> format.doi output |
| 5846 |
%<*url-blk&!harnm&!revdata> |
| 5847 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5848 |
format.url output |
| 5849 |
%</url-blk&!harnm&!revdata> |
| 5850 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5851 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 5852 |
format.note output |
| 5853 |
%<*ay&!dt-beg&dt-end> |
| 5854 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5855 |
format.date "year" output.check |
| 5856 |
%</ay&!dt-beg&dt-end> |
| 5857 |
%<*!ay&!dt-beg&dt-end> |
| 5858 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5859 |
format.date output |
| 5860 |
%</!ay&!dt-beg&dt-end> |
| 5861 |
%<eprint> format.eprint output |
| 5862 |
%<revdata> format.url output |
| 5863 |
fin.entry |
| 5864 |
%<(harnm|url-nl)&!revdata> write.url |
| 5865 |
} |
| 5866 |
|
| 5867 |
% \end{macrocode} |
| 5868 |
% \end{macro} |
| 5869 |
% |
| 5870 |
% \begin{macro}{`inbook'} |
| 5871 |
% The medical journals, with option \texttt{dt-jnl}, have the date as part of |
| 5872 |
% the journal specification. For chapters in books, they want date and pages |
| 5873 |
% to appear at the end, with a space between them. (For journals, there is to be |
| 5874 |
% no space.) Suppress the chapter specification (for now). |
| 5875 |
% |
| 5876 |
% The \texttt{dt-jnl} option usually behaves as the default, except for some |
| 5877 |
% special entries, like this one. |
| 5878 |
% |
| 5879 |
% Restore the chapter specification (2004 Feb 9) after someone complained. |
| 5880 |
% There are still some bugs here. If some date punctuation is specified, say |
| 5881 |
% with \texttt{yrp-semi} for a semi-colon after the year, this appears always, |
| 5882 |
% even if there is no text following. But then this to be an unlikely wish anyway, |
| 5883 |
% since such punctuation options are best suited for \texttt{dt-beg}. |
| 5884 |
% \begin{macrocode} |
| 5885 |
FUNCTION {inbook} |
| 5886 |
{ output.bibitem |
| 5887 |
author empty$ |
| 5888 |
{ format.editors "author and editor" output.check |
| 5889 |
%<ay> editor format.key output |
| 5890 |
%<au-col> add.colon |
| 5891 |
%<nmdash> name.or.dash |
| 5892 |
} |
| 5893 |
{ format.authors output.nonnull |
| 5894 |
%<au-col> add.colon |
| 5895 |
%<nmdash> name.or.dash |
| 5896 |
crossref missing$ |
| 5897 |
{ "author and editor" editor either.or.check } |
| 5898 |
'skip$ |
| 5899 |
if$ |
| 5900 |
} |
| 5901 |
if$ |
| 5902 |
%<dt-beg&!pub-date> format.date "year" output.check |
| 5903 |
%<dt-beg&!pub-date> date.block |
| 5904 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 5905 |
format.btitle "title" output.check |
| 5906 |
crossref missing$ |
| 5907 |
{ |
| 5908 |
%<pre-pub&numser> format.number.series output |
| 5909 |
%<pre-pub> format.publisher.address output |
| 5910 |
format.bvolume output |
| 5911 |
%<*dt-beg|dt-end|!dt-jnl|a|!a> |
| 5912 |
format.chapter.pages "chapter and pages" output.check |
| 5913 |
%</dt-beg|dt-end|!dt-jnl|a|!a> |
| 5914 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5915 |
%<blk-tit&!tit-col> new.sentence |
| 5916 |
%<blk-tit&tit-col> add.colon |
| 5917 |
%<!numser> format.number.series output |
| 5918 |
%<pre-edn> format.edition output |
| 5919 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 5920 |
%<!pre-pub&numser> format.number.series output |
| 5921 |
%<!pre-pub> format.publisher.address output |
| 5922 |
} |
| 5923 |
{ |
| 5924 |
%<*dt-beg|dt-end|!dt-jnl|a|!a> |
| 5925 |
format.chapter.pages "chapter and pages" output.check |
| 5926 |
%</dt-beg|dt-end|!dt-jnl|a|!a> |
| 5927 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5928 |
%<blk-tit&!tit-col> new.sentence |
| 5929 |
%<blk-tit&tit-col> add.colon |
| 5930 |
format.book.crossref output.nonnull |
| 5931 |
%<!dt-beg&!dt-end&!dt-jnl&pub-date> format.date "year" output.check |
| 5932 |
} |
| 5933 |
if$ |
| 5934 |
%<!pre-edn> format.edition output |
| 5935 |
%<!dt-beg&!dt-end&!dt-jnl&!pub-date> format.date "year" output.check |
| 5936 |
%<*isbn> |
| 5937 |
crossref missing$ |
| 5938 |
{ format.isbn output } |
| 5939 |
'skip$ |
| 5940 |
if$ |
| 5941 |
%</isbn> |
| 5942 |
%<*(!dt-beg&!dt-end&dt-jnl)&!pub-date> |
| 5943 |
format.date "year" output.check |
| 5944 |
date.block |
| 5945 |
%</(!dt-beg&!dt-end&dt-jnl)&!pub-date> |
| 5946 |
%<pp-last> format.pages "pages" output.check |
| 5947 |
%<doi|(url-doi&!url)> format.doi output |
| 5948 |
%<*url-blk&!harnm&!revdata> |
| 5949 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5950 |
format.url output |
| 5951 |
%</url-blk&!harnm&!revdata> |
| 5952 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5953 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 5954 |
format.note output |
| 5955 |
%<*!dt-beg&dt-end&!pub-date> |
| 5956 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5957 |
format.date "year" output.check |
| 5958 |
%</!dt-beg&dt-end&!pub-date> |
| 5959 |
%<eprint> format.eprint output |
| 5960 |
%<revdata> format.url output |
| 5961 |
fin.entry |
| 5962 |
%<(harnm|url-nl)&!revdata> write.url |
| 5963 |
} |
| 5964 |
|
| 5965 |
% \end{macrocode} |
| 5966 |
% \end{macro} |
| 5967 |
% |
| 5968 |
% \begin{macro}{`incollection'} |
| 5969 |
% \begin{macrocode} |
| 5970 |
FUNCTION {incollection} |
| 5971 |
{ output.bibitem |
| 5972 |
format.authors "author" output.check |
| 5973 |
%<ay> author format.key output |
| 5974 |
%<au-col> add.colon |
| 5975 |
%<nmdash> name.or.dash |
| 5976 |
%<dt-beg&!pub-date> format.date "year" output.check |
| 5977 |
%<dt-beg&!pub-date> date.block |
| 5978 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 5979 |
%<*!jtit-x> |
| 5980 |
format.title "title" output.check |
| 5981 |
%<blk-com&tit-qq> end.quote.title |
| 5982 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 5983 |
%<blk-tit&!tit-col> new.sentence |
| 5984 |
%<blk-tit&tit-col> add.colon |
| 5985 |
%</!jtit-x> |
| 5986 |
crossref missing$ |
| 5987 |
{ format.in.ed.booktitle "booktitle" output.check |
| 5988 |
%<bt-qq> end.quote.btitle |
| 5989 |
%<pre-pub&numser> format.number.series output |
| 5990 |
%<pre-pub> format.publisher.address output |
| 5991 |
%<!ser-ed> format.bvolume output |
| 5992 |
%<!numser> format.number.series output |
| 5993 |
%<pre-edn> format.edition output |
| 5994 |
format.chapter.pages output |
| 5995 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 5996 |
%<!pre-pub&numser> format.number.series output |
| 5997 |
%<!pre-pub> format.publisher.address output |
| 5998 |
%<!pre-edn> format.edition output |
| 5999 |
%<!dt-beg&!dt-end&!dt-jnl&!pub-date> format.date "year" output.check |
| 6000 |
%<isbn> format.isbn output |
| 6001 |
} |
| 6002 |
{ format.incoll.inproc.crossref output.nonnull |
| 6003 |
format.chapter.pages output |
| 6004 |
} |
| 6005 |
if$ |
| 6006 |
%<*(!dt-beg&!dt-end&dt-jnl)&!pub-date> |
| 6007 |
format.date "year" output.check |
| 6008 |
date.block |
| 6009 |
%</(!dt-beg&!dt-end&dt-jnl)&!pub-date> |
| 6010 |
%<pp-last> format.pages "pages" output.check |
| 6011 |
%<doi|(url-doi&!url)> format.doi output |
| 6012 |
%<*url-blk&!harnm&!revdata> |
| 6013 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6014 |
format.url output |
| 6015 |
%</url-blk&!harnm&!revdata> |
| 6016 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6017 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6018 |
format.note output |
| 6019 |
%<*!dt-beg&dt-end&!pub-date> |
| 6020 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6021 |
format.date "year" output.check |
| 6022 |
%</!dt-beg&dt-end&!pub-date> |
| 6023 |
%<eprint> format.eprint output |
| 6024 |
%<revdata> format.url output |
| 6025 |
fin.entry |
| 6026 |
%<(harnm|url-nl)&!revdata> write.url |
| 6027 |
} |
| 6028 |
% \end{macrocode} |
| 6029 |
% \end{macro} |
| 6030 |
% |
| 6031 |
% \begin{macro}{`inproceedings'} |
| 6032 |
% \begin{macrocode} |
| 6033 |
FUNCTION {inproceedings} |
| 6034 |
{ output.bibitem |
| 6035 |
format.authors "author" output.check |
| 6036 |
%<ay> author format.key output |
| 6037 |
%<au-col> add.colon |
| 6038 |
%<nmdash> name.or.dash |
| 6039 |
%<dt-beg&!pub-date> format.date "year" output.check |
| 6040 |
%<dt-beg&!pub-date> date.block |
| 6041 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6042 |
%<*!jtit-x> |
| 6043 |
format.title "title" output.check |
| 6044 |
%<blk-com&tit-qq> end.quote.title |
| 6045 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6046 |
%<blk-tit&!tit-col> new.sentence |
| 6047 |
%<blk-tit&tit-col> add.colon |
| 6048 |
%</!jtit-x> |
| 6049 |
crossref missing$ |
| 6050 |
{ format.in.ed.booktitle "booktitle" output.check |
| 6051 |
%<bt-qq> end.quote.btitle |
| 6052 |
%<*!pre-pub> |
| 6053 |
%<!ser-ed> format.bvolume output |
| 6054 |
%<!numser> format.number.series output |
| 6055 |
%<(dt-beg|dt-end|!dt-jnl)&!pp-last> format.pages output |
| 6056 |
%</!pre-pub> |
| 6057 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 6058 |
%<numser> format.number.series output |
| 6059 |
publisher empty$ |
| 6060 |
{ format.organization.address output } |
| 6061 |
{ organization "organization" bibinfo.check output |
| 6062 |
format.publisher.address output |
| 6063 |
} |
| 6064 |
if$ |
| 6065 |
%<!dt-beg&!dt-end&!dt-jnl&!pub-date> format.date "year" output.check |
| 6066 |
%<*pre-pub> |
| 6067 |
format.bvolume output |
| 6068 |
%<!numser> format.number.series output |
| 6069 |
%<(dt-beg|dt-end|!dt-jnl)&!pp-last> format.pages output |
| 6070 |
%</pre-pub> |
| 6071 |
%<isbn> format.isbn output |
| 6072 |
%<issn> format.issn output |
| 6073 |
} |
| 6074 |
{ format.incoll.inproc.crossref output.nonnull |
| 6075 |
%<(dt-beg|dt-end|!dt-jnl)&!pp-last> format.pages output |
| 6076 |
} |
| 6077 |
if$ |
| 6078 |
%<*!dt-beg&!dt-end&dt-jnl&!pp-last> |
| 6079 |
%<!pub-date> format.date "year" output.check |
| 6080 |
%<!pub-date> date.block |
| 6081 |
%<jdt-v|jdt-vs|jdt-p|!jdt-pc> add.blank |
| 6082 |
format.pages "pages" output.check |
| 6083 |
%</!dt-beg&!dt-end&dt-jnl&!pp-last> |
| 6084 |
%<pp-last> format.pages "pages" output.check |
| 6085 |
%<doi|(url-doi&!url)> format.doi output |
| 6086 |
%<*url-blk&!harnm&!revdata> |
| 6087 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6088 |
format.url output |
| 6089 |
%</url-blk&!harnm&!revdata> |
| 6090 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6091 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6092 |
format.note output |
| 6093 |
%<*!dt-beg&dt-end&!pub-date> |
| 6094 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6095 |
format.date "year" output.check |
| 6096 |
%</!dt-beg&dt-end&!pub-date> |
| 6097 |
%<eprint> format.eprint output |
| 6098 |
%<revdata> format.url output |
| 6099 |
fin.entry |
| 6100 |
%<(harnm|url-nl)&!revdata> write.url |
| 6101 |
} |
| 6102 |
% \end{macrocode} |
| 6103 |
% \end{macro} |
| 6104 |
% |
| 6105 |
% \begin{macro}{`conference'} |
| 6106 |
% \begin{macrocode} |
| 6107 |
FUNCTION {conference} { inproceedings } |
| 6108 |
% \end{macrocode} |
| 6109 |
% \end{macro} |
| 6110 |
% |
| 6111 |
% \begin{macro}{`manual'} |
| 6112 |
% \begin{macrocode} |
| 6113 |
%<*ay> |
| 6114 |
FUNCTION {manual} |
| 6115 |
{ output.bibitem |
| 6116 |
format.authors output |
| 6117 |
author format.key output |
| 6118 |
%<au-col> add.colon |
| 6119 |
%<nmdash> name.or.dash |
| 6120 |
%<dt-beg> format.date "year" output.check |
| 6121 |
%<dt-beg> date.block |
| 6122 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6123 |
format.btitle "title" output.check |
| 6124 |
%<blk-tit&!tit-col> new.sentence |
| 6125 |
%<blk-tit&tit-col> add.colon |
| 6126 |
%<!blk-com&!blk-tit&!blk-tita> organization address new.block.checkb |
| 6127 |
organization "organization" bibinfo.check output |
| 6128 |
address "address" bibinfo.check output |
| 6129 |
format.edition output |
| 6130 |
%<!dt-beg&!dt-end> format.date "year" output.check |
| 6131 |
%<doi|(url-doi&!url)> format.doi output |
| 6132 |
%<*url-blk&!harnm&!revdata> |
| 6133 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6134 |
format.url output |
| 6135 |
%</url-blk&!harnm&!revdata> |
| 6136 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6137 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6138 |
format.note output |
| 6139 |
%<*!dt-beg&dt-end> |
| 6140 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6141 |
format.date "year" output.check |
| 6142 |
%</!dt-beg&dt-end> |
| 6143 |
%<eprint> format.eprint output |
| 6144 |
%<revdata> format.url output |
| 6145 |
fin.entry |
| 6146 |
%<(harnm|url-nl)&!revdata> write.url |
| 6147 |
} |
| 6148 |
|
| 6149 |
%</ay> |
| 6150 |
%<*!ay> |
| 6151 |
FUNCTION {manual} |
| 6152 |
{ output.bibitem |
| 6153 |
author empty$ |
| 6154 |
{ organization "organization" bibinfo.check |
| 6155 |
duplicate$ empty$ 'pop$ |
| 6156 |
{ output |
| 6157 |
address "address" bibinfo.check output |
| 6158 |
} |
| 6159 |
if$ |
| 6160 |
} |
| 6161 |
{ format.authors output.nonnull } |
| 6162 |
if$ |
| 6163 |
%<au-col> add.colon |
| 6164 |
%<nmdash> name.or.dash |
| 6165 |
%<ay&dt-beg> format.date "year" output.check |
| 6166 |
%<!ay&dt-beg> format.date output |
| 6167 |
%<dt-beg> date.block |
| 6168 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6169 |
format.btitle "title" output.check |
| 6170 |
%<blk-tit&!tit-col> new.sentence |
| 6171 |
%<blk-tit&tit-col> add.colon |
| 6172 |
author empty$ |
| 6173 |
{ organization empty$ |
| 6174 |
{ |
| 6175 |
%<!blk-com&!blk-tit&!blk-tita> address new.block.checka |
| 6176 |
address "address" bibinfo.check output |
| 6177 |
} |
| 6178 |
'skip$ |
| 6179 |
if$ |
| 6180 |
} |
| 6181 |
{ |
| 6182 |
%<!blk-com&!blk-tit&!blk-tita> organization address new.block.checkb |
| 6183 |
organization "organization" bibinfo.check output |
| 6184 |
address "address" bibinfo.check output |
| 6185 |
} |
| 6186 |
if$ |
| 6187 |
format.edition output |
| 6188 |
%<ay&!dt-beg&!dt-end> format.date "year" output.check |
| 6189 |
%<!ay&!dt-beg&!dt-end> format.date output |
| 6190 |
%<doi|(url-doi&!url)> format.doi output |
| 6191 |
%<*url-blk&!harnm&!revdata> |
| 6192 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6193 |
format.url output |
| 6194 |
%</url-blk&!harnm&!revdata> |
| 6195 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6196 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6197 |
format.note output |
| 6198 |
%<*ay&!dt-beg&dt-end> |
| 6199 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6200 |
format.date "year" output.check |
| 6201 |
%</ay&!dt-beg&dt-end> |
| 6202 |
%<*!ay&!dt-beg&dt-end> |
| 6203 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6204 |
format.date output |
| 6205 |
%</!ay&!dt-beg&dt-end> |
| 6206 |
%<eprint> format.eprint output |
| 6207 |
%<revdata> format.url output |
| 6208 |
fin.entry |
| 6209 |
%<(harnm|url-nl)&!revdata> write.url |
| 6210 |
} |
| 6211 |
|
| 6212 |
%</!ay> |
| 6213 |
% \end{macrocode} |
| 6214 |
% \end{macro} |
| 6215 |
% |
| 6216 |
% \begin{macro}{`mastersthesis'} |
| 6217 |
% To format a master's thesis. |
| 6218 |
% \begin{macrocode} |
| 6219 |
FUNCTION {mastersthesis} |
| 6220 |
{ output.bibitem |
| 6221 |
format.authors "author" output.check |
| 6222 |
%<ay> author format.key output |
| 6223 |
%<au-col> add.colon |
| 6224 |
%<nmdash> name.or.dash |
| 6225 |
%<dt-beg> format.date "year" output.check |
| 6226 |
%<dt-beg> date.block |
| 6227 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6228 |
%<*!thtit-x> |
| 6229 |
%<!thtit-a> format.btitle |
| 6230 |
%<thtit-a> format.title |
| 6231 |
"title" output.check |
| 6232 |
%<thtit-a&blk-com&tit-qq> end.quote.title |
| 6233 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6234 |
%<blk-tit&!tit-col> new.sentence |
| 6235 |
%<blk-tit&tit-col> add.colon |
| 6236 |
%</!thtit-x> |
| 6237 |
bbl.mthesis format.thesis.type output.nonnull |
| 6238 |
school "school" bibinfo.warn output |
| 6239 |
address "address" bibinfo.check output |
| 6240 |
%<!dt-beg&!dt-end> format.date "year" output.check |
| 6241 |
%<doi|(url-doi&!url)> format.doi output |
| 6242 |
%<*url-blk&!harnm&!revdata> |
| 6243 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6244 |
format.url output |
| 6245 |
%</url-blk&!harnm&!revdata> |
| 6246 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6247 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6248 |
format.note output |
| 6249 |
%<*!dt-beg&dt-end> |
| 6250 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6251 |
format.date "year" output.check |
| 6252 |
%</!dt-beg&dt-end> |
| 6253 |
%<eprint> format.eprint output |
| 6254 |
%<revdata> format.url output |
| 6255 |
fin.entry |
| 6256 |
%<(harnm|url-nl)&!revdata> write.url |
| 6257 |
} |
| 6258 |
|
| 6259 |
% \end{macrocode} |
| 6260 |
% \end{macro} |
| 6261 |
% |
| 6262 |
% \begin{macro}{`misc'} |
| 6263 |
% \begin{macrocode} |
| 6264 |
FUNCTION {misc} |
| 6265 |
{ output.bibitem |
| 6266 |
format.authors output |
| 6267 |
%<ay> author format.key output |
| 6268 |
%<au-col> add.colon |
| 6269 |
%<nmdash> name.or.dash |
| 6270 |
%<ay&dt-beg> format.date "year" output.check |
| 6271 |
%<!ay&dt-beg> format.date output |
| 6272 |
%<*ay> |
| 6273 |
%<dt-beg> date.block |
| 6274 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6275 |
format.title output |
| 6276 |
%<blk-com&tit-qq> end.quote.title |
| 6277 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6278 |
%<blk-tit&!tit-col> new.sentence |
| 6279 |
%<blk-tit&tit-col> add.colon |
| 6280 |
%</ay> |
| 6281 |
%<*!ay> |
| 6282 |
%<!blk-com&!blk-tit&!blk-tita> title howpublished new.block.checkb |
| 6283 |
format.title output |
| 6284 |
%<blk-com&tit-qq> end.quote.title |
| 6285 |
%<blk-tit&!tit-col> new.sentence |
| 6286 |
%<blk-tit&tit-col> add.colon |
| 6287 |
%<!blk-com&!blk-tit&!blk-tita> howpublished new.block.checka |
| 6288 |
%</!ay> |
| 6289 |
howpublished "howpublished" bibinfo.check output |
| 6290 |
%<ay&!dt-beg&!dt-end> format.date "year" output.check |
| 6291 |
%<!ay&!dt-beg&!dt-end> format.date output |
| 6292 |
%<doi|(url-doi&!url)> format.doi output |
| 6293 |
%<*url-blk&!harnm&!revdata> |
| 6294 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6295 |
format.url output |
| 6296 |
%</url-blk&!harnm&!revdata> |
| 6297 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6298 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6299 |
format.note output |
| 6300 |
%<*ay&!dt-beg&dt-end> |
| 6301 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6302 |
format.date "year" output.check |
| 6303 |
%</ay&!dt-beg&dt-end> |
| 6304 |
%<*!ay&!dt-beg&dt-end> |
| 6305 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6306 |
format.date output |
| 6307 |
%</!ay&!dt-beg&dt-end> |
| 6308 |
%<eprint> format.eprint output |
| 6309 |
%<revdata> format.url output |
| 6310 |
fin.entry |
| 6311 |
%<(harnm|url-nl)&!revdata> write.url |
| 6312 |
%<!ay> empty.misc.check |
| 6313 |
} |
| 6314 |
% \end{macrocode} |
| 6315 |
% \end{macro} |
| 6316 |
% |
| 6317 |
% \begin{macro}{`phdthesis'} |
| 6318 |
% To format a doctoral thesis. |
| 6319 |
% \begin{macrocode} |
| 6320 |
FUNCTION {phdthesis} |
| 6321 |
{ output.bibitem |
| 6322 |
format.authors "author" output.check |
| 6323 |
%<ay> author format.key output |
| 6324 |
%<au-col> add.colon |
| 6325 |
%<nmdash> name.or.dash |
| 6326 |
%<dt-beg> format.date "year" output.check |
| 6327 |
%<dt-beg> date.block |
| 6328 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6329 |
%<*!thtit-x> |
| 6330 |
%<!thtit-a> format.btitle |
| 6331 |
%<thtit-a> format.title |
| 6332 |
"title" output.check |
| 6333 |
%<thtit-a&blk-com&tit-qq> end.quote.title |
| 6334 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6335 |
%<blk-tit&!tit-col> new.sentence |
| 6336 |
%<blk-tit&tit-col> add.colon |
| 6337 |
%</!thtit-x> |
| 6338 |
bbl.phdthesis format.thesis.type output.nonnull |
| 6339 |
school "school" bibinfo.warn output |
| 6340 |
address "address" bibinfo.check output |
| 6341 |
%<!dt-beg&!dt-end> format.date "year" output.check |
| 6342 |
%<doi|(url-doi&!url)> format.doi output |
| 6343 |
%<*url-blk&!harnm&!revdata> |
| 6344 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6345 |
format.url output |
| 6346 |
%</url-blk&!harnm&!revdata> |
| 6347 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6348 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6349 |
format.note output |
| 6350 |
%<*!dt-beg&dt-end> |
| 6351 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6352 |
format.date "year" output.check |
| 6353 |
%</!dt-beg&dt-end> |
| 6354 |
%<eprint> format.eprint output |
| 6355 |
%<revdata> format.url output |
| 6356 |
fin.entry |
| 6357 |
%<(harnm|url-nl)&!revdata> write.url |
| 6358 |
} |
| 6359 |
|
| 6360 |
% \end{macrocode} |
| 6361 |
% \end{macro} |
| 6362 |
% |
| 6363 |
% \begin{macro}{`presentation'} |
| 6364 |
% \begin{macrocode} |
| 6365 |
%<*pres> |
| 6366 |
FUNCTION {presentation} |
| 6367 |
{ output.bibitem |
| 6368 |
format.authors output |
| 6369 |
%<ay> author format.key output |
| 6370 |
%<au-col> add.colon |
| 6371 |
%<nmdash> name.or.dash |
| 6372 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6373 |
format.title output |
| 6374 |
%<blk-com&tit-qq> end.quote.title |
| 6375 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6376 |
%<blk-tit&!tit-col> new.sentence |
| 6377 |
%<blk-tit&tit-col> add.colon |
| 6378 |
format.organization.address "organization and address" output.check |
| 6379 |
month "month" output.check |
| 6380 |
year "year" output.check |
| 6381 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6382 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6383 |
format.note output |
| 6384 |
new.sentence |
| 6385 |
type missing$ 'skip$ |
| 6386 |
{"(" type capitalize * ")" * output} |
| 6387 |
if$ |
| 6388 |
%<*url-blk&!harnm> |
| 6389 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6390 |
format.url output |
| 6391 |
%</url-blk&!harnm> |
| 6392 |
fin.entry |
| 6393 |
%<(harnm|url-nl)&!revdata> write.url |
| 6394 |
} |
| 6395 |
|
| 6396 |
%</pres> |
| 6397 |
% \end{macrocode} |
| 6398 |
% \end{macro} |
| 6399 |
% |
| 6400 |
% \begin{macro}{`proceedings'} |
| 6401 |
% \begin{macrocode} |
| 6402 |
%<*ay> |
| 6403 |
FUNCTION {proceedings} |
| 6404 |
{ output.bibitem |
| 6405 |
format.editors output |
| 6406 |
editor format.key output |
| 6407 |
%<au-col> add.colon |
| 6408 |
%<nmdash> name.or.dash |
| 6409 |
%<dt-beg> format.date "year" output.check |
| 6410 |
%<dt-beg> date.block |
| 6411 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6412 |
format.btitle "title" output.check |
| 6413 |
format.bvolume output |
| 6414 |
%<!numser> format.number.series output |
| 6415 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 6416 |
%<numser> format.number.series output |
| 6417 |
publisher empty$ |
| 6418 |
{ format.organization.address output } |
| 6419 |
{ organization "organization" bibinfo.check output |
| 6420 |
format.publisher.address output |
| 6421 |
} |
| 6422 |
if$ |
| 6423 |
%<!dt-beg&!dt-end&!pub-date> format.date "year" output.check |
| 6424 |
%<isbn> format.isbn output |
| 6425 |
%<issn> format.issn output |
| 6426 |
%<doi|(url-doi&!url)> format.doi output |
| 6427 |
%<*url-blk&!harnm&!revdata> |
| 6428 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6429 |
format.url output |
| 6430 |
%</url-blk&!harnm&!revdata> |
| 6431 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6432 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6433 |
format.note output |
| 6434 |
%<*!dt-beg&dt-end&!pub-date> |
| 6435 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6436 |
format.date "year" output.check |
| 6437 |
%</!dt-beg&dt-end&!pub-date> |
| 6438 |
%<eprint> format.eprint output |
| 6439 |
%<revdata> format.url output |
| 6440 |
fin.entry |
| 6441 |
%<(harnm|url-nl)&!revdata> write.url |
| 6442 |
} |
| 6443 |
|
| 6444 |
%</ay> |
| 6445 |
% \end{macrocode} |
| 6446 |
% \begin{macrocode} |
| 6447 |
%<*!ay> |
| 6448 |
FUNCTION {proceedings} |
| 6449 |
{ output.bibitem |
| 6450 |
editor empty$ |
| 6451 |
{ organization "organization" bibinfo.check output |
| 6452 |
} |
| 6453 |
{ format.editors output.nonnull } |
| 6454 |
if$ |
| 6455 |
%<au-col> add.colon |
| 6456 |
%<nmdash> name.or.dash |
| 6457 |
%<dt-beg> format.date "year" output.check |
| 6458 |
%<dt-beg> date.block |
| 6459 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6460 |
format.btitle "title" output.check |
| 6461 |
format.bvolume output |
| 6462 |
%<!numser> format.number.series output |
| 6463 |
editor empty$ |
| 6464 |
{ publisher empty$ |
| 6465 |
%<!numser> 'skip$ |
| 6466 |
%<numser> { format.number.series output } |
| 6467 |
{ |
| 6468 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 6469 |
%<numser> format.number.series output |
| 6470 |
format.publisher.address output |
| 6471 |
} |
| 6472 |
if$ |
| 6473 |
} |
| 6474 |
{ publisher empty$ |
| 6475 |
{ |
| 6476 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 6477 |
%<numser> format.number.series output |
| 6478 |
format.organization.address output } |
| 6479 |
{ |
| 6480 |
%<!blk-com&!blk-tit&!blk-tita> new.sentence |
| 6481 |
%<numser> format.number.series output |
| 6482 |
organization "organization" bibinfo.check output |
| 6483 |
format.publisher.address output |
| 6484 |
} |
| 6485 |
if$ |
| 6486 |
} |
| 6487 |
if$ |
| 6488 |
%<!dt-beg&!dt-end&!pub-date> format.date "year" output.check |
| 6489 |
%<isbn> format.isbn output |
| 6490 |
%<issn> format.issn output |
| 6491 |
%<doi|(url-doi&!url)> format.doi output |
| 6492 |
%<*url-blk&!harnm&!revdata> |
| 6493 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6494 |
format.url output |
| 6495 |
%</url-blk&!harnm&!revdata> |
| 6496 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6497 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6498 |
format.note output |
| 6499 |
%<*!dt-beg&dt-end> |
| 6500 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6501 |
format.date "year" output.check |
| 6502 |
%</!dt-beg&dt-end> |
| 6503 |
%<eprint> format.eprint output |
| 6504 |
%<revdata> format.url output |
| 6505 |
fin.entry |
| 6506 |
%<(harnm|url-nl)&!revdata> write.url |
| 6507 |
} |
| 6508 |
|
| 6509 |
%</!ay> |
| 6510 |
% \end{macrocode} |
| 6511 |
% \end{macro} |
| 6512 |
% |
| 6513 |
% \begin{macro}{`techreport'} |
| 6514 |
% \begin{macrocode} |
| 6515 |
FUNCTION {techreport} |
| 6516 |
{ output.bibitem |
| 6517 |
format.authors "author" output.check |
| 6518 |
%<ay> author format.key output |
| 6519 |
%<au-col> add.colon |
| 6520 |
%<nmdash> name.or.dash |
| 6521 |
%<dt-beg> format.date "year" output.check |
| 6522 |
%<dt-beg> date.block |
| 6523 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6524 |
%<trtit-b> format.btitle |
| 6525 |
%<!trtit-b> format.title |
| 6526 |
"title" output.check |
| 6527 |
%<!trtit-b&blk-com&tit-qq> end.quote.title |
| 6528 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6529 |
%<blk-tit&!tit-col> new.sentence |
| 6530 |
%<blk-tit&tit-col> add.colon |
| 6531 |
%<!trnum-it> format.tr.number output.nonnull |
| 6532 |
%<trnum-it> format.tr.number emphasize output.nonnull |
| 6533 |
institution "institution" bibinfo.warn output |
| 6534 |
address "address" bibinfo.check output |
| 6535 |
%<!dt-beg&!dt-end> format.date "year" output.check |
| 6536 |
%<doi|(url-doi&!url)> format.doi output |
| 6537 |
%<*url-blk&!harnm&!revdata> |
| 6538 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6539 |
format.url output |
| 6540 |
%</url-blk&!harnm&!revdata> |
| 6541 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6542 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6543 |
format.note output |
| 6544 |
%<*!dt-beg&dt-end> |
| 6545 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6546 |
format.date "year" output.check |
| 6547 |
%</!dt-beg&dt-end> |
| 6548 |
%<eprint> format.eprint output |
| 6549 |
%<revdata> format.url output |
| 6550 |
fin.entry |
| 6551 |
%<(harnm|url-nl)&!revdata> write.url |
| 6552 |
} |
| 6553 |
|
| 6554 |
% \end{macrocode} |
| 6555 |
% \end{macro} |
| 6556 |
% |
| 6557 |
% \begin{macro}{`unpublished'} |
| 6558 |
% \begin{macrocode} |
| 6559 |
FUNCTION {unpublished} |
| 6560 |
{ output.bibitem |
| 6561 |
format.authors "author" output.check |
| 6562 |
%<ay> author format.key output |
| 6563 |
%<au-col> add.colon |
| 6564 |
%<nmdash> name.or.dash |
| 6565 |
%<ay&dt-beg> format.date "year" output.check |
| 6566 |
%<!ay&dt-beg> format.date output |
| 6567 |
%<dt-beg> date.block |
| 6568 |
%<!dt-beg&!blk-com&!blk-tit&!blk-tita> new.block |
| 6569 |
format.title "title" output.check |
| 6570 |
%<blk-com&tit-qq> end.quote.title |
| 6571 |
%<ay&!dt-beg&!dt-end> format.date "year" output.check |
| 6572 |
%<!ay&!dt-beg&!dt-end> format.date output |
| 6573 |
%<doi|(url-doi&!url)> format.doi output |
| 6574 |
%<*url-blk&!harnm&!revdata> |
| 6575 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6576 |
format.url output |
| 6577 |
%</url-blk&!harnm&!revdata> |
| 6578 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6579 |
%<(blk-com|blk-tit|blk-tita)&blknt> new.sentence |
| 6580 |
format.note "note" output.check |
| 6581 |
%<*ay&!dt-beg&dt-end> |
| 6582 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6583 |
format.date output |
| 6584 |
%</ay&!dt-beg&dt-end> |
| 6585 |
%<*!ay&!dt-beg&dt-end> |
| 6586 |
%<!blk-com&!blk-tit&!blk-tita> new.block |
| 6587 |
format.date output |
| 6588 |
%</!ay&!dt-beg&dt-end> |
| 6589 |
%<eprint> format.eprint output |
| 6590 |
%<revdata> format.url output |
| 6591 |
fin.entry |
| 6592 |
%<(harnm|url-nl)&!revdata> write.url |
| 6593 |
} |
| 6594 |
|
| 6595 |
% \end{macrocode} |
| 6596 |
% \end{macro} |
| 6597 |
% |
| 6598 |
% \begin{macro}{`default.type'} |
| 6599 |
% \begin{macrocode} |
| 6600 |
FUNCTION {default.type} { misc } |
| 6601 |
% \end{macrocode} |
| 6602 |
% \end{macro} |
| 6603 |
% |
| 6604 |
% \begin{macrocode} |
| 6605 |
READ |
| 6606 |
% \end{macrocode} |
| 6607 |
% |
| 6608 |
% \begin{macrocode} |
| 6609 |
%<*ay|alph|!seq-no> |
| 6610 |
% \end{macrocode} |
| 6611 |
% |
| 6612 |
% \begin{macro}{`sortify'} |
| 6613 |
% In \texttt{btxbst.doc}/\texttt{.mbs}, the \texttt{sortify} function is |
| 6614 |
% left out for unsorted alpha-style citations. This leads to an error, |
| 6615 |
% because it is still used. So leave it in here too. \emph{In fact, do away |
| 6616 |
% with unsorted alpha style, since it is as useless as unsorted author--year |
| 6617 |
% listings.} |
| 6618 |
% \begin{macrocode} |
| 6619 |
FUNCTION {sortify} |
| 6620 |
{ purify$ |
| 6621 |
"l" change.case$ |
| 6622 |
} |
| 6623 |
% \end{macrocode} |
| 6624 |
% \end{macro} |
| 6625 |
% |
| 6626 |
% \begin{macrocode} |
| 6627 |
INTEGERS { len } |
| 6628 |
% \end{macrocode} |
| 6629 |
% |
| 6630 |
% \begin{macro}{`chop.word'} |
| 6631 |
% \begin{macrocode} |
| 6632 |
FUNCTION {chop.word} |
| 6633 |
{ 's := |
| 6634 |
'len := |
| 6635 |
s #1 len substring$ = |
| 6636 |
{ s len #1 + global.max$ substring$ } |
| 6637 |
's |
| 6638 |
if$ |
| 6639 |
} |
| 6640 |
% \end{macrocode} |
| 6641 |
% \end{macro} |
| 6642 |
% |
| 6643 |
% \begin{macrocode} |
| 6644 |
%<*!ay&alph> |
| 6645 |
% \end{macrocode} |
| 6646 |
% |
| 6647 |
% \begin{macro}{`format.lab.names'} |
| 6648 |
% The function \texttt{format.lab.names} formats by author--year or the |
| 6649 |
% \texttt{alpha} style as in the original \texttt{alpha.bst}. |
| 6650 |
% Only major difference is that there should be no unsorted (\texttt{seq-no}) |
| 6651 |
% versions of this. Patashnik was clearly very unhappy about accommodating |
| 6652 |
% such an animal, and in fact, his unsorted alpha style crashes \btx. |
| 6653 |
% I also provide the \texttt{vonx} option here to ignore the \textsl{von} |
| 6654 |
% part of the name. |
| 6655 |
% |
| 6656 |
% \begin{macrocode} |
| 6657 |
INTEGERS { et.al.char.used } |
| 6658 |
% \end{macrocode} |
| 6659 |
% |
| 6660 |
% \begin{macrocode} |
| 6661 |
FUNCTION {initialize.et.al.char.used} |
| 6662 |
{ #0 'et.al.char.used := |
| 6663 |
} |
| 6664 |
% \end{macrocode} |
| 6665 |
% |
| 6666 |
% \begin{macrocode} |
| 6667 |
EXECUTE {initialize.et.al.char.used} |
| 6668 |
% \end{macrocode} |
| 6669 |
% |
| 6670 |
% \begin{macrocode} |
| 6671 |
FUNCTION {format.lab.names} |
| 6672 |
{ 's := |
| 6673 |
%<*alf-1> |
| 6674 |
%<!vonx> s #1 "{v{}}{l{}}" format.name$ |
| 6675 |
%<vonx> s #1 "{l{}}" format.name$ |
| 6676 |
duplicate$ text.length$ #2 < |
| 6677 |
{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } |
| 6678 |
'skip$ |
| 6679 |
if$ |
| 6680 |
%</alf-1> |
| 6681 |
%<*!alf-1&alf-f> |
| 6682 |
%<!vonx> s #1 "{vv{}}{ll}" format.name$ |
| 6683 |
%<vonx> s #1 "{ll}" format.name$ |
| 6684 |
%</!alf-1&alf-f> |
| 6685 |
%<*!alf-1&!alf-f> |
| 6686 |
s num.names$ 'numnames := |
| 6687 |
numnames #1 > |
| 6688 |
{ numnames #4 > |
| 6689 |
{ #3 'namesleft := } |
| 6690 |
{ numnames 'namesleft := } |
| 6691 |
if$ |
| 6692 |
#1 'nameptr := |
| 6693 |
"" |
| 6694 |
{ namesleft #0 > } |
| 6695 |
{ nameptr numnames = |
| 6696 |
{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 6697 |
{ "{\etalchar{+}}" * |
| 6698 |
#1 'et.al.char.used := |
| 6699 |
} |
| 6700 |
%<!vonx> { s nameptr "{v{}}{l{}}" format.name$ * } |
| 6701 |
%<vonx> { s nameptr "{l{}}" format.name$ * } |
| 6702 |
if$ |
| 6703 |
} |
| 6704 |
%<!vonx> { s nameptr "{v{}}{l{}}" format.name$ * } |
| 6705 |
%<vonx> { s nameptr "{l{}}" format.name$ * } |
| 6706 |
if$ |
| 6707 |
nameptr #1 + 'nameptr := |
| 6708 |
namesleft #1 - 'namesleft := |
| 6709 |
} |
| 6710 |
while$ |
| 6711 |
numnames #4 > |
| 6712 |
{ "{\etalchar{+}}" * |
| 6713 |
#1 'et.al.char.used := |
| 6714 |
} |
| 6715 |
'skip$ |
| 6716 |
if$ |
| 6717 |
} |
| 6718 |
%<!vonx> { s #1 "{v{}}{l{}}" format.name$ |
| 6719 |
%<vonx> { s #1 "{l{}}" format.name$ |
| 6720 |
duplicate$ text.length$ #2 < |
| 6721 |
{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } |
| 6722 |
'skip$ |
| 6723 |
if$ |
| 6724 |
} |
| 6725 |
if$ |
| 6726 |
%</!alf-1&!alf-f> |
| 6727 |
} |
| 6728 |
% \end{macrocode} |
| 6729 |
% |
| 6730 |
% \begin{macrocode} |
| 6731 |
%</!ay&alph> |
| 6732 |
% \end{macrocode} |
| 6733 |
% The function for the standard citation: one or two authors cited full, but for |
| 6734 |
% more than two, only the first with \emph{et~al.} given. |
| 6735 |
% \begin{macrocode} |
| 6736 |
%<*ay&!mcite> |
| 6737 |
FUNCTION {format.lab.names} |
| 6738 |
{ 's := |
| 6739 |
"" 't := |
| 6740 |
%<!jnrlab> s #1 "{vv~}{ll}" format.name$ |
| 6741 |
%<*jnrlab> |
| 6742 |
%<!nm-rv&!nm-rvv&!nm-rvx&!nm-rvcx> s #1 "{vv~}{ll}{, jj}" format.name$ |
| 6743 |
%<nm-rv|nm-rvv|nm-rvx|nm-rvcx> s #1 "{vv~}{ll}{ jj}" format.name$ |
| 6744 |
%</jnrlab> |
| 6745 |
%<lab&and-rm> cite.name.font |
| 6746 |
s num.names$ duplicate$ |
| 6747 |
#2 > |
| 6748 |
{ pop$ |
| 6749 |
%<lab&!and-rm&(etal-it|etal-rm)> cite.name.font |
| 6750 |
%<*!etal-it> |
| 6751 |
%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font * |
| 6752 |
%<!lab|!and-rm|etal-rm> " " * bbl.etal * |
| 6753 |
%</!etal-it> |
| 6754 |
%<etal-it> " " * bbl.etal emphasize * |
| 6755 |
%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font |
| 6756 |
%<lab&!and-rm> "others" 't := |
| 6757 |
} |
| 6758 |
{ #2 < |
| 6759 |
'skip$ |
| 6760 |
{ s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 6761 |
{ |
| 6762 |
% %<lab&!and-rm&(etal-it|etal-rm)> cite.name.font |
| 6763 |
%<*!etal-it> |
| 6764 |
%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font * |
| 6765 |
%<!lab|!and-rm|etal-rm> " " * bbl.etal * |
| 6766 |
%</!etal-it> |
| 6767 |
%<etal-it> " " * bbl.etal emphasize * |
| 6768 |
%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font |
| 6769 |
%<lab&!and-rm> "others" 't := |
| 6770 |
} |
| 6771 |
%<*!harnm> |
| 6772 |
%<*!amper> |
| 6773 |
{ bbl.and space.word * s #2 "{vv~}{ll}" format.name$ |
| 6774 |
%<lab&and-rm> cite.name.font |
| 6775 |
* } |
| 6776 |
%</!amper> |
| 6777 |
%<*amper> |
| 6778 |
{ " \& " * s #2 "{vv~}{ll}" format.name$ |
| 6779 |
%<lab&and-rm> cite.name.font |
| 6780 |
* } |
| 6781 |
%</amper> |
| 6782 |
%</!harnm> |
| 6783 |
%<*harnm> |
| 6784 |
{ " \harvardand{} " * s #2 "{vv~}{ll}" format.name$ |
| 6785 |
%<lab&and-rm> cite.name.font |
| 6786 |
* } |
| 6787 |
%</harnm> |
| 6788 |
if$ |
| 6789 |
} |
| 6790 |
if$ |
| 6791 |
} |
| 6792 |
if$ |
| 6793 |
%<*lab&!and-rm> |
| 6794 |
t "others" = |
| 6795 |
'skip$ |
| 6796 |
{ cite.name.font } |
| 6797 |
if$ |
| 6798 |
%</lab&!and-rm> |
| 6799 |
} |
| 6800 |
|
| 6801 |
%</ay&!mcite> |
| 6802 |
% \end{macrocode} |
| 6803 |
% |
| 6804 |
% The code for formating author--year citations with more than one author |
| 6805 |
% before \emph{et al.} or selecting a number other than two for truncating, |
| 6806 |
% is much the same as the \texttt{format.full.names} function. |
| 6807 |
% \begin{macrocode} |
| 6808 |
%<*ay&mcite> |
| 6809 |
FUNCTION {format.lab.names} |
| 6810 |
{'s := |
| 6811 |
"" 't := |
| 6812 |
#1 'nameptr := |
| 6813 |
s num.names$ 'numnames := |
| 6814 |
numnames 'namesleft := |
| 6815 |
{ namesleft #0 > } |
| 6816 |
{ s nameptr |
| 6817 |
%<!jnrlab> "{vv~}{ll}" format.name$ |
| 6818 |
%<*jnrlab> |
| 6819 |
%<!nm-rv&!nm-rvv&!nm-rvx&!nm-rvcx> "{vv~}{ll}{, jj}" format.name$ |
| 6820 |
%<nm-rv|nm-rvv|nm-rvx|nm-rvcx> "{vv~}{ll}{ jj}" format.name$ |
| 6821 |
%</jnrlab> |
| 6822 |
%<lab&and-rm> cite.name.font |
| 6823 |
't := |
| 6824 |
nameptr #1 > |
| 6825 |
{ |
| 6826 |
%<mct-1> nameptr #2 = |
| 6827 |
%<mct-2> nameptr #3 = |
| 6828 |
%<mct-3> nameptr #4 = |
| 6829 |
%<mct-4> nameptr #5 = |
| 6830 |
%<mct-5> nameptr #6 = |
| 6831 |
%<mct-6> nameptr #7 = |
| 6832 |
%<mct-x2> numnames #2 > and |
| 6833 |
%<mct-x3> numnames #3 > and |
| 6834 |
%<mct-x4> numnames #4 > and |
| 6835 |
%<mct-x5> numnames #5 > and |
| 6836 |
%<mct-x6> numnames #6 > and |
| 6837 |
{ "others" 't := |
| 6838 |
#1 'namesleft := } |
| 6839 |
'skip$ |
| 6840 |
if$ |
| 6841 |
namesleft #1 > |
| 6842 |
{ ", " * t * } |
| 6843 |
{ |
| 6844 |
s nameptr "{ll}" format.name$ duplicate$ "others" = |
| 6845 |
{ 't := } |
| 6846 |
{ pop$ } |
| 6847 |
if$ |
| 6848 |
t "others" = |
| 6849 |
{ |
| 6850 |
%<lab&!and-rm&(etal-it|etal-rm)> cite.name.font |
| 6851 |
%<*!etal-it> |
| 6852 |
%<lab&and-rm&!etal-rm> " " * bbl.etal cite.name.font * |
| 6853 |
%<!lab|!and-rm|etal-rm> " " * bbl.etal * |
| 6854 |
%</!etal-it> |
| 6855 |
%<etal-it> " " * bbl.etal emphasize * |
| 6856 |
%<lab&!and-rm&!(etal-it|etal-rm)> cite.name.font |
| 6857 |
} |
| 6858 |
{ |
| 6859 |
%<*!harnm> |
| 6860 |
%<*!and-xcom> |
| 6861 |
numnames #2 > |
| 6862 |
{ "," * } |
| 6863 |
'skip$ |
| 6864 |
if$ |
| 6865 |
%</!and-xcom> |
| 6866 |
%<!amper> bbl.and |
| 6867 |
%<amper> "\&" |
| 6868 |
%</!harnm> |
| 6869 |
%<harnm> "\harvardand{}" |
| 6870 |
space.word * t * |
| 6871 |
} |
| 6872 |
if$ |
| 6873 |
} |
| 6874 |
if$ |
| 6875 |
} |
| 6876 |
't |
| 6877 |
if$ |
| 6878 |
nameptr #1 + 'nameptr := |
| 6879 |
namesleft #1 - 'namesleft := |
| 6880 |
} |
| 6881 |
while$ |
| 6882 |
%<*lab&!and-rm> |
| 6883 |
t "others" = |
| 6884 |
'skip$ |
| 6885 |
{ cite.name.font } |
| 6886 |
if$ |
| 6887 |
%</lab&!and-rm> |
| 6888 |
} |
| 6889 |
|
| 6890 |
%</ay&mcite> |
| 6891 |
% \end{macrocode} |
| 6892 |
% \end{macro} |
| 6893 |
% |
| 6894 |
% \begin{macro}{`author.key.label'} |
| 6895 |
% \begin{macro}{`author.editor.key.label'} |
| 6896 |
% \begin{macro}{`author.key.organization.label'} |
| 6897 |
% \begin{macro}{`editor.key.organization.label'} |
| 6898 |
% \begin{macro}{`editor.key.label'} |
| 6899 |
% Have to be very careful with the options \texttt{ay}, \texttt{alph}, and |
| 6900 |
% \texttt{seq-no} here. The first two are actually mutually exclusive, and |
| 6901 |
% \texttt{ay} should dominate. The \texttt{seq-no} option only applies for |
| 6902 |
% numerical (\texttt{!ay}) but not alphabetic (\texttt{alph}) selections. |
| 6903 |
% This whole block of coding dealing with labels is only included for |
| 6904 |
% author--year or alphabetic or ordered numerical. |
| 6905 |
% That is, \texttt{ay} or \texttt{alph} or \texttt{!seq-no} is true. |
| 6906 |
% \begin{macrocode} |
| 6907 |
%<*ay|alph> |
| 6908 |
FUNCTION {author.key.label} |
| 6909 |
{ author empty$ |
| 6910 |
{ key empty$ |
| 6911 |
{ cite$ #1 #3 substring$ } |
| 6912 |
%<ay> 'key |
| 6913 |
%<!ay> { key #3 text.prefix$ } |
| 6914 |
if$ |
| 6915 |
} |
| 6916 |
{ author format.lab.names } |
| 6917 |
if$ |
| 6918 |
} |
| 6919 |
|
| 6920 |
FUNCTION {author.editor.key.label} |
| 6921 |
{ author empty$ |
| 6922 |
{ editor empty$ |
| 6923 |
{ key empty$ |
| 6924 |
{ cite$ #1 #3 substring$ } |
| 6925 |
%<ay> 'key |
| 6926 |
%<!ay> { key #3 text.prefix$ } |
| 6927 |
if$ |
| 6928 |
} |
| 6929 |
{ editor format.lab.names } |
| 6930 |
if$ |
| 6931 |
} |
| 6932 |
{ author format.lab.names } |
| 6933 |
if$ |
| 6934 |
} |
| 6935 |
|
| 6936 |
%</ay|alph> |
| 6937 |
%<*!ay&alph> |
| 6938 |
FUNCTION {author.key.organization.label} |
| 6939 |
{ author empty$ |
| 6940 |
{ key empty$ |
| 6941 |
{ organization empty$ |
| 6942 |
{ cite$ #1 #3 substring$ } |
| 6943 |
{ "The " #4 organization chop.word #3 text.prefix$ } |
| 6944 |
if$ |
| 6945 |
} |
| 6946 |
{ key #3 text.prefix$ } |
| 6947 |
if$ |
| 6948 |
} |
| 6949 |
{ author format.lab.names } |
| 6950 |
if$ |
| 6951 |
} |
| 6952 |
|
| 6953 |
FUNCTION {editor.key.organization.label} |
| 6954 |
{ editor empty$ |
| 6955 |
{ key empty$ |
| 6956 |
{ organization empty$ |
| 6957 |
{ cite$ #1 #3 substring$ } |
| 6958 |
{ "The " #4 organization chop.word #3 text.prefix$ } |
| 6959 |
if$ |
| 6960 |
} |
| 6961 |
{ key #3 text.prefix$ } |
| 6962 |
if$ |
| 6963 |
} |
| 6964 |
{ editor format.lab.names } |
| 6965 |
if$ |
| 6966 |
} |
| 6967 |
|
| 6968 |
%</!ay&alph> |
| 6969 |
%<*ay> |
| 6970 |
FUNCTION {editor.key.label} |
| 6971 |
{ editor empty$ |
| 6972 |
{ key empty$ |
| 6973 |
{ cite$ #1 #3 substring$ } |
| 6974 |
'key |
| 6975 |
if$ |
| 6976 |
} |
| 6977 |
{ editor format.lab.names } |
| 6978 |
if$ |
| 6979 |
} |
| 6980 |
|
| 6981 |
% \end{macrocode} |
| 6982 |
% \end{macro} |
| 6983 |
% \end{macro} |
| 6984 |
% \end{macro} |
| 6985 |
% \end{macro} |
| 6986 |
% \end{macro} |
| 6987 |
% |
| 6988 |
% \begin{macro}{`calc.short.authors'} |
| 6989 |
% \begin{macrocode} |
| 6990 |
FUNCTION {calc.short.authors} |
| 6991 |
{ type$ "book" = |
| 6992 |
type$ "inbook" = |
| 6993 |
or |
| 6994 |
'author.editor.key.label |
| 6995 |
{ type$ "proceedings" = |
| 6996 |
'editor.key.label |
| 6997 |
'author.key.label |
| 6998 |
if$ |
| 6999 |
} |
| 7000 |
if$ |
| 7001 |
'short.list := |
| 7002 |
} |
| 7003 |
|
| 7004 |
% \end{macrocode} |
| 7005 |
% \end{macro} |
| 7006 |
% |
| 7007 |
% \begin{macro}{`calc.label'} |
| 7008 |
% \begin{macrocode} |
| 7009 |
FUNCTION {calc.label} |
| 7010 |
{ calc.short.authors |
| 7011 |
short.list |
| 7012 |
%<!(har|ast|cay|nmd|alk|cn)> "(" |
| 7013 |
%<har|ast|cay|nmd|alk|cn> ", " |
| 7014 |
* |
| 7015 |
year duplicate$ empty$ |
| 7016 |
%<keyxyr> short.list key field.or.null = or |
| 7017 |
%<(blkyear|keyxyr)> { pop$ "" } |
| 7018 |
%<!(blkyear|keyxyr)> { pop$ "????" } |
| 7019 |
%<!note-yr> { purify$ #-1 #4 substring$ } |
| 7020 |
%<note-yr> 'skip$ |
| 7021 |
if$ |
| 7022 |
* |
| 7023 |
'label := |
| 7024 |
} |
| 7025 |
|
| 7026 |
%</ay> |
| 7027 |
%<*!ay&alph> |
| 7028 |
FUNCTION {calc.label} |
| 7029 |
{ type$ "book" = |
| 7030 |
type$ "inbook" = |
| 7031 |
or |
| 7032 |
'author.editor.key.label |
| 7033 |
{ type$ "proceedings" = |
| 7034 |
'editor.key.organization.label |
| 7035 |
{ type$ "manual" = |
| 7036 |
'author.key.organization.label |
| 7037 |
'author.key.label |
| 7038 |
if$ |
| 7039 |
} |
| 7040 |
if$ |
| 7041 |
} |
| 7042 |
if$ |
| 7043 |
duplicate$ |
| 7044 |
year field.or.null purify$ #-1 #2 substring$ |
| 7045 |
* |
| 7046 |
'label := |
| 7047 |
year field.or.null purify$ #-1 #4 substring$ |
| 7048 |
* |
| 7049 |
sortify 'sort.label := |
| 7050 |
} |
| 7051 |
% \end{macrocode} |
| 7052 |
% \end{macro} |
| 7053 |
% |
| 7054 |
% \begin{macrocode} |
| 7055 |
%</!ay&alph> |
| 7056 |
% \end{macrocode} |
| 7057 |
% |
| 7058 |
% \begin{macrocode} |
| 7059 |
%<*ay> |
| 7060 |
% \end{macrocode} |
| 7061 |
% |
| 7062 |
% \begin{macrocode} |
| 7063 |
%<*har|cay|nmd|ast|cn> |
| 7064 |
% \end{macrocode} |
| 7065 |
% |
| 7066 |
% \begin{macro}{`calc.short.label'} |
| 7067 |
% \begin{macrocode} |
| 7068 |
FUNCTION {calc.short.label} |
| 7069 |
{ calc.short.authors short.list |
| 7070 |
'label := |
| 7071 |
} |
| 7072 |
% \end{macrocode} |
| 7073 |
% \end{macro} |
| 7074 |
% |
| 7075 |
% \begin{macrocode} |
| 7076 |
%</har|cay|nmd|ast|cn> |
| 7077 |
% \end{macrocode} |
| 7078 |
% |
| 7079 |
% \begin{macrocode} |
| 7080 |
%</ay> |
| 7081 |
% \end{macrocode} |
| 7082 |
% |
| 7083 |
% \begin{macro}{`sort.format.names'} |
| 7084 |
% \begin{macrocode} |
| 7085 |
FUNCTION {sort.format.names} |
| 7086 |
{ 's := |
| 7087 |
#1 'nameptr := |
| 7088 |
"" |
| 7089 |
s num.names$ 'numnames := |
| 7090 |
numnames 'namesleft := |
| 7091 |
{ namesleft #0 > } |
| 7092 |
{ s nameptr |
| 7093 |
%<*xintls> |
| 7094 |
%<!vonx> "{vv{ } }{ll{ }}" |
| 7095 |
%<vonx> "{ll{ }}" |
| 7096 |
%</xintls> |
| 7097 |
%<*!xintls> |
| 7098 |
%<*!nm-init&!nm-rev&!nm-rev1&!nm-rv&!nm-rvx&!nm-rvcx&!nm-rvv&!nm-rvvc> |
| 7099 |
%<!vonx> "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" |
| 7100 |
%<vonx> "{ll{ }}{ ff{ }}{ jj{ }}" |
| 7101 |
%</!nm-init&!nm-rev&!nm-rev1&!nm-rv&!nm-rvx&!nm-rvcx&!nm-rvv&!nm-rvvc> |
| 7102 |
%<*nm-init|nm-rev|nm-rev1|nm-rv|nm-rvx|nm-rvcx|nm-rvv|nm-rvvc> |
| 7103 |
%<!vonx> "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" |
| 7104 |
%<vonx> "{ll{ }}{ f{ }}{ jj{ }}" |
| 7105 |
%</nm-init|nm-rev|nm-rev1|nm-rv|nm-rvx|nm-rvcx|nm-rvv|nm-rvvc> |
| 7106 |
%</!xintls> |
| 7107 |
format.name$ 't := |
| 7108 |
nameptr #1 > |
| 7109 |
{ |
| 7110 |
%<*nmlm> |
| 7111 |
%<m1> nameptr #1 |
| 7112 |
%<m2> nameptr #2 |
| 7113 |
%<m3> nameptr #3 |
| 7114 |
%<m4> nameptr #4 |
| 7115 |
%<m5> nameptr #5 |
| 7116 |
%<m6> nameptr #6 |
| 7117 |
%<m7> nameptr #7 |
| 7118 |
%<m8> nameptr #8 |
| 7119 |
%<m9> nameptr #9 |
| 7120 |
%<m0> nameptr #0 |
| 7121 |
%<m10> #10 + |
| 7122 |
%<m20> #20 + |
| 7123 |
%<m30> #30 + |
| 7124 |
%<m40> #40 + |
| 7125 |
%<m50> #50 + |
| 7126 |
%<m60> #60 + |
| 7127 |
%<m70> #70 + |
| 7128 |
%<m80> #80 + |
| 7129 |
%<m90> #90 + |
| 7130 |
#1 + = |
| 7131 |
%<x1> numnames #1 |
| 7132 |
%<x2> numnames #2 |
| 7133 |
%<x3> numnames #3 |
| 7134 |
%<x4> numnames #4 |
| 7135 |
%<x5> numnames #5 |
| 7136 |
%<x6> numnames #6 |
| 7137 |
%<x7> numnames #7 |
| 7138 |
%<x8> numnames #8 |
| 7139 |
%<x9> numnames #9 |
| 7140 |
%<x0> numnames #0 |
| 7141 |
%<x10> #10 + |
| 7142 |
%<x20> #20 + |
| 7143 |
%<x30> #30 + |
| 7144 |
%<x40> #40 + |
| 7145 |
%<x50> #50 + |
| 7146 |
%<x60> #60 + |
| 7147 |
%<x70> #70 + |
| 7148 |
%<x80> #80 + |
| 7149 |
%<x90> #90 + |
| 7150 |
> and |
| 7151 |
{ "others" 't := |
| 7152 |
#1 'namesleft := } |
| 7153 |
'skip$ |
| 7154 |
if$ |
| 7155 |
%</nmlm> |
| 7156 |
" " * |
| 7157 |
namesleft #1 = t "others" = and |
| 7158 |
{ "zzzzz" 't := } |
| 7159 |
'skip$ |
| 7160 |
if$ |
| 7161 |
%<*seq-lab|seq-key|seq-labc> |
| 7162 |
numnames #2 > nameptr #2 = and |
| 7163 |
{ "zz" * year field.or.null * " " * |
| 7164 |
%<seq-labc> #1 'namesleft := |
| 7165 |
} |
| 7166 |
%<seq-labc> { t sortify * } |
| 7167 |
%<!seq-labc> 'skip$ |
| 7168 |
if$ |
| 7169 |
%</seq-lab|seq-key|seq-labc> |
| 7170 |
%<!seq-labc> t sortify * |
| 7171 |
} |
| 7172 |
{ t sortify * } |
| 7173 |
if$ |
| 7174 |
nameptr #1 + 'nameptr := |
| 7175 |
namesleft #1 - 'namesleft := |
| 7176 |
} |
| 7177 |
while$ |
| 7178 |
} |
| 7179 |
|
| 7180 |
% \end{macrocode} |
| 7181 |
% \end{macro} |
| 7182 |
% |
| 7183 |
% \begin{macro}{`sort.format.title'} |
| 7184 |
% \begin{macrocode} |
| 7185 |
FUNCTION {sort.format.title} |
| 7186 |
{ 't := |
| 7187 |
"A " #2 |
| 7188 |
"An " #3 |
| 7189 |
"The " #4 t chop.word |
| 7190 |
chop.word |
| 7191 |
chop.word |
| 7192 |
sortify |
| 7193 |
#1 global.max$ substring$ |
| 7194 |
} |
| 7195 |
% \end{macrocode} |
| 7196 |
% \end{macro} |
| 7197 |
% |
| 7198 |
% \begin{macro}{`author.sort'} |
| 7199 |
% \begin{macrocode} |
| 7200 |
FUNCTION {author.sort} |
| 7201 |
{ author empty$ |
| 7202 |
{ key empty$ |
| 7203 |
{ "to sort, need author or key in " cite$ * warning$ |
| 7204 |
"" |
| 7205 |
} |
| 7206 |
{ key sortify } |
| 7207 |
if$ |
| 7208 |
} |
| 7209 |
{ author sort.format.names } |
| 7210 |
if$ |
| 7211 |
} |
| 7212 |
% \end{macrocode} |
| 7213 |
% \end{macro} |
| 7214 |
% |
| 7215 |
% \begin{macro}{`author.editor.sort'} |
| 7216 |
% \begin{macrocode} |
| 7217 |
FUNCTION {author.editor.sort} |
| 7218 |
{ author empty$ |
| 7219 |
{ editor empty$ |
| 7220 |
{ key empty$ |
| 7221 |
{ "to sort, need author, editor, or key in " cite$ * warning$ |
| 7222 |
"" |
| 7223 |
} |
| 7224 |
{ key sortify } |
| 7225 |
if$ |
| 7226 |
} |
| 7227 |
{ editor sort.format.names } |
| 7228 |
if$ |
| 7229 |
} |
| 7230 |
{ author sort.format.names } |
| 7231 |
if$ |
| 7232 |
} |
| 7233 |
% \end{macrocode} |
| 7234 |
% \end{macro} |
| 7235 |
% |
| 7236 |
% \begin{macro}{`negate.year'} |
| 7237 |
% This function negates the year by substituting each digit by its |
| 7238 |
% complement. That is, 0 $\rightarrow$ 9, 1 $\rightarrow$ 8, etc. This is used |
| 7239 |
% to provide ordering by descending year (latest year first). |
| 7240 |
% \begin{macrocode} |
| 7241 |
%<*seq-yrr&!seq-yr> |
| 7242 |
FUNCTION {negate.year} |
| 7243 |
{ year empty$ |
| 7244 |
{ "99999" } |
| 7245 |
{ year #1 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ |
| 7246 |
year #2 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ * |
| 7247 |
year #3 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ * |
| 7248 |
year #4 #1 substring$ chr.to.int$ #105 swap$ - int.to.chr$ * |
| 7249 |
} |
| 7250 |
if$ |
| 7251 |
} |
| 7252 |
%</seq-yrr&!seq-yr> |
| 7253 |
% \end{macrocode} |
| 7254 |
% \end{macro} |
| 7255 |
% |
| 7256 |
% \begin{macrocode} |
| 7257 |
%<*ay> |
| 7258 |
% \end{macrocode} |
| 7259 |
% |
| 7260 |
% \begin{macro}{`editor.sort'} |
| 7261 |
% \begin{macrocode} |
| 7262 |
FUNCTION {editor.sort} |
| 7263 |
{ editor empty$ |
| 7264 |
{ key empty$ |
| 7265 |
{ "to sort, need editor or key in " cite$ * warning$ |
| 7266 |
"" |
| 7267 |
} |
| 7268 |
{ key sortify } |
| 7269 |
if$ |
| 7270 |
} |
| 7271 |
{ editor sort.format.names } |
| 7272 |
if$ |
| 7273 |
} |
| 7274 |
% \end{macrocode} |
| 7275 |
% \end{macro} |
| 7276 |
% |
| 7277 |
% \begin{macrocode} |
| 7278 |
%<*seq-no> |
| 7279 |
% \end{macrocode} |
| 7280 |
% |
| 7281 |
% \begin{macrocode} |
| 7282 |
INTEGERS { seq.num } |
| 7283 |
% \end{macrocode} |
| 7284 |
% |
| 7285 |
% \begin{macro}{`init.seq'} |
| 7286 |
% \begin{macrocode} |
| 7287 |
FUNCTION {init.seq} |
| 7288 |
{ #0 'seq.num :=} |
| 7289 |
% \end{macrocode} |
| 7290 |
% \end{macro} |
| 7291 |
% |
| 7292 |
% \begin{macrocode} |
| 7293 |
EXECUTE {init.seq} |
| 7294 |
% \end{macrocode} |
| 7295 |
% |
| 7296 |
% \begin{macro}{`int.to.fix'} |
| 7297 |
% \begin{macrocode} |
| 7298 |
FUNCTION {int.to.fix} |
| 7299 |
{ "000000000" swap$ int.to.str$ * |
| 7300 |
#-1 #10 substring$ |
| 7301 |
} |
| 7302 |
% \end{macrocode} |
| 7303 |
% \end{macro} |
| 7304 |
% |
| 7305 |
% \begin{macrocode} |
| 7306 |
%</seq-no> |
| 7307 |
% \end{macrocode} |
| 7308 |
% |
| 7309 |
% \begin{macro}{`presort'} |
| 7310 |
% For unsorted author--year, make up the final sorting order in |
| 7311 |
% \texttt{sort.label} with the original sequence number, for unsorting later. |
| 7312 |
% \begin{macrocode} |
| 7313 |
FUNCTION {presort} |
| 7314 |
{ calc.label |
| 7315 |
label sortify |
| 7316 |
" " |
| 7317 |
* |
| 7318 |
%<*!seq-no> |
| 7319 |
type$ "book" = |
| 7320 |
type$ "inbook" = |
| 7321 |
or |
| 7322 |
'author.editor.sort |
| 7323 |
{ type$ "proceedings" = |
| 7324 |
'editor.sort |
| 7325 |
'author.sort |
| 7326 |
if$ |
| 7327 |
} |
| 7328 |
if$ |
| 7329 |
#1 entry.max$ substring$ |
| 7330 |
%</!seq-no> |
| 7331 |
%<*seq-no> |
| 7332 |
seq.num #1 + 'seq.num := |
| 7333 |
seq.num int.to.fix |
| 7334 |
%</seq-no> |
| 7335 |
'sort.label := |
| 7336 |
sort.label |
| 7337 |
* |
| 7338 |
%<seq-yr> " " * year field.or.null * |
| 7339 |
%<seq-yrr&!seq-yr> " " * negate.year field.or.null * |
| 7340 |
%<*!seq-key&!seq-labc&!seq-yr&!seq-yrr> |
| 7341 |
" " |
| 7342 |
* |
| 7343 |
title field.or.null |
| 7344 |
sort.format.title |
| 7345 |
* |
| 7346 |
%</!seq-key&!seq-labc&!seq-yr&!seq-yrr> |
| 7347 |
%<seq-key|seq-yr|seq-yrr> " " * cite$ * |
| 7348 |
#1 entry.max$ substring$ |
| 7349 |
'sort.key$ := |
| 7350 |
% "For " cite$ * ", sort.key=" * sort.key$ * warning$ |
| 7351 |
} |
| 7352 |
|
| 7353 |
% \end{macrocode} |
| 7354 |
% \end{macro} |
| 7355 |
% |
| 7356 |
% \begin{macrocode} |
| 7357 |
%</ay> |
| 7358 |
% \end{macrocode} |
| 7359 |
% |
| 7360 |
% \begin{macrocode} |
| 7361 |
%<*!ay> |
| 7362 |
% \end{macrocode} |
| 7363 |
% |
| 7364 |
% \begin{macro}{`author.organization.sort'} |
| 7365 |
% \begin{macrocode} |
| 7366 |
FUNCTION {author.organization.sort} |
| 7367 |
{ author empty$ |
| 7368 |
{ organization empty$ |
| 7369 |
{ key empty$ |
| 7370 |
{ "to sort, need author, organization, or key in " cite$ * warning$ |
| 7371 |
"" |
| 7372 |
} |
| 7373 |
{ key sortify } |
| 7374 |
if$ |
| 7375 |
} |
| 7376 |
{ "The " #4 organization chop.word sortify } |
| 7377 |
if$ |
| 7378 |
} |
| 7379 |
{ author sort.format.names } |
| 7380 |
if$ |
| 7381 |
} |
| 7382 |
% \end{macrocode} |
| 7383 |
% \end{macro} |
| 7384 |
% |
| 7385 |
% \begin{macro}{`editor.organization.sort'} |
| 7386 |
% \begin{macrocode} |
| 7387 |
FUNCTION {editor.organization.sort} |
| 7388 |
{ editor empty$ |
| 7389 |
{ organization empty$ |
| 7390 |
{ key empty$ |
| 7391 |
{ "to sort, need editor, organization, or key in " cite$ * warning$ |
| 7392 |
"" |
| 7393 |
} |
| 7394 |
{ key sortify } |
| 7395 |
if$ |
| 7396 |
} |
| 7397 |
{ "The " #4 organization chop.word sortify } |
| 7398 |
if$ |
| 7399 |
} |
| 7400 |
{ editor sort.format.names } |
| 7401 |
if$ |
| 7402 |
} |
| 7403 |
% \end{macrocode} |
| 7404 |
% \end{macro} |
| 7405 |
% |
| 7406 |
% \begin{macro}{`presort'} |
| 7407 |
% \begin{macrocode} |
| 7408 |
FUNCTION {presort} |
| 7409 |
%<*alph> |
| 7410 |
{ calc.label |
| 7411 |
sort.label |
| 7412 |
" " |
| 7413 |
* |
| 7414 |
type$ "book" = |
| 7415 |
%</alph> |
| 7416 |
%<!alph>{ type$ "book" = |
| 7417 |
type$ "inbook" = |
| 7418 |
or |
| 7419 |
'author.editor.sort |
| 7420 |
{ type$ "proceedings" = |
| 7421 |
'editor.organization.sort |
| 7422 |
{ type$ "manual" = |
| 7423 |
'author.organization.sort |
| 7424 |
'author.sort |
| 7425 |
if$ |
| 7426 |
} |
| 7427 |
if$ |
| 7428 |
} |
| 7429 |
if$ |
| 7430 |
%<alph> * |
| 7431 |
" " |
| 7432 |
* |
| 7433 |
%<seq-yrr> negate.year field.or.null sortify |
| 7434 |
%<!seq-yrr> year field.or.null sortify |
| 7435 |
%<!(seq-yr|seq-yrr)|alph> * |
| 7436 |
" " |
| 7437 |
* |
| 7438 |
%<(seq-yr|seq-yrr)&!alph> swap$ * |
| 7439 |
title field.or.null |
| 7440 |
sort.format.title |
| 7441 |
* |
| 7442 |
#1 entry.max$ substring$ |
| 7443 |
'sort.key$ := |
| 7444 |
} |
| 7445 |
% \end{macrocode} |
| 7446 |
% \end{macro} |
| 7447 |
% |
| 7448 |
% \begin{macrocode} |
| 7449 |
%</!ay> |
| 7450 |
% \end{macrocode} |
| 7451 |
% |
| 7452 |
% \begin{macrocode} |
| 7453 |
ITERATE {presort} |
| 7454 |
% \end{macrocode} |
| 7455 |
% |
| 7456 |
% \begin{macrocode} |
| 7457 |
SORT |
| 7458 |
% \end{macrocode} |
| 7459 |
% |
| 7460 |
% \begin{macrocode} |
| 7461 |
%</ay|alph|!seq-no> |
| 7462 |
% \end{macrocode} |
| 7463 |
% |
| 7464 |
% With version~6.0 of \texttt{natbib}, the author-year styles can also be |
| 7465 |
% used for numerical citations; then the \texttt{thebibliography} environment |
| 7466 |
% must have an argument indicating the length of the longest label. |
| 7467 |
% Simply count the references and add this number as the argument. |
| 7468 |
% \begin{macrocode} |
| 7469 |
%<*ay> |
| 7470 |
% \end{macrocode} |
| 7471 |
% |
| 7472 |
% \begin{macrocode} |
| 7473 |
STRINGS { last.label next.extra } |
| 7474 |
% \end{macrocode} |
| 7475 |
% |
| 7476 |
% With computer-generated articles, it is possible to have more than 26 articles |
| 7477 |
% in one year. It has finally occurred that the extra labels go beyond `z'. |
| 7478 |
% The current code now allows for `aa', \dots `az', 'ba', \dots `zz'. This |
| 7479 |
% code was provided by Joseph Wright (2007 Oct 10). |
| 7480 |
% \begin{macrocode} |
| 7481 |
INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label } |
| 7482 |
% \end{macrocode} |
| 7483 |
% |
| 7484 |
% \begin{macro}{`initialize.extra.label.stuff'} |
| 7485 |
% \begin{macrocode} |
| 7486 |
FUNCTION {initialize.extra.label.stuff} |
| 7487 |
{ #0 int.to.chr$ 'last.label := |
| 7488 |
"" 'next.extra := |
| 7489 |
#0 'last.extra.num := |
| 7490 |
"a" chr.to.int$ #1 - 'last.extra.num.blank := |
| 7491 |
last.extra.num.blank 'last.extra.num.extended := |
| 7492 |
#0 'number.label := |
| 7493 |
} |
| 7494 |
% \end{macrocode} |
| 7495 |
% \end{macro} |
| 7496 |
% |
| 7497 |
% \begin{macro}{`forward.pass'} |
| 7498 |
% \begin{macrocode} |
| 7499 |
FUNCTION {forward.pass} |
| 7500 |
{ last.label label = |
| 7501 |
{ last.extra.num #1 + 'last.extra.num := |
| 7502 |
last.extra.num "z" chr.to.int$ > |
| 7503 |
{ "a" chr.to.int$ 'last.extra.num := |
| 7504 |
last.extra.num.extended #1 + 'last.extra.num.extended := |
| 7505 |
} |
| 7506 |
'skip$ |
| 7507 |
if$ |
| 7508 |
last.extra.num.extended last.extra.num.blank > |
| 7509 |
{ last.extra.num.extended int.to.chr$ |
| 7510 |
last.extra.num int.to.chr$ |
| 7511 |
* 'extra.label := } |
| 7512 |
{ last.extra.num int.to.chr$ 'extra.label := } |
| 7513 |
if$ |
| 7514 |
} |
| 7515 |
{ "a" chr.to.int$ 'last.extra.num := |
| 7516 |
"" 'extra.label := |
| 7517 |
label 'last.label := |
| 7518 |
} |
| 7519 |
if$ |
| 7520 |
number.label #1 + 'number.label := |
| 7521 |
} |
| 7522 |
% \end{macrocode} |
| 7523 |
% \end{macro} |
| 7524 |
% |
| 7525 |
% \begin{macrocode} |
| 7526 |
%</ay> |
| 7527 |
% \end{macrocode} |
| 7528 |
% |
| 7529 |
% \begin{macrocode} |
| 7530 |
%<*!ay&alph> |
| 7531 |
% \end{macrocode} |
| 7532 |
% |
| 7533 |
% \begin{macrocode} |
| 7534 |
STRINGS { longest.label last.sort.label next.extra } |
| 7535 |
% \end{macrocode} |
| 7536 |
% |
| 7537 |
% \begin{macrocode} |
| 7538 |
INTEGERS { longest.label.width last.extra.num } |
| 7539 |
% \end{macrocode} |
| 7540 |
% |
| 7541 |
% \begin{macro}{`initialize.longest.label'} |
| 7542 |
% \begin{macrocode} |
| 7543 |
FUNCTION {initialize.longest.label} |
| 7544 |
{ "" 'longest.label := |
| 7545 |
#0 int.to.chr$ 'last.sort.label := |
| 7546 |
"" 'next.extra := |
| 7547 |
#0 'longest.label.width := |
| 7548 |
#0 'last.extra.num := |
| 7549 |
} |
| 7550 |
% \end{macrocode} |
| 7551 |
% \end{macro} |
| 7552 |
% |
| 7553 |
% \begin{macro}{`forward.pass'} |
| 7554 |
% \begin{macrocode} |
| 7555 |
FUNCTION {forward.pass} |
| 7556 |
{ last.sort.label sort.label = |
| 7557 |
{ last.extra.num #1 + 'last.extra.num := |
| 7558 |
last.extra.num int.to.chr$ 'extra.label := |
| 7559 |
} |
| 7560 |
{ "a" chr.to.int$ 'last.extra.num := |
| 7561 |
"" 'extra.label := |
| 7562 |
sort.label 'last.sort.label := |
| 7563 |
} |
| 7564 |
if$ |
| 7565 |
} |
| 7566 |
% \end{macrocode} |
| 7567 |
% \end{macro} |
| 7568 |
% |
| 7569 |
% \begin{macrocode} |
| 7570 |
%</!ay&alph> |
| 7571 |
% \end{macrocode} |
| 7572 |
% |
| 7573 |
% \begin{macro}{`reverse.pass'} |
| 7574 |
% The extra label is added in braces so that natbib can treat it as one unit. |
| 7575 |
% This allows extra labels to be more than one letter long. For non-NFSS |
| 7576 |
% emphasizing, this is no problem, since labels go in |{\em a}|, but for |
| 7577 |
% non-emphasizing and for NFSS, it caused troubles without the braces. |
| 7578 |
% The trouble arises with multiple citations in one |\cite| in which |
| 7579 |
% authors and years are the same, and only the extra label is given for |
| 7580 |
% the next one. Note: |\emph{a}| is more than one letter long in this sense, |
| 7581 |
% so it is not just a problem for more than 26 papers with same authors and |
| 7582 |
% year. |
| 7583 |
% |
| 7584 |
% The command |\natexlab| now encloses the extra label for \texttt{natbib} |
| 7585 |
% styles. This command normally just prints its argument, but for numerical |
| 7586 |
% citation mode, it swallows its argument. This allows the extra labels to |
| 7587 |
% be suppressed for numerical citations where they are superfluous. |
| 7588 |
% The enclosing braces mentioned above must be included here to make the |
| 7589 |
% entire extra label text a single token for \texttt{natbib}. |
| 7590 |
% \begin{macrocode} |
| 7591 |
%<*ay> |
| 7592 |
% \end{macrocode} |
| 7593 |
% |
| 7594 |
% \begin{macrocode} |
| 7595 |
FUNCTION {reverse.pass} |
| 7596 |
{ next.extra "b" = |
| 7597 |
{ "a" 'extra.label := } |
| 7598 |
'skip$ |
| 7599 |
if$ |
| 7600 |
extra.label 'next.extra := |
| 7601 |
extra.label |
| 7602 |
%<xlab-it> emphasize |
| 7603 |
%<*!html> |
| 7604 |
duplicate$ empty$ |
| 7605 |
'skip$ |
| 7606 |
{ "{\natexlab{" swap$ * "}}" * } |
| 7607 |
if$ |
| 7608 |
%</!html> |
| 7609 |
'extra.label := |
| 7610 |
%<!(har|ast|cay|nmd|cn)> label extra.label * 'label := |
| 7611 |
} |
| 7612 |
% \end{macrocode} |
| 7613 |
% |
| 7614 |
% \begin{macrocode} |
| 7615 |
%</ay> |
| 7616 |
% \end{macrocode} |
| 7617 |
% |
| 7618 |
% \begin{macrocode} |
| 7619 |
%<*!ay&alph> |
| 7620 |
% \end{macrocode} |
| 7621 |
% |
| 7622 |
% \begin{macrocode} |
| 7623 |
FUNCTION {reverse.pass} |
| 7624 |
{ next.extra "b" = |
| 7625 |
{ "a" 'extra.label := } |
| 7626 |
'skip$ |
| 7627 |
if$ |
| 7628 |
label extra.label * 'label := |
| 7629 |
label width$ longest.label.width > |
| 7630 |
{ label 'longest.label := |
| 7631 |
label width$ 'longest.label.width := |
| 7632 |
} |
| 7633 |
'skip$ |
| 7634 |
if$ |
| 7635 |
extra.label 'next.extra := |
| 7636 |
} |
| 7637 |
% \end{macrocode} |
| 7638 |
% |
| 7639 |
% \begin{macrocode} |
| 7640 |
%</!ay&alph> |
| 7641 |
% \end{macrocode} |
| 7642 |
% \end{macro} |
| 7643 |
% |
| 7644 |
% \begin{macrocode} |
| 7645 |
%<ay>EXECUTE {initialize.extra.label.stuff} |
| 7646 |
%<!ay&alph>EXECUTE {initialize.longest.label} |
| 7647 |
% \end{macrocode} |
| 7648 |
% |
| 7649 |
% \begin{macrocode} |
| 7650 |
%<*ay|alph> |
| 7651 |
ITERATE {forward.pass} |
| 7652 |
% \end{macrocode} |
| 7653 |
% |
| 7654 |
% \begin{macrocode} |
| 7655 |
REVERSE {reverse.pass} |
| 7656 |
% \end{macrocode} |
| 7657 |
% |
| 7658 |
% \begin{macrocode} |
| 7659 |
%</ay|alph> |
| 7660 |
% \end{macrocode} |
| 7661 |
% |
| 7662 |
% \begin{macrocode} |
| 7663 |
%<*ay> |
| 7664 |
FUNCTION {bib.sort.order} |
| 7665 |
{ sort.label |
| 7666 |
" " |
| 7667 |
* |
| 7668 |
%<seq-yrr> negate.year field.or.null sortify |
| 7669 |
%<!seq-yrr> year field.or.null sortify |
| 7670 |
%<(seq-yr|seq-yrr)&!(seq-lab|seq-key|seq-labc)> swap$ |
| 7671 |
* |
| 7672 |
%<*!seq-key&!seq-labc&!seq-yr&!seq-yrr> |
| 7673 |
" " |
| 7674 |
* |
| 7675 |
title field.or.null |
| 7676 |
sort.format.title |
| 7677 |
* |
| 7678 |
%</!seq-key&!seq-labc&!seq-yr&!seq-yrr> |
| 7679 |
%<seq-key|seq-yr|seq-yrr> " " * cite$ * |
| 7680 |
#1 entry.max$ substring$ |
| 7681 |
'sort.key$ := |
| 7682 |
% "For " cite$ * ", bib.sort.key=" * sort.key$ * warning$ |
| 7683 |
%<har|cay|nmd|cn|ast> calc.short.label |
| 7684 |
} |
| 7685 |
% \end{macrocode} |
| 7686 |
% |
| 7687 |
% \begin{macrocode} |
| 7688 |
ITERATE {bib.sort.order} |
| 7689 |
% \end{macrocode} |
| 7690 |
% |
| 7691 |
% \begin{macrocode} |
| 7692 |
SORT |
| 7693 |
% \end{macrocode} |
| 7694 |
% |
| 7695 |
% \begin{macrocode} |
| 7696 |
%</ay> |
| 7697 |
% \end{macrocode} |
| 7698 |
% |
| 7699 |
% \begin{macrocode} |
| 7700 |
%<*!ay&!alph> |
| 7701 |
% \end{macrocode} |
| 7702 |
% |
| 7703 |
% \begin{macrocode} |
| 7704 |
STRINGS { longest.label } |
| 7705 |
% \end{macrocode} |
| 7706 |
% |
| 7707 |
% \begin{macrocode} |
| 7708 |
INTEGERS { number.label longest.label.width } |
| 7709 |
% \end{macrocode} |
| 7710 |
% |
| 7711 |
% \begin{macrocode} |
| 7712 |
FUNCTION {initialize.longest.label} |
| 7713 |
{ "" 'longest.label := |
| 7714 |
#1 'number.label := |
| 7715 |
#0 'longest.label.width := |
| 7716 |
} |
| 7717 |
% \end{macrocode} |
| 7718 |
% |
| 7719 |
% \begin{macrocode} |
| 7720 |
FUNCTION {longest.label.pass} |
| 7721 |
%<*!cite> |
| 7722 |
{ number.label int.to.str$ 'label := |
| 7723 |
number.label #1 + 'number.label := |
| 7724 |
%</!cite> |
| 7725 |
%<cite>{ cite$ 'label := |
| 7726 |
label width$ longest.label.width > |
| 7727 |
{ label 'longest.label := |
| 7728 |
label width$ 'longest.label.width := |
| 7729 |
} |
| 7730 |
'skip$ |
| 7731 |
if$ |
| 7732 |
} |
| 7733 |
% \end{macrocode} |
| 7734 |
% |
| 7735 |
% \begin{macrocode} |
| 7736 |
EXECUTE {initialize.longest.label} |
| 7737 |
% \end{macrocode} |
| 7738 |
% |
| 7739 |
% \begin{macrocode} |
| 7740 |
ITERATE {longest.label.pass} |
| 7741 |
% \end{macrocode} |
| 7742 |
% |
| 7743 |
% \begin{macrocode} |
| 7744 |
%</!ay&!alph> |
| 7745 |
% \end{macrocode} |
| 7746 |
% |
| 7747 |
% \begin{macro}{`begin.bib'} |
| 7748 |
% The function \texttt{begin.bib} writes the initial text to the \texttt{.bbl} |
| 7749 |
% file. The most important matter here is that the \texttt{thebibliography} |
| 7750 |
% environment is invoked. |
| 7751 |
% |
| 7752 |
% Note: the French quotation marks are called `guillimets'; Adobe erroneously |
| 7753 |
% named the symbols `guillimot', which is an arctic bird. The error has so |
| 7754 |
% propagated, that it can no longer be corrected. \LaTeX\ took it over. |
| 7755 |
% \begin{macrocode} |
| 7756 |
FUNCTION {begin.bib} |
| 7757 |
%<*!html> |
| 7758 |
%<*!ay&alph> |
| 7759 |
{ et.al.char.used |
| 7760 |
{ "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ } |
| 7761 |
'skip$ |
| 7762 |
if$ |
| 7763 |
preamble$ empty$ |
| 7764 |
%</!ay&alph> |
| 7765 |
%<ay|!alph>{ preamble$ empty$ |
| 7766 |
'skip$ |
| 7767 |
{ preamble$ write$ newline$ } |
| 7768 |
if$ |
| 7769 |
%<ay> "\begin{thebibliography}{" number.label int.to.str$ * "}" * |
| 7770 |
%<!ay> "\begin{thebibliography}{" longest.label * "}" * |
| 7771 |
write$ newline$ |
| 7772 |
%<*(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))> |
| 7773 |
"\typeout{**********************************}" write$ newline$ |
| 7774 |
"\typeout{WARNING WARNING WARNING WARNING WARNING}" write$ newline$ |
| 7775 |
"\typeout{The bst file has been generated with inconsistent options}" |
| 7776 |
write$ newline$ |
| 7777 |
"\typeout{Read the warning message at the start of the bst file}" |
| 7778 |
write$ newline$ |
| 7779 |
"\typeout{**********************************}" write$ newline$ |
| 7780 |
%</(!nmft&(nmft-it|nmft-sc|nmft-bf|nmft-def))|(!lab&(lab-it|lab-bf|lab-sc|lab-def))> |
| 7781 |
%<*!plntx> |
| 7782 |
%<!tit-it&tit-qq&qt-s> "\newcommand{\enquote}[1]{`#1'}" |
| 7783 |
%<!tit-it&tit-qq&!qt-s&!qt-g> "\newcommand{\enquote}[1]{``#1''}" |
| 7784 |
%</!plntx> |
| 7785 |
%<*plntx> |
| 7786 |
%<!tit-it&tit-qq&qt-s> "\def\enquote#1{`#1'}" |
| 7787 |
%<!tit-it&tit-qq&!qt-s&!qt-g> "\def\enquote#1{``#1''}" |
| 7788 |
%</plntx> |
| 7789 |
%<*!tit-it&tit-qq&!qt-s&qt-g> |
| 7790 |
%<!plntx> "\let\enquote\frquote" |
| 7791 |
%<*plntx> |
| 7792 |
"\def\guillemotleft{%" |
| 7793 |
write$ newline$ |
| 7794 |
" \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\ll$}}" |
| 7795 |
write$ newline$ |
| 7796 |
"\def\guillemotright{%" |
| 7797 |
write$ newline$ |
| 7798 |
" \leavevmode\raise .27ex\hbox{$\scriptscriptstyle\gg$}}" |
| 7799 |
write$ newline$ |
| 7800 |
"\def\enquote#1{\guillemotleft#1\guillemotright}" |
| 7801 |
%</plntx> |
| 7802 |
%</!tit-it&tit-qq&!qt-s&qt-g> |
| 7803 |
%<!tit-it&tit-qq> write$ newline$ |
| 7804 |
%<umlaut> "\let\qq=\" quote$ * write$ newline$ |
| 7805 |
%<em-ul> "\expandafter\ifx\csname uline\endcsname\relax\let\uline\underline\fi" |
| 7806 |
%<em-ul> write$ newline$ |
| 7807 |
%<*ay> |
| 7808 |
%<!plntx> "\providecommand{\natexlab}[1]{#1}" |
| 7809 |
%<plntx> "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi" |
| 7810 |
write$ newline$ |
| 7811 |
%<*har> |
| 7812 |
"{\catcode`\|=0\catcode`\#=12\catcode`\@=11\catcode`\\=12" write$ newline$ |
| 7813 |
"|immediate|write|@auxout{\expandafter\ifx\csname natexlab\endcsname\relax\gdef\natexlab#1{#1}\fi}}" |
| 7814 |
write$ newline$ |
| 7815 |
%</har> |
| 7816 |
%</ay> |
| 7817 |
%<*nmft&nmft-def> |
| 7818 |
%<!plntx> "\providecommand{\bibnamefont}[1]{#1}" |
| 7819 |
%<plntx> "\expandafter\ifx\csname bibnamefont\endcsname\relax" |
| 7820 |
%<plntx> write$ newline$ |
| 7821 |
%<plntx> " \def\bibnamefont#1{#1}\fi" |
| 7822 |
write$ newline$ |
| 7823 |
%</nmft&nmft-def> |
| 7824 |
%<*nmft&fnm-def> |
| 7825 |
%<!plntx> "\providecommand{\bibfnamefont}[1]{#1}" |
| 7826 |
%<plntx> "\expandafter\ifx\csname bibfnamefont\endcsname\relax" |
| 7827 |
%<plntx> write$ newline$ |
| 7828 |
%<plntx> " \def\bibfnamefont#1{#1}\fi" |
| 7829 |
write$ newline$ |
| 7830 |
%</nmft&fnm-def> |
| 7831 |
%<*lab&lab-def> |
| 7832 |
%<!plntx> "\providecommand{\citenamefont}[1]{#1}" |
| 7833 |
%<plntx> "\expandafter\ifx\csname citenamefont\endcsname\relax" |
| 7834 |
%<plntx> write$ newline$ |
| 7835 |
%<plntx> " \def\citenamefont#1{#1}\fi" |
| 7836 |
write$ newline$ |
| 7837 |
%</lab&lab-def> |
| 7838 |
%<*(url&!harnm)|eprint> |
| 7839 |
%<*!plntx> |
| 7840 |
%<nfss> "\providecommand{\url}[1]{\texttt{#1}}" |
| 7841 |
%<!nfss> "\providecommand{\url}[1]{{\tt #1}}" |
| 7842 |
write$ newline$ |
| 7843 |
"\providecommand{\urlprefix}{}" |
| 7844 |
write$ newline$ |
| 7845 |
%</!plntx> |
| 7846 |
%<*plntx> |
| 7847 |
"\expandafter\ifx\csname url\endcsname\relax" |
| 7848 |
write$ newline$ |
| 7849 |
%<nfss> " \def\url#1{\texttt{#1}}\fi" |
| 7850 |
%<!nfss> " \def\url#1{{\tt #1}}\fi" |
| 7851 |
write$ newline$ |
| 7852 |
"\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{}\fi" |
| 7853 |
write$ newline$ |
| 7854 |
%</plntx> |
| 7855 |
%</(url&!harnm)|eprint> |
| 7856 |
%<*doi> |
| 7857 |
"\expandafter\ifx\csname urlstyle\endcsname\relax" |
| 7858 |
write$ newline$ |
| 7859 |
%<*!plntx> |
| 7860 |
" \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else" |
| 7861 |
write$ newline$ |
| 7862 |
" \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi" |
| 7863 |
write$ newline$ |
| 7864 |
%</!plntx> |
| 7865 |
%<*plntx> |
| 7866 |
" \expandafter\ifx\csname doi\endcsname\relax" |
| 7867 |
write$ newline$ |
| 7868 |
" \def\doi#1{doi:\discretionary{}{}{}#1}\fi \else" |
| 7869 |
write$ newline$ |
| 7870 |
" \expandafter\ifx\csname doi\endcsname\relax" |
| 7871 |
write$ newline$ |
| 7872 |
" \def\doi{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi \fi" |
| 7873 |
write$ newline$ |
| 7874 |
%</plntx> |
| 7875 |
%</doi> |
| 7876 |
%<*url-doi&url> |
| 7877 |
"\providecommand{\doiprefix}{doi: }" |
| 7878 |
write$ newline$ |
| 7879 |
"\expandafter\ifx\csname href\endcsname\relax" |
| 7880 |
write$ newline$ |
| 7881 |
" \providecommand{\urldoi}[1]{#1}\else" |
| 7882 |
write$ newline$ |
| 7883 |
" \providecommand{\urldoi}[1]{\href{https://doi.org/#1}{#1}}\fi" |
| 7884 |
write$ newline$ |
| 7885 |
%</url-doi&url> |
| 7886 |
%<*lang> |
| 7887 |
%<!plntx> "\providecommand{\selectlanguage}[1]{\relax}" |
| 7888 |
%<*plntx> |
| 7889 |
"\expandafter\ifx\csname selectlanguage\endcsname\relax" |
| 7890 |
write$ newline$ |
| 7891 |
" \def\selectlanguage#1{}\fi" |
| 7892 |
%</plntx> |
| 7893 |
write$ newline$ |
| 7894 |
%</lang> |
| 7895 |
%<*!plntx> |
| 7896 |
%<*babel> |
| 7897 |
"\input{babelbst.tex}" write$ newline$ |
| 7898 |
"\newcommand{\Capitalize}[1]{\uppercase{#1}}" write$ newline$ |
| 7899 |
"\newcommand{\capitalize}[1]{\expandafter\Capitalize#1}" write$ newline$ |
| 7900 |
%</babel> |
| 7901 |
%<*annote> |
| 7902 |
"\providecommand{\bibAnnoteFile}[1]{%" |
| 7903 |
write$ newline$ |
| 7904 |
" \IfFileExists{#1}{\begin{quotation}\noindent\textsc{Key:} #1\\" |
| 7905 |
write$ newline$ |
| 7906 |
" \textsc{Annotation:}\ \input{#1}\end{quotation}}{}}" |
| 7907 |
write$ newline$ |
| 7908 |
"\providecommand{\bibAnnote}[2]{%" |
| 7909 |
write$ newline$ |
| 7910 |
" \begin{quotation}\noindent\textsc{Key:} #1\\" |
| 7911 |
write$ newline$ |
| 7912 |
" \textsc{Annotation:}\ #2\end{quotation}}" |
| 7913 |
write$ newline$ |
| 7914 |
%</annote> |
| 7915 |
%</!plntx> |
| 7916 |
%<*bibinfo> |
| 7917 |
%<!plntx> "\providecommand{\bibinfo}[2]{#2}" |
| 7918 |
%<plntx> "\expandafter\ifx\csname bibinfo\endcsname\relax\def\bibinfo#1#2{#2}\fi" |
| 7919 |
write$ newline$ |
| 7920 |
%</bibinfo> |
| 7921 |
%<*eprint> |
| 7922 |
%<!plntx> "\providecommand{\eprint}[2][]{\url{#2}}" |
| 7923 |
%<plntx> "\expandafter\ifx\csname eprint\endcsname\relax\def\eprint#1{\url{#1}}\fi" |
| 7924 |
write$ newline$ |
| 7925 |
%</eprint> |
| 7926 |
} |
| 7927 |
%</!html> |
| 7928 |
%<*html> |
| 7929 |
{ |
| 7930 |
"<html><head><title>Bibliography Listing</title></head>" write$ newline$ |
| 7931 |
"<body>" write$ newline$ |
| 7932 |
"<h2>Bibliography</h2>" write$ newline$ |
| 7933 |
%<htdes>"<dl>" write$ newline$ |
| 7934 |
%<!htdes&htlist>"<ol>" write$ newline$ |
| 7935 |
} |
| 7936 |
%</html> |
| 7937 |
% \end{macrocode} |
| 7938 |
% \end{macro} |
| 7939 |
% |
| 7940 |
% \begin{macrocode} |
| 7941 |
EXECUTE {begin.bib} |
| 7942 |
% \end{macrocode} |
| 7943 |
% |
| 7944 |
% \begin{macrocode} |
| 7945 |
EXECUTE {init.state.consts} |
| 7946 |
% \end{macrocode} |
| 7947 |
% |
| 7948 |
% \begin{macrocode} |
| 7949 |
ITERATE {call.type$} |
| 7950 |
% \end{macrocode} |
| 7951 |
% |
| 7952 |
% \begin{macro}{`end.bib'} |
| 7953 |
% \begin{macrocode} |
| 7954 |
FUNCTION {end.bib} |
| 7955 |
{ newline$ |
| 7956 |
%<!html> "\end{thebibliography}" write$ newline$ |
| 7957 |
%<html> "</dl></body></html>" write$ newline$ |
| 7958 |
} |
| 7959 |
% \end{macrocode} |
| 7960 |
% \end{macro} |
| 7961 |
% |
| 7962 |
% \begin{macrocode} |
| 7963 |
EXECUTE {end.bib} |
| 7964 |
% \end{macrocode} |
| 7965 |
% |
| 7966 |
% \begin{macrocode} |
| 7967 |
%</!head> |
| 7968 |
% \end{macrocode} |
| 7969 |
% |
| 7970 |
% \begin{macrocode} |
| 7971 |
%</!options&!driver&!bblbst> |
| 7972 |
% \end{macrocode} |
| 7973 |
% |
| 7974 |
% \section{The File \texttt{babelbst.tex} for English} |
| 7975 |
% The following contains the definitions for the \texttt{babel} language |
| 7976 |
% selection as they apply to English. This file may be extracted with |
| 7977 |
% \dtx{} and the option \texttt{bblbst}. |
| 7978 |
% \begin{macrocode} |
| 7979 |
%<*bblbst> |
| 7980 |
% This is babelbst.tex for English. |
| 7981 |
% It should serve as a model for other languages. |
| 7982 |
% Alternatively, store it under a different name (e.g. englbst.tex) |
| 7983 |
% and then \input it with a command in babelbst.tex. |
| 7984 |
\def\bbland{and} \def\bbletal{et~al.} |
| 7985 |
\def\bbleditors{editors} \def\bbleds{eds.} |
| 7986 |
\def\bbleditor{editor} \def\bbled{ed.} |
| 7987 |
\def\bbledby{edited by} |
| 7988 |
\def\bbledition{edition} \def\bbledn{edn.} |
| 7989 |
\def\bblvolume{volume} \def\bblvol{vol.} |
| 7990 |
\def\bblof{of} |
| 7991 |
\def\bblnumber{number} \def\bblno{no.} |
| 7992 |
\def\bblin{in} |
| 7993 |
\def\bblpages{pages} \def\bblpp{pp.} |
| 7994 |
\def\bblpage{page} \def\bblp{p.} |
| 7995 |
\def\bbleidpp{pages} |
| 7996 |
\def\bblchapter{chapter} \def\bblchap{chap.} |
| 7997 |
\def\bbltechreport{Technical Report} |
| 7998 |
\def\bbltechrep{Tech. Rep.} |
| 7999 |
\def\bblmthesis{Master's thesis} |
| 8000 |
\def\bblphdthesis{Ph.D. thesis} |
| 8001 |
\def\bblfirst{First} \def\bblfirsto{1st} |
| 8002 |
\def\bblsecond{Second} \def\bblsecondo{2nd} |
| 8003 |
\def\bblthird{Third} \def\bblthirdo{3rd} |
| 8004 |
\def\bblfourth{Fourth} \def\bblfourtho{4th} |
| 8005 |
\def\bblfifth{Fifth} \def\bblfiftho{5th} |
| 8006 |
\def\bblst{st} \def\bblnd{nd} \def\bblrd{rd} |
| 8007 |
\def\bblth{th} |
| 8008 |
\def\bbljan{January} \def\bblfeb{February} \def\bblmar{March} |
| 8009 |
\def\bblapr{April} \def\bblmay{May} \def\bbljun{June} |
| 8010 |
\def\bbljul{July} \def\bblaug{August} \def\bblsep{September} |
| 8011 |
\def\bbloct{October} \def\bblnov{November} \def\bbldec{December} |
| 8012 |
%</bblbst> |
| 8013 |
% \end{macrocode} |
| 8014 |
% |
| 8015 |
% \Finale |