| 1 |
%%% ==================================================================== |
| 2 |
%%% @BibTeX-style-file{ |
| 3 |
%%% author = "Glenn Paulley", |
| 4 |
%%% version = "4", |
| 5 |
%%% date = "28 August 1992", |
| 6 |
%%% time = "10:24:38 199", |
| 7 |
%%% filename = "chicagoa.bst", |
| 8 |
%%% address = "Data Structuring Group |
| 9 |
%%% Department of Computer Science |
| 10 |
%%% University of Waterloo |
| 11 |
%%% Waterloo, Ontario, Canada |
| 12 |
%%% N2L 3G1", |
| 13 |
%%% telephone = "(519) 885-1211", |
| 14 |
%%% FAX = "(519) 885-1208", |
| 15 |
%%% checksum = "62428 1684 5231 38311", |
| 16 |
%%% email = "[email protected]", |
| 17 |
%%% codetable = "ISO/ASCII", |
| 18 |
%%% keywords = "", |
| 19 |
%%% supported = "yes", |
| 20 |
%%% abstract = "A BibTeX bibliography style that follows the |
| 21 |
%%% `B' reference style of the 13th Edition of |
| 22 |
%%% the Chicago Manual of Style. Supports annotated |
| 23 |
%%% bibliographies through the BibTeX field |
| 24 |
%%% `annotation'. A detailed feature list is given |
| 25 |
%%% below.", |
| 26 |
%%% docstring = "The checksum field above contains a CRC-16 |
| 27 |
%%% checksum as the first value, followed by the |
| 28 |
%%% equivalent of the standard UNIX wc (word |
| 29 |
%%% count) utility output of lines, words, and |
| 30 |
%%% characters. This is produced by Robert |
| 31 |
%%% Solovay's checksum utility.", |
| 32 |
%%% } |
| 33 |
%%% ==================================================================== |
| 34 |
% |
| 35 |
% "Chicago" BibTeX style, chicagoa.bst - Chicago style with annotations |
| 36 |
% ===================================================================== |
| 37 |
% |
| 38 |
% BibTeX `chicagoa' style file for BibTeX version 0.99c, LaTeX version 2.09 |
| 39 |
% Place it in a file called chicagoa.bst in the BibTeX search path. |
| 40 |
% You need to include chicago.sty as a \documentstyle option. |
| 41 |
% (Placing it in the same directory as the LaTeX document should also work.) |
| 42 |
% This "chicago" style is based on newapa.bst (American Psych. Assoc.) |
| 43 |
% found at ymir.claremont.edu. Annotation support added 07/09/92. |
| 44 |
% Modifications are loosely based on Chicago Manual of Style. |
| 45 |
% |
| 46 |
% Citation format: (author-last-name year) |
| 47 |
% (author-last-name and author-last-name year) |
| 48 |
% (author-last-name, author-last-name, and author-last-name year) |
| 49 |
% (author-last-name et al. year) |
| 50 |
% (author-last-name) |
| 51 |
% author-last-name (year) |
| 52 |
% (author-last-name and author-last-name) |
| 53 |
% (author-last-name et al.) |
| 54 |
% (year) or (year,year) |
| 55 |
% year or year,year |
| 56 |
% |
| 57 |
% Reference list ordering: alphabetical by author or whatever passes |
| 58 |
% for author in the absence of one. |
| 59 |
% |
| 60 |
% This BibTeX style has support for abbreviated author lists and for |
| 61 |
% year-only citations. This is done by having the citations |
| 62 |
% actually look like |
| 63 |
% |
| 64 |
% \citeauthoryear{full-author-info}{abbrev-author-info}{year} |
| 65 |
% |
| 66 |
% The LaTeX style has to have the following (or similar) |
| 67 |
% |
| 68 |
% \let\@internalcite\cite |
| 69 |
% \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite} |
| 70 |
% \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite} |
| 71 |
% \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite} |
| 72 |
% \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite} |
| 73 |
% \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite} |
| 74 |
% |
| 75 |
% These TeX macro definitions are found in chicago.sty. Additional |
| 76 |
% commands to manipulate different components of a citation can be defined |
| 77 |
% so that, for example, you can list author's names without parentheses |
| 78 |
% if using a citation as a noun or object in a sentence. |
| 79 |
% |
| 80 |
% This file was originally copied from newapa.bst at ymir.claremont.edu. |
| 81 |
% |
| 82 |
% Features of chicago.bst: |
| 83 |
% ======================= |
| 84 |
% |
| 85 |
% - supports an "annotation" field for annotated bibliographies. |
| 86 |
% - full names used in citations, but abbreviated citations are available |
| 87 |
% (see above) |
| 88 |
% - if an entry has a "month", then the month and year are also printed |
| 89 |
% as part of that bibitem. |
| 90 |
% - all conjunctions use "and" instead of "\&" |
| 91 |
% - major modification from Chicago Manual of Style (13th ed.) is that |
| 92 |
% only the first author in a reference appears last name first- |
| 93 |
% additional authors appear as J. Q. Public. |
| 94 |
% - pages are listed as "pp. xx-xx" in all entry types except |
| 95 |
% article entries. |
| 96 |
% - book, inbook, and manual use "location: publisher" (or organization) |
| 97 |
% for address and publisher. All other types list publishers separately. |
| 98 |
% - "pp." are used to identify page numbers for all entry types except |
| 99 |
% articles. |
| 100 |
% - organization is used as a citation label if neither author nor editor |
| 101 |
% is present (for manuals). |
| 102 |
% - "et al." is used for long author and editor lists, or when "others" |
| 103 |
% is used. |
| 104 |
% |
| 105 |
% Modifications and bug fixes from newapa.bst: |
| 106 |
% =========================================== |
| 107 |
% |
| 108 |
% - added month, year to bib entries if month is present |
| 109 |
% - fixed bug with In proceedings, added necessary comma after title |
| 110 |
% - all conjunctions changed to "and" from "\&" |
| 111 |
% - fixed bug with author labels in my.full.label: "et al." now is |
| 112 |
% generated when "others" is an author name |
| 113 |
% - major modification from Chicago Manual of Style (13th ed.) is that |
| 114 |
% only the first author in a reference appears last name first- |
| 115 |
% additional authors appear as J. Q. Public. |
| 116 |
% - pages are listed as "pp. xx-xx" in all entry types except |
| 117 |
% article entries. Unnecessary (IMHO) "()" around page numbers |
| 118 |
% were removed, and page numbers now don't end with a period. |
| 119 |
% - created chicago.sty for use with this bibstyle (required). |
| 120 |
% - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume, |
| 121 |
% number, and /or pages. Renamed to format.jour.vol. |
| 122 |
% - fixed bug in formatting booktitles: additional period an error if |
| 123 |
% book has a volume. |
| 124 |
% - fixed bug: editors usually given redundant period before next clause |
| 125 |
% (format.editors.dot) removed. |
| 126 |
% - added label support for organizations, if both author and editor |
| 127 |
% are missing (from alpha.bst). If organization is too long, then |
| 128 |
% the key field is used for abbreviated citations. |
| 129 |
% - In proceedings or books of several volumes, no comma was written |
| 130 |
% between the "Volume x" and the page numbers (this was intentional |
| 131 |
% in newapa.bst). Fixed. |
| 132 |
% - Some journals may not have volumes/numbers, only month/year (eg. |
| 133 |
% IEEE Computer). Fixed bug in article style that assumed volume/number |
| 134 |
% was always present. |
| 135 |
% |
| 136 |
% Original documentation for newapa.sty: |
| 137 |
% ===================================== |
| 138 |
% |
| 139 |
% This version was made by modifying the master file made by |
| 140 |
% Oren Patashnik ([email protected]), and the 'named' BibTeX |
| 141 |
% style of Peter F. Patel-Schneider. |
| 142 |
% |
| 143 |
% Copyright (C) 1985, all rights reserved. |
| 144 |
% Copying of this file is authorized only if either |
| 145 |
% (1) you make absolutely no changes to your copy, including name, or |
| 146 |
% (2) if you do make changes, you name it something other than 'newapa.bst'. |
| 147 |
% There are undoubtably bugs in this style. If you make bug fixes, |
| 148 |
% improvements, etc. please let me know. My e-mail address is: |
| 149 |
% [email protected] or [email protected] |
| 150 |
% |
| 151 |
% This style was made from 'plain.bst', 'named.bst', and 'apalike.bst', |
| 152 |
% with lots of tweaking to make it look like APA style, along with tips |
| 153 |
% from Young Ryu and Brian Reiser's modifications of 'apalike.bst'. |
| 154 |
|
| 155 |
ENTRY |
| 156 |
{ address |
| 157 |
annotation |
| 158 |
author |
| 159 |
booktitle |
| 160 |
chapter |
| 161 |
edition |
| 162 |
editor |
| 163 |
howpublished |
| 164 |
institution |
| 165 |
journal |
| 166 |
key |
| 167 |
month |
| 168 |
note |
| 169 |
number |
| 170 |
organization |
| 171 |
pages |
| 172 |
publisher |
| 173 |
school |
| 174 |
series |
| 175 |
title |
| 176 |
type |
| 177 |
volume |
| 178 |
year |
| 179 |
} |
| 180 |
{} |
| 181 |
{ label.year extra.label sort.year sort.label } |
| 182 |
|
| 183 |
INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
| 184 |
|
| 185 |
FUNCTION {init.state.consts} |
| 186 |
{ #0 'before.all := |
| 187 |
#1 'mid.sentence := |
| 188 |
#2 'after.sentence := |
| 189 |
#3 'after.block := |
| 190 |
} |
| 191 |
|
| 192 |
STRINGS { s t u } |
| 193 |
|
| 194 |
FUNCTION {output.nonnull} |
| 195 |
{ 's := |
| 196 |
output.state mid.sentence = |
| 197 |
{ ", " * write$ } |
| 198 |
{ output.state after.block = |
| 199 |
{ add.period$ write$ |
| 200 |
newline$ |
| 201 |
"\newblock " write$ |
| 202 |
} |
| 203 |
{ output.state before.all = |
| 204 |
'write$ |
| 205 |
{ add.period$ " " * write$ } |
| 206 |
if$ |
| 207 |
} |
| 208 |
if$ |
| 209 |
mid.sentence 'output.state := |
| 210 |
} |
| 211 |
if$ |
| 212 |
s |
| 213 |
} |
| 214 |
|
| 215 |
% Use a colon to separate output. Used only for address/publisher |
| 216 |
% combination in book/inbook types, address/institution for manuals, |
| 217 |
% and organization:publisher for proceedings (inproceedings). |
| 218 |
% |
| 219 |
FUNCTION {output.nonnull.colon} |
| 220 |
{ 's := |
| 221 |
output.state mid.sentence = |
| 222 |
{ ": " * write$ } |
| 223 |
{ output.state after.block = |
| 224 |
{ add.period$ write$ |
| 225 |
newline$ |
| 226 |
"\newblock " write$ |
| 227 |
} |
| 228 |
{ output.state before.all = |
| 229 |
'write$ |
| 230 |
{ add.period$ " " * write$ } |
| 231 |
if$ |
| 232 |
} |
| 233 |
if$ |
| 234 |
mid.sentence 'output.state := |
| 235 |
} |
| 236 |
if$ |
| 237 |
s |
| 238 |
} |
| 239 |
|
| 240 |
FUNCTION {output} |
| 241 |
{ duplicate$ empty$ |
| 242 |
'pop$ |
| 243 |
'output.nonnull |
| 244 |
if$ |
| 245 |
} |
| 246 |
|
| 247 |
FUNCTION {output.colon} |
| 248 |
{ duplicate$ empty$ |
| 249 |
'pop$ |
| 250 |
'output.nonnull.colon |
| 251 |
if$ |
| 252 |
} |
| 253 |
|
| 254 |
FUNCTION {output.check} |
| 255 |
{ 't := |
| 256 |
duplicate$ empty$ |
| 257 |
{ pop$ "empty " t * " in " * cite$ * warning$ } |
| 258 |
'output.nonnull |
| 259 |
if$ |
| 260 |
} |
| 261 |
|
| 262 |
FUNCTION {output.check.colon} |
| 263 |
{ 't := |
| 264 |
duplicate$ empty$ |
| 265 |
{ pop$ "empty " t * " in " * cite$ * warning$ } |
| 266 |
'output.nonnull.colon |
| 267 |
if$ |
| 268 |
} |
| 269 |
|
| 270 |
FUNCTION {output.year.check} |
| 271 |
{ year empty$ |
| 272 |
{ "empty year in " cite$ * warning$ } |
| 273 |
{ write$ |
| 274 |
" (" year * extra.label * |
| 275 |
month empty$ |
| 276 |
{ ")" * } |
| 277 |
{ ", " * month * ")" * } |
| 278 |
if$ |
| 279 |
mid.sentence 'output.state := |
| 280 |
} |
| 281 |
if$ |
| 282 |
} |
| 283 |
|
| 284 |
|
| 285 |
FUNCTION {fin.entry} |
| 286 |
{ add.period$ |
| 287 |
write$ |
| 288 |
newline$ |
| 289 |
} |
| 290 |
|
| 291 |
FUNCTION {new.block} |
| 292 |
{ output.state before.all = |
| 293 |
'skip$ |
| 294 |
{ after.block 'output.state := } |
| 295 |
if$ |
| 296 |
} |
| 297 |
|
| 298 |
FUNCTION {new.sentence} |
| 299 |
{ output.state after.block = |
| 300 |
'skip$ |
| 301 |
{ output.state before.all = |
| 302 |
'skip$ |
| 303 |
{ after.sentence 'output.state := } |
| 304 |
if$ |
| 305 |
} |
| 306 |
if$ |
| 307 |
} |
| 308 |
|
| 309 |
FUNCTION {not} |
| 310 |
{ { #0 } |
| 311 |
{ #1 } |
| 312 |
if$ |
| 313 |
} |
| 314 |
|
| 315 |
FUNCTION {and} |
| 316 |
{ 'skip$ |
| 317 |
{ pop$ #0 } |
| 318 |
if$ |
| 319 |
} |
| 320 |
|
| 321 |
FUNCTION {or} |
| 322 |
{ { pop$ #1 } |
| 323 |
'skip$ |
| 324 |
if$ |
| 325 |
} |
| 326 |
|
| 327 |
FUNCTION {new.block.checka} |
| 328 |
{ empty$ |
| 329 |
'skip$ |
| 330 |
'new.block |
| 331 |
if$ |
| 332 |
} |
| 333 |
|
| 334 |
FUNCTION {new.block.checkb} |
| 335 |
{ empty$ |
| 336 |
swap$ empty$ |
| 337 |
and |
| 338 |
'skip$ |
| 339 |
'new.block |
| 340 |
if$ |
| 341 |
} |
| 342 |
|
| 343 |
FUNCTION {new.sentence.checka} |
| 344 |
{ empty$ |
| 345 |
'skip$ |
| 346 |
'new.sentence |
| 347 |
if$ |
| 348 |
} |
| 349 |
|
| 350 |
FUNCTION {new.sentence.checkb} |
| 351 |
{ empty$ |
| 352 |
swap$ empty$ |
| 353 |
and |
| 354 |
'skip$ |
| 355 |
'new.sentence |
| 356 |
if$ |
| 357 |
} |
| 358 |
|
| 359 |
FUNCTION {field.or.null} |
| 360 |
{ duplicate$ empty$ |
| 361 |
{ pop$ "" } |
| 362 |
'skip$ |
| 363 |
if$ |
| 364 |
} |
| 365 |
|
| 366 |
% |
| 367 |
% Emphasize the top string on the stack. |
| 368 |
% |
| 369 |
FUNCTION {emphasize} |
| 370 |
{ duplicate$ empty$ |
| 371 |
{ pop$ "" } |
| 372 |
{ "{\em " swap$ * "}" * } |
| 373 |
if$ |
| 374 |
} |
| 375 |
|
| 376 |
% |
| 377 |
% Emphasize the top string on the stack, but add a trailing space. |
| 378 |
% |
| 379 |
FUNCTION {emphasize.space} |
| 380 |
{ duplicate$ empty$ |
| 381 |
{ pop$ "" } |
| 382 |
{ "{\em " swap$ * "\/}" * } |
| 383 |
if$ |
| 384 |
} |
| 385 |
|
| 386 |
INTEGERS { nameptr namesleft numnames } |
| 387 |
% |
| 388 |
% Format bibliographical entries with the first author last name first, |
| 389 |
% and subsequent authors with initials followed by last name. |
| 390 |
% All names are formatted in this routine. |
| 391 |
% |
| 392 |
FUNCTION {format.names} |
| 393 |
{ 's := |
| 394 |
#1 'nameptr := % nameptr = 1; |
| 395 |
s num.names$ 'numnames := % numnames = num.name$(s); |
| 396 |
numnames 'namesleft := |
| 397 |
{ namesleft #0 > } |
| 398 |
|
| 399 |
{ nameptr #1 = |
| 400 |
{s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := } |
| 401 |
{s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := } |
| 402 |
if$ |
| 403 |
nameptr #1 > |
| 404 |
{ namesleft #1 > |
| 405 |
{ ", " * t * } |
| 406 |
{ numnames #2 > |
| 407 |
{ "," * } |
| 408 |
'skip$ |
| 409 |
if$ |
| 410 |
t "others" = |
| 411 |
{ " et~al." * } |
| 412 |
{ " and " * t * } % from Chicago Manual of Style |
| 413 |
if$ |
| 414 |
} |
| 415 |
if$ |
| 416 |
} |
| 417 |
't |
| 418 |
if$ |
| 419 |
nameptr #1 + 'nameptr := % nameptr += 1; |
| 420 |
namesleft #1 - 'namesleft := % namesleft =- 1; |
| 421 |
} |
| 422 |
while$ |
| 423 |
} |
| 424 |
|
| 425 |
FUNCTION {my.full.label} |
| 426 |
{ 's := |
| 427 |
#1 'nameptr := % nameptr = 1; |
| 428 |
s num.names$ 'numnames := % numnames = num.name$(s); |
| 429 |
numnames 'namesleft := |
| 430 |
{ namesleft #0 > } |
| 431 |
|
| 432 |
{ s nameptr "{vv~}{ll}" format.name$ 't := % get the next name |
| 433 |
nameptr #1 > |
| 434 |
{ namesleft #1 > |
| 435 |
{ ", " * t * } |
| 436 |
{ numnames #2 > |
| 437 |
{ "," * } |
| 438 |
'skip$ |
| 439 |
if$ |
| 440 |
t "others" = |
| 441 |
{ " et~al." * } |
| 442 |
{ " and " * t * } % from Chicago Manual of Style |
| 443 |
if$ |
| 444 |
} |
| 445 |
if$ |
| 446 |
} |
| 447 |
't |
| 448 |
if$ |
| 449 |
nameptr #1 + 'nameptr := % nameptr += 1; |
| 450 |
namesleft #1 - 'namesleft := % namesleft =- 1; |
| 451 |
} |
| 452 |
while$ |
| 453 |
|
| 454 |
} |
| 455 |
|
| 456 |
FUNCTION {format.names.fml} |
| 457 |
% |
| 458 |
% Format names in "familiar" format, with first initial followed by |
| 459 |
% last name. Like format.names, ALL names are formatted. |
| 460 |
% |
| 461 |
{ 's := |
| 462 |
#1 'nameptr := % nameptr = 1; |
| 463 |
s num.names$ 'numnames := % numnames = num.name$(s); |
| 464 |
numnames 'namesleft := |
| 465 |
{ namesleft #0 > } |
| 466 |
|
| 467 |
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := |
| 468 |
|
| 469 |
nameptr #1 > |
| 470 |
{ namesleft #1 > |
| 471 |
{ ", " * t * } |
| 472 |
{ numnames #2 > |
| 473 |
{ "," * } |
| 474 |
'skip$ |
| 475 |
if$ |
| 476 |
t "others" = |
| 477 |
{ " et~al." * } |
| 478 |
{ " and " * t * } |
| 479 |
% { " \& " * t * } |
| 480 |
if$ |
| 481 |
} |
| 482 |
if$ |
| 483 |
} |
| 484 |
't |
| 485 |
if$ |
| 486 |
nameptr #1 + 'nameptr := % nameptr += 1; |
| 487 |
namesleft #1 - 'namesleft := % namesleft =- 1; |
| 488 |
} |
| 489 |
while$ |
| 490 |
} |
| 491 |
|
| 492 |
FUNCTION {format.annotation} |
| 493 |
{ annotation empty$ |
| 494 |
{ "" } |
| 495 |
{ " \begin{quotation}\noindent " |
| 496 |
annotation |
| 497 |
* " \end{quotation} " * |
| 498 |
} |
| 499 |
if$ |
| 500 |
} |
| 501 |
|
| 502 |
FUNCTION {format.authors} |
| 503 |
{ author empty$ |
| 504 |
{ "" } |
| 505 |
{ author format.names } |
| 506 |
if$ |
| 507 |
} |
| 508 |
|
| 509 |
FUNCTION {format.key} |
| 510 |
{ empty$ |
| 511 |
{ key field.or.null } |
| 512 |
{ "" } |
| 513 |
if$ |
| 514 |
} |
| 515 |
|
| 516 |
% |
| 517 |
% Format editor names for use in the "in" types: inbook, incollection, |
| 518 |
% inproceedings: first initial, then last names. When editors are the |
| 519 |
% LABEL for an entry, then format.editor is used which lists editors |
| 520 |
% by last name first. |
| 521 |
% |
| 522 |
FUNCTION {format.editors.fml} |
| 523 |
{ editor empty$ |
| 524 |
{ "" } |
| 525 |
{ editor format.names.fml |
| 526 |
editor num.names$ #1 > |
| 527 |
{ " (Eds.)" * } |
| 528 |
{ " (Ed.)" * } |
| 529 |
if$ |
| 530 |
} |
| 531 |
if$ |
| 532 |
} |
| 533 |
|
| 534 |
% |
| 535 |
% Format editor names for use in labels, last names first. |
| 536 |
% |
| 537 |
FUNCTION {format.editors} |
| 538 |
{ editor empty$ |
| 539 |
{ "" } |
| 540 |
{ editor format.names |
| 541 |
editor num.names$ #1 > |
| 542 |
{ " (Eds.)" * } |
| 543 |
{ " (Ed.)" * } |
| 544 |
if$ |
| 545 |
} |
| 546 |
if$ |
| 547 |
} |
| 548 |
|
| 549 |
FUNCTION {format.title} |
| 550 |
{ title empty$ |
| 551 |
{ "" } |
| 552 |
{ title "t" change.case$ } |
| 553 |
if$ |
| 554 |
} |
| 555 |
|
| 556 |
% Note that the APA style requres case changes |
| 557 |
% in article titles. The following does not |
| 558 |
% change cases. If you perfer it, uncomment the |
| 559 |
% following and comment out the above. |
| 560 |
|
| 561 |
%FUNCTION {format.title} |
| 562 |
%{ title empty$ |
| 563 |
% { "" } |
| 564 |
% { title } |
| 565 |
% if$ |
| 566 |
%} |
| 567 |
|
| 568 |
FUNCTION {n.dashify} |
| 569 |
{ 't := |
| 570 |
"" |
| 571 |
{ t empty$ not } |
| 572 |
{ t #1 #1 substring$ "-" = |
| 573 |
{ t #1 #2 substring$ "--" = not |
| 574 |
{ "--" * |
| 575 |
t #2 global.max$ substring$ 't := |
| 576 |
} |
| 577 |
{ { t #1 #1 substring$ "-" = } |
| 578 |
{ "-" * |
| 579 |
t #2 global.max$ substring$ 't := |
| 580 |
} |
| 581 |
while$ |
| 582 |
} |
| 583 |
if$ |
| 584 |
} |
| 585 |
{ t #1 #1 substring$ * |
| 586 |
t #2 global.max$ substring$ 't := |
| 587 |
} |
| 588 |
if$ |
| 589 |
} |
| 590 |
while$ |
| 591 |
} |
| 592 |
|
| 593 |
FUNCTION {format.btitle} |
| 594 |
{ edition empty$ |
| 595 |
{ title emphasize } |
| 596 |
{ title empty$ |
| 597 |
{ title emphasize } |
| 598 |
{ volume empty$ % gnp - check for volume, then don't need period |
| 599 |
{ "{\em " title * "\/} (" * edition * " ed.)" * "." * } |
| 600 |
{ "{\em " title * "\/} (" * edition * " ed.)" * } |
| 601 |
if$ |
| 602 |
} |
| 603 |
if$ |
| 604 |
} |
| 605 |
if$ |
| 606 |
} |
| 607 |
|
| 608 |
FUNCTION {format.emphasize.booktitle} |
| 609 |
{ edition empty$ |
| 610 |
{ booktitle emphasize } |
| 611 |
{ booktitle empty$ |
| 612 |
{ booktitle emphasize } |
| 613 |
{ volume empty$ % gnp - extra period an error if book has a volume |
| 614 |
{ "{\em " booktitle * "\/} (" * edition * " ed.)" * "." *} |
| 615 |
{ "{\em " booktitle * "\/} (" * edition * " ed.)" * } |
| 616 |
if$ |
| 617 |
} |
| 618 |
if$ |
| 619 |
} |
| 620 |
if$ |
| 621 |
} |
| 622 |
|
| 623 |
|
| 624 |
FUNCTION {tie.or.space.connect} |
| 625 |
{ duplicate$ text.length$ #3 < |
| 626 |
{ "~" } |
| 627 |
{ " " } |
| 628 |
if$ |
| 629 |
swap$ * * |
| 630 |
} |
| 631 |
|
| 632 |
FUNCTION {either.or.check} |
| 633 |
{ empty$ |
| 634 |
'pop$ |
| 635 |
{ "can't use both " swap$ * " fields in " * cite$ * warning$ } |
| 636 |
if$ |
| 637 |
} |
| 638 |
|
| 639 |
FUNCTION {format.bvolume} |
| 640 |
{ volume empty$ |
| 641 |
{ "" } |
| 642 |
{ "Volume" volume tie.or.space.connect % gnp - changed to mixed case |
| 643 |
series empty$ |
| 644 |
'skip$ |
| 645 |
{ " of " * series emphasize * } |
| 646 |
if$ |
| 647 |
"volume and number" number either.or.check |
| 648 |
} |
| 649 |
if$ |
| 650 |
} |
| 651 |
|
| 652 |
FUNCTION {format.number.series} |
| 653 |
{ volume empty$ |
| 654 |
{ number empty$ |
| 655 |
{ series field.or.null } |
| 656 |
{ output.state mid.sentence = |
| 657 |
{ "Number" } % gnp - changed to mixed case always |
| 658 |
{ "Number" } |
| 659 |
if$ |
| 660 |
number tie.or.space.connect |
| 661 |
series empty$ |
| 662 |
{ "there's a number but no series in " cite$ * warning$ } |
| 663 |
{ " in " * series * } |
| 664 |
if$ |
| 665 |
} |
| 666 |
if$ |
| 667 |
} |
| 668 |
{ "" } |
| 669 |
if$ |
| 670 |
} |
| 671 |
|
| 672 |
INTEGERS { multiresult } |
| 673 |
|
| 674 |
FUNCTION {multi.page.check} |
| 675 |
{ 't := |
| 676 |
#0 'multiresult := |
| 677 |
{ multiresult not |
| 678 |
t empty$ not |
| 679 |
and |
| 680 |
} |
| 681 |
{ t #1 #1 substring$ |
| 682 |
duplicate$ "-" = |
| 683 |
swap$ duplicate$ "," = |
| 684 |
swap$ "+" = |
| 685 |
or or |
| 686 |
{ #1 'multiresult := } |
| 687 |
{ t #2 global.max$ substring$ 't := } |
| 688 |
if$ |
| 689 |
} |
| 690 |
while$ |
| 691 |
multiresult |
| 692 |
} |
| 693 |
|
| 694 |
FUNCTION {format.pages} |
| 695 |
{ pages empty$ |
| 696 |
{ "" } |
| 697 |
{ pages multi.page.check |
| 698 |
{ "pp.\ " pages n.dashify tie.or.space.connect } % gnp - removed () |
| 699 |
{ "pp.\ " pages tie.or.space.connect } |
| 700 |
if$ |
| 701 |
} |
| 702 |
if$ |
| 703 |
} |
| 704 |
|
| 705 |
% By Young (and Spencer) |
| 706 |
% GNP - fixed bugs with missing volume, number, and/or pages |
| 707 |
% |
| 708 |
% Format journal, volume, number, pages for article types. |
| 709 |
% |
| 710 |
FUNCTION {format.jour.vol} |
| 711 |
{ journal empty$ |
| 712 |
{ "no journal in " cite$ * warning$ |
| 713 |
"" } |
| 714 |
{ journal emphasize.space } |
| 715 |
if$ |
| 716 |
number empty$ |
| 717 |
{ volume empty$ |
| 718 |
{ "no number and no volume in " cite$ * warning$ |
| 719 |
"" * } |
| 720 |
{ "~{\em " * Volume * "}" * } |
| 721 |
if$ |
| 722 |
} |
| 723 |
{ volume empty$ |
| 724 |
{"no volume for " cite$ * warning$ |
| 725 |
"~(" * number * ")" * } |
| 726 |
{ "~" * |
| 727 |
volume emphasize.space |
| 728 |
"(" * number * ")" * * } |
| 729 |
if$ |
| 730 |
} |
| 731 |
if$ |
| 732 |
pages empty$ |
| 733 |
{"page numbers missing in " cite$ * warning$ |
| 734 |
"" * } % gnp - place a null string on the stack for output |
| 735 |
{ duplicate$ empty$ |
| 736 |
{ pop$ format.pages } |
| 737 |
{ ", " * pages n.dashify * } % gnp - removed pp. for articles |
| 738 |
if$ |
| 739 |
} |
| 740 |
if$ |
| 741 |
} |
| 742 |
|
| 743 |
FUNCTION {format.chapter.pages} |
| 744 |
{ chapter empty$ |
| 745 |
'format.pages |
| 746 |
{ type empty$ |
| 747 |
{ "Chapter" } % gnp - changed to mixed case |
| 748 |
{ type "t" change.case$ } |
| 749 |
if$ |
| 750 |
chapter tie.or.space.connect |
| 751 |
pages empty$ |
| 752 |
{"page numbers missing in " cite$ * warning$} % gnp - added check |
| 753 |
{ ", " * format.pages * } |
| 754 |
if$ |
| 755 |
} |
| 756 |
if$ |
| 757 |
} |
| 758 |
|
| 759 |
FUNCTION {format.in.ed.booktitle} |
| 760 |
{ booktitle empty$ |
| 761 |
{ "" } |
| 762 |
{ editor empty$ |
| 763 |
{ "In " format.emphasize.booktitle * } |
| 764 |
{ "In " format.editors.fml * ", " * format.emphasize.booktitle * } |
| 765 |
if$ |
| 766 |
} |
| 767 |
if$ |
| 768 |
} |
| 769 |
|
| 770 |
FUNCTION {format.thesis.type} |
| 771 |
{ type empty$ |
| 772 |
'skip$ |
| 773 |
{ pop$ |
| 774 |
type "t" change.case$ |
| 775 |
} |
| 776 |
if$ |
| 777 |
} |
| 778 |
|
| 779 |
FUNCTION {format.tr.number} |
| 780 |
{ type empty$ |
| 781 |
{ "Technical Report" } |
| 782 |
'type |
| 783 |
if$ |
| 784 |
number empty$ |
| 785 |
{ "t" change.case$ } |
| 786 |
{ number tie.or.space.connect } |
| 787 |
if$ |
| 788 |
} |
| 789 |
|
| 790 |
FUNCTION {format.article.crossref} |
| 791 |
{ "See" |
| 792 |
"\citeN{" * crossref * "}" * |
| 793 |
} |
| 794 |
|
| 795 |
FUNCTION {format.crossref.editor} |
| 796 |
{ editor #1 "{vv~}{ll}" format.name$ |
| 797 |
editor num.names$ duplicate$ |
| 798 |
#2 > |
| 799 |
{ pop$ " et~al." * } |
| 800 |
{ #2 < |
| 801 |
'skip$ |
| 802 |
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 803 |
{ " et~al." * } |
| 804 |
{ " and " * editor #2 "{vv~}{ll}" format.name$ * } |
| 805 |
if$ |
| 806 |
} |
| 807 |
if$ |
| 808 |
} |
| 809 |
if$ |
| 810 |
} |
| 811 |
|
| 812 |
FUNCTION {format.book.crossref} |
| 813 |
{ volume empty$ |
| 814 |
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
| 815 |
"In " |
| 816 |
} |
| 817 |
{ "Volume" volume tie.or.space.connect % gnp - changed to mixed case |
| 818 |
" of " * |
| 819 |
} |
| 820 |
if$ |
| 821 |
editor empty$ |
| 822 |
editor field.or.null author field.or.null = |
| 823 |
or |
| 824 |
{ key empty$ |
| 825 |
{ series empty$ |
| 826 |
{ "need editor, key, or series for " cite$ * " to crossref " * |
| 827 |
crossref * warning$ |
| 828 |
"" * |
| 829 |
} |
| 830 |
{ "{\em " * series * "\/}" * } |
| 831 |
if$ |
| 832 |
} |
| 833 |
{ key * } |
| 834 |
if$ |
| 835 |
} |
| 836 |
{ format.crossref.editor * } |
| 837 |
if$ |
| 838 |
" \citeN{" * crossref * "}" * |
| 839 |
} |
| 840 |
|
| 841 |
FUNCTION {format.incoll.inproc.crossref} |
| 842 |
{ "See" |
| 843 |
" \citeN{" * crossref * "}" * |
| 844 |
} |
| 845 |
|
| 846 |
% format.lab.names: |
| 847 |
% |
| 848 |
% determines "short" names for the abbreviated author information. |
| 849 |
% "Long" labels are created in calc.label, using the routine my.full.label |
| 850 |
% to format author and editor fields. |
| 851 |
% |
| 852 |
% There are 4 cases for labels. (n=3 in the example) |
| 853 |
% a) one author Foo |
| 854 |
% b) one to n Foo, Bar and Baz |
| 855 |
% c) use of "and others" Foo, Bar et al. |
| 856 |
% d) more than n Foo et al. |
| 857 |
% |
| 858 |
FUNCTION {format.lab.names} |
| 859 |
{ 's := |
| 860 |
s num.names$ 'numnames := |
| 861 |
numnames #2 > % change number to number of others allowed before |
| 862 |
% forcing "et al". |
| 863 |
{ s #1 "{vv~}{ll}" format.name$ " et~al." * } |
| 864 |
{ |
| 865 |
numnames #1 - 'namesleft := |
| 866 |
#2 'nameptr := |
| 867 |
s #1 "{vv~}{ll}" format.name$ |
| 868 |
{ namesleft #0 > } |
| 869 |
{ nameptr numnames = |
| 870 |
{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 871 |
{ " et~al." * } |
| 872 |
{ " and " * s nameptr "{vv~}{ll}" format.name$ * } |
| 873 |
if$ |
| 874 |
} |
| 875 |
{ ", " * s nameptr "{vv~}{ll}" format.name$ * } |
| 876 |
if$ |
| 877 |
nameptr #1 + 'nameptr := |
| 878 |
namesleft #1 - 'namesleft := |
| 879 |
} |
| 880 |
while$ |
| 881 |
} |
| 882 |
if$ |
| 883 |
} |
| 884 |
|
| 885 |
FUNCTION {author.key.label} |
| 886 |
{ author empty$ |
| 887 |
{ key empty$ |
| 888 |
{ "no key, author in " cite$ * warning$ |
| 889 |
cite$ #1 #3 substring$ } |
| 890 |
'key |
| 891 |
if$ |
| 892 |
} |
| 893 |
{ author format.lab.names } |
| 894 |
if$ |
| 895 |
} |
| 896 |
|
| 897 |
FUNCTION {editor.key.label} |
| 898 |
{ editor empty$ |
| 899 |
{ key empty$ |
| 900 |
{ "no key, editor in " cite$ * warning$ |
| 901 |
cite$ #1 #3 substring$ } |
| 902 |
'key |
| 903 |
if$ |
| 904 |
} |
| 905 |
{ editor format.lab.names } |
| 906 |
if$ |
| 907 |
} |
| 908 |
|
| 909 |
FUNCTION {author.key.organization.label} |
| 910 |
% |
| 911 |
% added - gnp. Provide label formatting by organization if author is null. |
| 912 |
% |
| 913 |
{ author empty$ |
| 914 |
{ organization empty$ |
| 915 |
{ key empty$ |
| 916 |
{ "no key, author or organization in " cite$ * warning$ |
| 917 |
cite$ #1 #3 substring$ } |
| 918 |
'key |
| 919 |
if$ |
| 920 |
} |
| 921 |
{ organization } |
| 922 |
if$ |
| 923 |
} |
| 924 |
{ author format.lab.names } |
| 925 |
if$ |
| 926 |
} |
| 927 |
|
| 928 |
FUNCTION {editor.key.organization.label} |
| 929 |
% |
| 930 |
% added - gnp. Provide label formatting by organization if editor is null. |
| 931 |
% |
| 932 |
{ editor empty$ |
| 933 |
{ organization empty$ |
| 934 |
{ key empty$ |
| 935 |
{ "no key, editor or organization in " cite$ * warning$ |
| 936 |
cite$ #1 #3 substring$ } |
| 937 |
'key |
| 938 |
if$ |
| 939 |
} |
| 940 |
{ organization } |
| 941 |
if$ |
| 942 |
} |
| 943 |
{ editor format.lab.names } |
| 944 |
if$ |
| 945 |
} |
| 946 |
|
| 947 |
FUNCTION {author.editor.key.label} |
| 948 |
{ author empty$ |
| 949 |
{ editor empty$ |
| 950 |
{ key empty$ |
| 951 |
{ "no key, author, or editor in " cite$ * warning$ |
| 952 |
cite$ #1 #3 substring$ } |
| 953 |
'key |
| 954 |
if$ |
| 955 |
} |
| 956 |
{ editor format.lab.names } |
| 957 |
if$ |
| 958 |
} |
| 959 |
{ author format.lab.names } |
| 960 |
if$ |
| 961 |
} |
| 962 |
|
| 963 |
FUNCTION {calc.label} |
| 964 |
% |
| 965 |
% Changed - GNP. See also author.organization.sort, editor.organization.sort |
| 966 |
% Form label for BibTeX entry. The classification of which fields are used |
| 967 |
% for which type of entry (book, inbook, etc.) are taken from alpha.bst. |
| 968 |
% The change here from newapa is to also include organization as a |
| 969 |
% citation label if author or editor is missing. |
| 970 |
% |
| 971 |
{ type$ "book" = |
| 972 |
type$ "inbook" = |
| 973 |
or |
| 974 |
'author.editor.key.label |
| 975 |
{ type$ "proceedings" = |
| 976 |
'editor.key.organization.label |
| 977 |
{ type$ "manual" = |
| 978 |
'author.key.organization.label |
| 979 |
'author.key.label |
| 980 |
if$ |
| 981 |
} |
| 982 |
if$ |
| 983 |
} |
| 984 |
if$ |
| 985 |
|
| 986 |
author empty$ % generate the full label citation information. |
| 987 |
{ editor empty$ |
| 988 |
{ organization empty$ |
| 989 |
{ "no author, editor, or organization in " cite$ * warning$ |
| 990 |
"??" } |
| 991 |
{ organization } |
| 992 |
if$ |
| 993 |
} |
| 994 |
{ editor my.full.label } |
| 995 |
if$ |
| 996 |
} |
| 997 |
{ author my.full.label } |
| 998 |
if$ |
| 999 |
|
| 1000 |
% leave label on the stack, to be popped when required. |
| 1001 |
|
| 1002 |
"}{" * swap$ * "}{" * |
| 1003 |
% year field.or.null purify$ #-1 #4 substring$ * |
| 1004 |
% |
| 1005 |
% save the year for sort processing afterwards (adding a, b, c, etc.) |
| 1006 |
% |
| 1007 |
year field.or.null purify$ #-1 #4 substring$ |
| 1008 |
'label.year := |
| 1009 |
} |
| 1010 |
|
| 1011 |
FUNCTION {output.bibitem} |
| 1012 |
{ newline$ |
| 1013 |
|
| 1014 |
"\bibitem[\protect\citeauthoryear{" write$ |
| 1015 |
calc.label write$ |
| 1016 |
sort.year write$ |
| 1017 |
"}]{" write$ |
| 1018 |
|
| 1019 |
cite$ write$ |
| 1020 |
"}" write$ |
| 1021 |
newline$ |
| 1022 |
"" |
| 1023 |
before.all 'output.state := |
| 1024 |
} |
| 1025 |
|
| 1026 |
FUNCTION {article} |
| 1027 |
{ output.bibitem |
| 1028 |
format.authors |
| 1029 |
"author" output.check |
| 1030 |
author format.key output % added |
| 1031 |
output.year.check % added |
| 1032 |
new.block |
| 1033 |
format.title |
| 1034 |
"title" output.check |
| 1035 |
new.block |
| 1036 |
crossref missing$ |
| 1037 |
{ format.jour.vol output |
| 1038 |
} |
| 1039 |
{ format.article.crossref output.nonnull |
| 1040 |
format.pages output |
| 1041 |
} |
| 1042 |
if$ |
| 1043 |
new.block |
| 1044 |
note output |
| 1045 |
fin.entry |
| 1046 |
format.annotation write$ |
| 1047 |
newline$ |
| 1048 |
} |
| 1049 |
|
| 1050 |
FUNCTION {book} |
| 1051 |
{ output.bibitem |
| 1052 |
author empty$ |
| 1053 |
{ format.editors |
| 1054 |
"author and editor" output.check } |
| 1055 |
{ format.authors |
| 1056 |
output.nonnull |
| 1057 |
crossref missing$ |
| 1058 |
{ "author and editor" editor either.or.check } |
| 1059 |
'skip$ |
| 1060 |
if$ |
| 1061 |
} |
| 1062 |
if$ |
| 1063 |
output.year.check % added |
| 1064 |
new.block |
| 1065 |
format.btitle |
| 1066 |
"title" output.check |
| 1067 |
crossref missing$ |
| 1068 |
{ format.bvolume output |
| 1069 |
new.block |
| 1070 |
format.number.series output |
| 1071 |
new.sentence |
| 1072 |
address output |
| 1073 |
publisher "publisher" output.check.colon |
| 1074 |
} |
| 1075 |
{ new.block |
| 1076 |
format.book.crossref output.nonnull |
| 1077 |
} |
| 1078 |
if$ |
| 1079 |
new.block |
| 1080 |
note output |
| 1081 |
fin.entry |
| 1082 |
format.annotation write$ |
| 1083 |
newline$ |
| 1084 |
} |
| 1085 |
|
| 1086 |
FUNCTION {booklet} |
| 1087 |
{ output.bibitem |
| 1088 |
format.authors output |
| 1089 |
author format.key output % added |
| 1090 |
output.year.check % added |
| 1091 |
new.block |
| 1092 |
format.title |
| 1093 |
"title" output.check |
| 1094 |
new.block |
| 1095 |
howpublished output |
| 1096 |
address output |
| 1097 |
new.block |
| 1098 |
note output |
| 1099 |
fin.entry |
| 1100 |
format.annotation write$ |
| 1101 |
} |
| 1102 |
|
| 1103 |
FUNCTION {inbook} |
| 1104 |
{ output.bibitem |
| 1105 |
author empty$ |
| 1106 |
{ format.editors |
| 1107 |
"author and editor" output.check |
| 1108 |
} |
| 1109 |
{ format.authors output.nonnull |
| 1110 |
crossref missing$ |
| 1111 |
{ "author and editor" editor either.or.check } |
| 1112 |
'skip$ |
| 1113 |
if$ |
| 1114 |
} |
| 1115 |
if$ |
| 1116 |
output.year.check % added |
| 1117 |
new.block |
| 1118 |
format.btitle |
| 1119 |
"title" output.check |
| 1120 |
crossref missing$ |
| 1121 |
{ format.bvolume output |
| 1122 |
format.chapter.pages |
| 1123 |
"chapter and pages" output.check |
| 1124 |
new.block |
| 1125 |
format.number.series output |
| 1126 |
new.sentence |
| 1127 |
address output |
| 1128 |
publisher |
| 1129 |
"publisher" output.check.colon |
| 1130 |
} |
| 1131 |
{ format.chapter.pages "chapter and pages" output.check |
| 1132 |
new.block |
| 1133 |
format.book.crossref output.nonnull |
| 1134 |
} |
| 1135 |
if$ |
| 1136 |
new.block |
| 1137 |
note output |
| 1138 |
fin.entry |
| 1139 |
format.annotation write$ |
| 1140 |
} |
| 1141 |
|
| 1142 |
FUNCTION {incollection} |
| 1143 |
{ output.bibitem |
| 1144 |
format.authors |
| 1145 |
"author" output.check |
| 1146 |
author format.key output % added |
| 1147 |
output.year.check % added |
| 1148 |
new.block |
| 1149 |
format.title |
| 1150 |
"title" output.check |
| 1151 |
new.block |
| 1152 |
crossref missing$ |
| 1153 |
{ format.in.ed.booktitle |
| 1154 |
"booktitle" output.check |
| 1155 |
format.bvolume output |
| 1156 |
format.number.series output |
| 1157 |
format.chapter.pages output % gnp - was special.output.nonnull |
| 1158 |
% left out comma before page numbers |
| 1159 |
new.sentence |
| 1160 |
address output |
| 1161 |
publisher "publisher" output.check.colon |
| 1162 |
} |
| 1163 |
{ format.incoll.inproc.crossref |
| 1164 |
output.nonnull |
| 1165 |
format.chapter.pages output |
| 1166 |
} |
| 1167 |
if$ |
| 1168 |
new.block |
| 1169 |
note output |
| 1170 |
fin.entry |
| 1171 |
format.annotation write$ |
| 1172 |
} |
| 1173 |
|
| 1174 |
FUNCTION {inproceedings} |
| 1175 |
{ output.bibitem |
| 1176 |
format.authors |
| 1177 |
"author" output.check |
| 1178 |
author format.key output % added |
| 1179 |
output.year.check % added |
| 1180 |
new.block |
| 1181 |
format.title |
| 1182 |
"title" output.check |
| 1183 |
new.block |
| 1184 |
crossref missing$ |
| 1185 |
{ format.in.ed.booktitle |
| 1186 |
"booktitle" output.check |
| 1187 |
format.bvolume output |
| 1188 |
format.number.series output |
| 1189 |
address output |
| 1190 |
format.pages output |
| 1191 |
new.sentence |
| 1192 |
organization output |
| 1193 |
publisher output.colon |
| 1194 |
} |
| 1195 |
{ format.incoll.inproc.crossref output.nonnull |
| 1196 |
format.pages output |
| 1197 |
} |
| 1198 |
if$ |
| 1199 |
new.block |
| 1200 |
note output |
| 1201 |
fin.entry |
| 1202 |
format.annotation write$ |
| 1203 |
} |
| 1204 |
|
| 1205 |
FUNCTION {conference} { inproceedings } |
| 1206 |
|
| 1207 |
FUNCTION {manual} |
| 1208 |
{ output.bibitem |
| 1209 |
author empty$ |
| 1210 |
{ editor empty$ |
| 1211 |
{ organization "organization" output.check |
| 1212 |
organization format.key output } % if all else fails, use key |
| 1213 |
{ format.editors "author and editor" output.check } |
| 1214 |
if$ |
| 1215 |
} |
| 1216 |
{ format.authors output.nonnull } |
| 1217 |
if$ |
| 1218 |
output.year.check % added |
| 1219 |
new.block |
| 1220 |
format.btitle |
| 1221 |
"title" output.check |
| 1222 |
organization address new.block.checkb |
| 1223 |
% Reversed the order of "address" and "organization", added the ":". |
| 1224 |
address output |
| 1225 |
organization "organization" output.check.colon |
| 1226 |
% address output |
| 1227 |
% ":" output |
| 1228 |
% organization output |
| 1229 |
new.block |
| 1230 |
note output |
| 1231 |
fin.entry |
| 1232 |
format.annotation write$ |
| 1233 |
} |
| 1234 |
|
| 1235 |
FUNCTION {mastersthesis} |
| 1236 |
{ output.bibitem |
| 1237 |
format.authors |
| 1238 |
"author" output.check |
| 1239 |
author format.key output % added |
| 1240 |
output.year.check % added |
| 1241 |
new.block |
| 1242 |
format.title |
| 1243 |
"title" output.check |
| 1244 |
new.block |
| 1245 |
"Master's thesis" format.thesis.type output.nonnull |
| 1246 |
school "school" output.check |
| 1247 |
address output |
| 1248 |
new.block |
| 1249 |
note output |
| 1250 |
fin.entry |
| 1251 |
format.annotation write$ |
| 1252 |
} |
| 1253 |
|
| 1254 |
FUNCTION {misc} |
| 1255 |
{ output.bibitem |
| 1256 |
format.authors output |
| 1257 |
author format.key output % added |
| 1258 |
output.year.check % added |
| 1259 |
title howpublished new.block.checkb |
| 1260 |
format.title output |
| 1261 |
new.block |
| 1262 |
howpublished output |
| 1263 |
new.block |
| 1264 |
note output |
| 1265 |
fin.entry |
| 1266 |
format.annotation write$ |
| 1267 |
} |
| 1268 |
|
| 1269 |
FUNCTION {phdthesis} |
| 1270 |
{ output.bibitem |
| 1271 |
format.authors |
| 1272 |
"author" output.check |
| 1273 |
author format.key output % added |
| 1274 |
output.year.check % added |
| 1275 |
new.block |
| 1276 |
format.btitle |
| 1277 |
"title" output.check |
| 1278 |
new.block |
| 1279 |
"Ph.\ D. thesis" format.thesis.type output.nonnull |
| 1280 |
school "school" output.check |
| 1281 |
address output |
| 1282 |
new.block |
| 1283 |
note output |
| 1284 |
fin.entry |
| 1285 |
format.annotation write$ |
| 1286 |
} |
| 1287 |
|
| 1288 |
FUNCTION {proceedings} |
| 1289 |
{ output.bibitem |
| 1290 |
editor empty$ |
| 1291 |
{ organization output |
| 1292 |
organization format.key output } % gnp - changed from author format.key |
| 1293 |
{ format.editors output.nonnull } |
| 1294 |
if$ |
| 1295 |
% author format.key output % gnp - removed (should be either |
| 1296 |
% editor or organization |
| 1297 |
output.year.check % added (newapa) |
| 1298 |
new.block |
| 1299 |
format.btitle |
| 1300 |
"title" output.check |
| 1301 |
format.bvolume output |
| 1302 |
format.number.series output |
| 1303 |
address output |
| 1304 |
new.sentence |
| 1305 |
organization output |
| 1306 |
publisher output.colon |
| 1307 |
new.block |
| 1308 |
note output |
| 1309 |
fin.entry |
| 1310 |
format.annotation write$ |
| 1311 |
} |
| 1312 |
|
| 1313 |
FUNCTION {techreport} |
| 1314 |
{ output.bibitem |
| 1315 |
format.authors |
| 1316 |
"author" output.check |
| 1317 |
author format.key output % added |
| 1318 |
output.year.check % added |
| 1319 |
new.block |
| 1320 |
format.title |
| 1321 |
"title" output.check |
| 1322 |
new.block |
| 1323 |
format.tr.number output.nonnull |
| 1324 |
institution |
| 1325 |
"institution" output.check |
| 1326 |
address output |
| 1327 |
new.block |
| 1328 |
note output |
| 1329 |
fin.entry |
| 1330 |
format.annotation write$ |
| 1331 |
} |
| 1332 |
|
| 1333 |
FUNCTION {unpublished} |
| 1334 |
{ output.bibitem |
| 1335 |
format.authors |
| 1336 |
"author" output.check |
| 1337 |
author format.key output % added |
| 1338 |
output.year.check % added |
| 1339 |
new.block |
| 1340 |
format.title |
| 1341 |
"title" output.check |
| 1342 |
new.block |
| 1343 |
note "note" output.check |
| 1344 |
fin.entry |
| 1345 |
format.annotation write$ |
| 1346 |
} |
| 1347 |
|
| 1348 |
FUNCTION {default.type} { misc } |
| 1349 |
|
| 1350 |
MACRO {jan} {"January"} |
| 1351 |
|
| 1352 |
MACRO {feb} {"February"} |
| 1353 |
|
| 1354 |
MACRO {mar} {"March"} |
| 1355 |
|
| 1356 |
MACRO {apr} {"April"} |
| 1357 |
|
| 1358 |
MACRO {may} {"May"} |
| 1359 |
|
| 1360 |
MACRO {jun} {"June"} |
| 1361 |
|
| 1362 |
MACRO {jul} {"July"} |
| 1363 |
|
| 1364 |
MACRO {aug} {"August"} |
| 1365 |
|
| 1366 |
MACRO {sep} {"September"} |
| 1367 |
|
| 1368 |
MACRO {oct} {"October"} |
| 1369 |
|
| 1370 |
MACRO {nov} {"November"} |
| 1371 |
|
| 1372 |
MACRO {dec} {"December"} |
| 1373 |
|
| 1374 |
MACRO {acmcs} {"ACM Computing Surveys"} |
| 1375 |
|
| 1376 |
MACRO {acta} {"Acta Informatica"} |
| 1377 |
|
| 1378 |
MACRO {ai} {"Artificial Intelligence"} |
| 1379 |
|
| 1380 |
MACRO {cacm} {"Communications of the ACM"} |
| 1381 |
|
| 1382 |
MACRO {ibmjrd} {"IBM Journal of Research and Development"} |
| 1383 |
|
| 1384 |
MACRO {ibmsj} {"IBM Systems Journal"} |
| 1385 |
|
| 1386 |
MACRO {ieeese} {"IEEE Transactions on Software Engineering"} |
| 1387 |
|
| 1388 |
MACRO {ieeetc} {"IEEE Transactions on Computers"} |
| 1389 |
|
| 1390 |
MACRO {ieeetcad} |
| 1391 |
{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} |
| 1392 |
|
| 1393 |
MACRO {ipl} {"Information Processing Letters"} |
| 1394 |
|
| 1395 |
MACRO {jacm} {"Journal of the ACM"} |
| 1396 |
|
| 1397 |
MACRO {jcss} {"Journal of Computer and System Sciences"} |
| 1398 |
|
| 1399 |
MACRO {scp} {"Science of Computer Programming"} |
| 1400 |
|
| 1401 |
MACRO {sicomp} {"SIAM Journal on Computing"} |
| 1402 |
|
| 1403 |
MACRO {tocs} {"ACM Transactions on Computer Systems"} |
| 1404 |
|
| 1405 |
MACRO {tods} {"ACM Transactions on Database Systems"} |
| 1406 |
|
| 1407 |
MACRO {tog} {"ACM Transactions on Graphics"} |
| 1408 |
|
| 1409 |
MACRO {toms} {"ACM Transactions on Mathematical Software"} |
| 1410 |
|
| 1411 |
MACRO {toois} {"ACM Transactions on Office Information Systems"} |
| 1412 |
|
| 1413 |
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} |
| 1414 |
|
| 1415 |
MACRO {tcs} {"Theoretical Computer Science"} |
| 1416 |
|
| 1417 |
READ |
| 1418 |
|
| 1419 |
FUNCTION {sortify} |
| 1420 |
{ purify$ |
| 1421 |
"l" change.case$ |
| 1422 |
} |
| 1423 |
|
| 1424 |
INTEGERS { len } |
| 1425 |
|
| 1426 |
FUNCTION {chop.word} |
| 1427 |
{ 's := |
| 1428 |
'len := |
| 1429 |
s #1 len substring$ = |
| 1430 |
{ s len #1 + global.max$ substring$ } |
| 1431 |
's |
| 1432 |
if$ |
| 1433 |
} |
| 1434 |
|
| 1435 |
|
| 1436 |
|
| 1437 |
FUNCTION {sort.format.names} |
| 1438 |
{ 's := |
| 1439 |
#1 'nameptr := |
| 1440 |
"" |
| 1441 |
s num.names$ 'numnames := |
| 1442 |
numnames 'namesleft := |
| 1443 |
{ namesleft #0 > } |
| 1444 |
{ nameptr #1 > |
| 1445 |
{ " " * } |
| 1446 |
'skip$ |
| 1447 |
if$ |
| 1448 |
s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := |
| 1449 |
nameptr numnames = t "others" = and |
| 1450 |
{ " et~al" * } |
| 1451 |
{ t sortify * } |
| 1452 |
if$ |
| 1453 |
nameptr #1 + 'nameptr := |
| 1454 |
namesleft #1 - 'namesleft := |
| 1455 |
} |
| 1456 |
while$ |
| 1457 |
} |
| 1458 |
|
| 1459 |
FUNCTION {sort.format.title} |
| 1460 |
{ 't := |
| 1461 |
"A " #2 |
| 1462 |
"An " #3 |
| 1463 |
"The " #4 t chop.word |
| 1464 |
chop.word |
| 1465 |
chop.word |
| 1466 |
sortify |
| 1467 |
#1 global.max$ substring$ |
| 1468 |
} |
| 1469 |
|
| 1470 |
FUNCTION {author.sort} |
| 1471 |
{ author empty$ |
| 1472 |
{ key empty$ |
| 1473 |
{ "to sort, need author or key in " cite$ * warning$ |
| 1474 |
"" } |
| 1475 |
{ key sortify } |
| 1476 |
if$ |
| 1477 |
} |
| 1478 |
{ author sort.format.names } |
| 1479 |
if$ |
| 1480 |
} |
| 1481 |
|
| 1482 |
FUNCTION {editor.sort} |
| 1483 |
{ editor empty$ |
| 1484 |
{ key empty$ |
| 1485 |
{ "to sort, need editor or key in " cite$ * warning$ |
| 1486 |
"" |
| 1487 |
} |
| 1488 |
{ key sortify } |
| 1489 |
if$ |
| 1490 |
} |
| 1491 |
{ editor sort.format.names } |
| 1492 |
if$ |
| 1493 |
} |
| 1494 |
|
| 1495 |
FUNCTION {author.editor.sort} |
| 1496 |
{ author empty$ |
| 1497 |
{ "missing author in " cite$ * warning$ |
| 1498 |
editor empty$ |
| 1499 |
{ key empty$ |
| 1500 |
{ "to sort, need author, editor, or key in " cite$ * warning$ |
| 1501 |
"" |
| 1502 |
} |
| 1503 |
{ key sortify } |
| 1504 |
if$ |
| 1505 |
} |
| 1506 |
{ editor sort.format.names } |
| 1507 |
if$ |
| 1508 |
} |
| 1509 |
{ author sort.format.names } |
| 1510 |
if$ |
| 1511 |
} |
| 1512 |
|
| 1513 |
FUNCTION {author.organization.sort} |
| 1514 |
% |
| 1515 |
% added - GNP. Stack author or organization for sorting (from alpha.bst). |
| 1516 |
% Unlike alpha.bst, we need entire names, not abbreviations |
| 1517 |
% |
| 1518 |
{ author empty$ |
| 1519 |
{ organization empty$ |
| 1520 |
{ key empty$ |
| 1521 |
{ "to sort, need author, organization, or key in " cite$ * warning$ |
| 1522 |
"" |
| 1523 |
} |
| 1524 |
{ key sortify } |
| 1525 |
if$ |
| 1526 |
} |
| 1527 |
{ organization sortify } |
| 1528 |
if$ |
| 1529 |
} |
| 1530 |
{ author sort.format.names } |
| 1531 |
if$ |
| 1532 |
} |
| 1533 |
|
| 1534 |
FUNCTION {editor.organization.sort} |
| 1535 |
% |
| 1536 |
% added - GNP. Stack editor or organization for sorting (from alpha.bst). |
| 1537 |
% Unlike alpha.bst, we need entire names, not abbreviations |
| 1538 |
% |
| 1539 |
{ editor empty$ |
| 1540 |
{ organization empty$ |
| 1541 |
{ key empty$ |
| 1542 |
{ "to sort, need editor, organization, or key in " cite$ * warning$ |
| 1543 |
"" |
| 1544 |
} |
| 1545 |
{ key sortify } |
| 1546 |
if$ |
| 1547 |
} |
| 1548 |
{ organization sortify } |
| 1549 |
if$ |
| 1550 |
} |
| 1551 |
{ editor sort.format.names } |
| 1552 |
if$ |
| 1553 |
} |
| 1554 |
|
| 1555 |
FUNCTION {presort} |
| 1556 |
% |
| 1557 |
% Presort creates the bibentry's label via a call to calc.label, and then |
| 1558 |
% sorts the entries based on entry type. Chicago.bst adds support for |
| 1559 |
% including organizations as the sort key; the following is stolen from |
| 1560 |
% alpha.bst. |
| 1561 |
% |
| 1562 |
{ calc.label sortify % recalculate bibitem label |
| 1563 |
year field.or.null purify$ #-1 #4 substring$ * % add year |
| 1564 |
" " |
| 1565 |
* |
| 1566 |
type$ "book" = |
| 1567 |
type$ "inbook" = |
| 1568 |
or |
| 1569 |
'author.editor.sort |
| 1570 |
{ type$ "proceedings" = |
| 1571 |
'editor.organization.sort |
| 1572 |
{ type$ "manual" = |
| 1573 |
'author.organization.sort |
| 1574 |
'author.sort |
| 1575 |
if$ |
| 1576 |
} |
| 1577 |
if$ |
| 1578 |
} |
| 1579 |
if$ |
| 1580 |
#1 entry.max$ substring$ % added for newapa |
| 1581 |
'sort.label := % added for newapa |
| 1582 |
sort.label % added for newapa |
| 1583 |
* |
| 1584 |
" " |
| 1585 |
* |
| 1586 |
title field.or.null |
| 1587 |
sort.format.title |
| 1588 |
* |
| 1589 |
#1 entry.max$ substring$ |
| 1590 |
'sort.key$ := |
| 1591 |
} |
| 1592 |
|
| 1593 |
ITERATE {presort} |
| 1594 |
|
| 1595 |
SORT % by label, year, author/editor, title |
| 1596 |
|
| 1597 |
STRINGS { last.label next.extra } |
| 1598 |
|
| 1599 |
INTEGERS { last.extra.num } |
| 1600 |
|
| 1601 |
FUNCTION {initialize.extra.label.stuff} |
| 1602 |
{ #0 int.to.chr$ 'last.label := |
| 1603 |
"" 'next.extra := |
| 1604 |
#0 'last.extra.num := |
| 1605 |
} |
| 1606 |
|
| 1607 |
FUNCTION {forward.pass} |
| 1608 |
% |
| 1609 |
% Pass through all entries, comparing current entry to last one. |
| 1610 |
% Need to concatenate year to the stack (done by calc.label) to determine |
| 1611 |
% if two entries are the same (see presort) |
| 1612 |
% |
| 1613 |
{ last.label |
| 1614 |
calc.label year field.or.null purify$ #-1 #4 substring$ * % add year |
| 1615 |
#1 entry.max$ substring$ = % are they equal? |
| 1616 |
{ last.extra.num #1 + 'last.extra.num := |
| 1617 |
last.extra.num int.to.chr$ 'extra.label := |
| 1618 |
} |
| 1619 |
{ "a" chr.to.int$ 'last.extra.num := |
| 1620 |
"" 'extra.label := |
| 1621 |
calc.label year field.or.null purify$ #-1 #4 substring$ * % add year |
| 1622 |
#1 entry.max$ substring$ 'last.label := % assign to last.label |
| 1623 |
} |
| 1624 |
if$ |
| 1625 |
} |
| 1626 |
|
| 1627 |
FUNCTION {reverse.pass} |
| 1628 |
{ next.extra "b" = |
| 1629 |
{ "a" 'extra.label := } |
| 1630 |
'skip$ |
| 1631 |
if$ |
| 1632 |
label.year extra.label * 'sort.year := |
| 1633 |
extra.label 'next.extra := |
| 1634 |
} |
| 1635 |
|
| 1636 |
EXECUTE {initialize.extra.label.stuff} |
| 1637 |
|
| 1638 |
ITERATE {forward.pass} |
| 1639 |
|
| 1640 |
REVERSE {reverse.pass} |
| 1641 |
|
| 1642 |
FUNCTION {bib.sort.order} |
| 1643 |
{ sort.label |
| 1644 |
" " |
| 1645 |
* |
| 1646 |
year field.or.null sortify |
| 1647 |
* |
| 1648 |
" " |
| 1649 |
* |
| 1650 |
title field.or.null |
| 1651 |
sort.format.title |
| 1652 |
* |
| 1653 |
#1 entry.max$ substring$ |
| 1654 |
'sort.key$ := |
| 1655 |
} |
| 1656 |
|
| 1657 |
ITERATE {bib.sort.order} |
| 1658 |
|
| 1659 |
SORT % by sort.label, year, title --- giving final bib. order. |
| 1660 |
|
| 1661 |
FUNCTION {begin.bib} |
| 1662 |
|
| 1663 |
{ preamble$ empty$ |
| 1664 |
'skip$ |
| 1665 |
{ preamble$ write$ newline$ } |
| 1666 |
if$ |
| 1667 |
"\begin{thebibliography}{}" write$ newline$ |
| 1668 |
} |
| 1669 |
|
| 1670 |
|
| 1671 |
EXECUTE {begin.bib} |
| 1672 |
|
| 1673 |
EXECUTE {init.state.consts} |
| 1674 |
|
| 1675 |
ITERATE {call.type$} |
| 1676 |
|
| 1677 |
FUNCTION {end.bib} |
| 1678 |
{ newline$ |
| 1679 |
"\end{thebibliography}" write$ newline$ |
| 1680 |
} |
| 1681 |
|
| 1682 |
EXECUTE {end.bib} |
| 1683 |
|