| 1 |
%% |
| 2 |
%% This is file `achicago.bsq', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% achicago.bst |
| 8 |
%% |
| 9 |
%% This program is part of the Frankenstein bundle for LaTeX. |
| 10 |
%% |
| 11 |
%% Copyright (C) 1995-2001 Matthew Swift <[email protected]> |
| 12 |
%% |
| 13 |
%% This file may have one of TWO names, either |
| 14 |
%% achicago.bst or achicago.bsq. This |
| 15 |
%% BibTeX style will work ONLY if it is called achicago.bst |
| 16 |
%% and placed in a proper directory. This file should have been |
| 17 |
%% distributed to you with a DIFFERENT file (also) called |
| 18 |
%% achicago.bst which functions identically to this one |
| 19 |
%% but contains documentation in comments. This file works faster, |
| 20 |
%% but the other should be kept because it contains the documentation |
| 21 |
%% for this BibTeX style. Files called README and INSTALL should have |
| 22 |
%% also been distributed to you with this file; see them for more |
| 23 |
%% information. |
| 24 |
%% |
| 25 |
%% This program is free software; you may redistribute it and/or |
| 26 |
%% modify it under the conditions of the LaTeX Project Public |
| 27 |
%% License, either version 1.2 or (at your option) any later version. |
| 28 |
%% The latest version of this license is in |
| 29 |
%% http://www.latex-project.org/lppl.txt, and version 1.2 or later is |
| 30 |
%% part of all distributions of LaTeX version 1999/12/01 or later. |
| 31 |
%% |
| 32 |
%% This program is distributed in the hope that it will be useful, |
| 33 |
%% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 34 |
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 35 |
%% LaTeX Project Public License for more details. |
| 36 |
%% |
| 37 |
%% \CharacterTable |
| 38 |
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 39 |
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 40 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 41 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 42 |
%% Dollar \$ Percent \% Ampersand \& |
| 43 |
%% Acute accent \' Left paren \( Right paren \) |
| 44 |
%% Asterisk \* Plus \+ Comma \, |
| 45 |
%% Minus \- Point \. Solidus \/ |
| 46 |
%% Colon \: Semicolon \; Less than \< |
| 47 |
%% Equals \= Greater than \> Question mark \? |
| 48 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 49 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 50 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 51 |
%% Right brace \} Tilde \~} |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
%% |
| 89 |
|
| 90 |
%% A BibTeX bibliography style |
| 91 |
%% conforming to the Chicago Manual's A style |
| 92 |
%% but with B style author-date citations |
| 93 |
%% by Matt Swift <[email protected]> |
| 94 |
%% |
| 95 |
%% \def\fileinfo{A Chicago Manual BibTeX style} |
| 96 |
%% \def\DoXPackageS {longtable} |
| 97 |
%% \def\initelyHavECitationS {} |
| 98 |
%% \def\fileversion{v1} |
| 99 |
%% \def\filedate{2001/08/31} |
| 100 |
%% \def\docdate{2001/08/31} |
| 101 |
%% |
| 102 |
|
| 103 |
INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
| 104 |
INTEGERS { author.ptype editor.ptype organization.ptype key.ptype |
| 105 |
emergency.ptype } |
| 106 |
INTEGERS { last.year.tag.num } |
| 107 |
STRINGS { last.leaditem last.label.and.year following.year.label.tag } |
| 108 |
INTEGERS { j nameptr namesleft numnames len } |
| 109 |
STRINGS { s t u v w } |
| 110 |
ENTRY |
| 111 |
{ address |
| 112 |
annotation |
| 113 |
author |
| 114 |
bookauthor |
| 115 |
booktitle |
| 116 |
chapter |
| 117 |
edition |
| 118 |
editor |
| 119 |
faddress |
| 120 |
flanguage |
| 121 |
fpublisher |
| 122 |
ftitle |
| 123 |
fyear |
| 124 |
howpublished |
| 125 |
illustrator |
| 126 |
institution |
| 127 |
journal |
| 128 |
key |
| 129 |
month |
| 130 |
note |
| 131 |
number |
| 132 |
oaddress |
| 133 |
opublisher |
| 134 |
organization |
| 135 |
oyear |
| 136 |
pages |
| 137 |
publisher |
| 138 |
school |
| 139 |
series |
| 140 |
seriesedition |
| 141 |
title |
| 142 |
translator |
| 143 |
type |
| 144 |
volume |
| 145 |
year |
| 146 |
yearcomp |
| 147 |
} |
| 148 |
{ principal-type } |
| 149 |
{ label |
| 150 |
year.label year.label.tag |
| 151 |
principal-field |
| 152 |
leaditem |
| 153 |
} |
| 154 |
MACRO {jan} {"January"} |
| 155 |
MACRO {feb} {"February"} |
| 156 |
MACRO {mar} {"March"} |
| 157 |
MACRO {apr} {"April"} |
| 158 |
MACRO {may} {"May"} |
| 159 |
MACRO {jun} {"June"} |
| 160 |
MACRO {jul} {"July"} |
| 161 |
MACRO {aug} {"August"} |
| 162 |
MACRO {sep} {"September"} |
| 163 |
MACRO {oct} {"October"} |
| 164 |
MACRO {nov} {"November"} |
| 165 |
MACRO {dec} {"December"} |
| 166 |
FUNCTION {debugval} |
| 167 |
{ ": [" * |
| 168 |
swap$ * %$ |
| 169 |
"] in " * cite$ * %$ |
| 170 |
top$ %$ |
| 171 |
} |
| 172 |
|
| 173 |
FUNCTION {debugmsg} |
| 174 |
{ " in " * cite$ * top$ |
| 175 |
} |
| 176 |
FUNCTION {init.scalars} |
| 177 |
{ #0 'before.all := |
| 178 |
#1 'mid.sentence := |
| 179 |
#2 'after.sentence := |
| 180 |
#3 'after.block := |
| 181 |
|
| 182 |
#0 'author.ptype := |
| 183 |
#1 'editor.ptype := |
| 184 |
#2 'organization.ptype := |
| 185 |
#3 'key.ptype := |
| 186 |
#4 'emergency.ptype := |
| 187 |
} |
| 188 |
FUNCTION {not} |
| 189 |
{ { #0 |
| 190 |
} |
| 191 |
{ #1 |
| 192 |
} |
| 193 |
if$ %$ |
| 194 |
} |
| 195 |
|
| 196 |
FUNCTION {and} |
| 197 |
{ 'skip$ %$ |
| 198 |
{ pop$ %$ |
| 199 |
#0 |
| 200 |
} |
| 201 |
if$ %$ |
| 202 |
} |
| 203 |
|
| 204 |
FUNCTION {or} |
| 205 |
{ { pop$ %$ |
| 206 |
#1 |
| 207 |
} |
| 208 |
'skip$ %$ |
| 209 |
if$ %$ |
| 210 |
} |
| 211 |
FUNCTION {comma} |
| 212 |
{ "," |
| 213 |
} |
| 214 |
|
| 215 |
FUNCTION {period} |
| 216 |
{ "." |
| 217 |
} |
| 218 |
|
| 219 |
FUNCTION {hyphen} |
| 220 |
{ "-" |
| 221 |
} |
| 222 |
|
| 223 |
FUNCTION {colon} |
| 224 |
{ ":" |
| 225 |
} |
| 226 |
|
| 227 |
FUNCTION {space} |
| 228 |
{ " " |
| 229 |
} |
| 230 |
|
| 231 |
FUNCTION {delimiter.name-part} |
| 232 |
{ " " |
| 233 |
} |
| 234 |
|
| 235 |
FUNCTION {delimiter.name} |
| 236 |
{ " " |
| 237 |
} |
| 238 |
|
| 239 |
FUNCTION {delimiter.sub-sortkey} |
| 240 |
{ " " |
| 241 |
} |
| 242 |
|
| 243 |
FUNCTION {tie} |
| 244 |
{ "~" |
| 245 |
} |
| 246 |
|
| 247 |
FUNCTION {etal} |
| 248 |
{ " et~al." |
| 249 |
} |
| 250 |
FUNCTION {unidentified} |
| 251 |
{ "HiGHlY*Peco@lIEr" |
| 252 |
} |
| 253 |
FUNCTION{output.begin} |
| 254 |
{ "" |
| 255 |
before.all 'output.state := |
| 256 |
} |
| 257 |
FUNCTION {output.end} |
| 258 |
{ write$ %$ |
| 259 |
} |
| 260 |
FUNCTION {new.block} |
| 261 |
{ output.state before.all = |
| 262 |
'skip$ %$ |
| 263 |
{ after.block 'output.state := |
| 264 |
} |
| 265 |
if$ %$ |
| 266 |
} |
| 267 |
FUNCTION {new.sentence} |
| 268 |
{ output.state before.all = output.state after.block = or |
| 269 |
'skip$ %$ |
| 270 |
{ after.sentence 'output.state := |
| 271 |
} |
| 272 |
if$ %$ |
| 273 |
} |
| 274 |
FUNCTION {output.internal} |
| 275 |
{ 's := % s := string/entry(nonnull) |
| 276 |
space * 't := % t := punctuation + space |
| 277 |
output.state mid.sentence = |
| 278 |
{ t * write$ %$ |
| 279 |
} |
| 280 |
{ output.state after.block = |
| 281 |
{ add.period$ write$ |
| 282 |
newline$ %$ |
| 283 |
"\newblock " write$ %$ |
| 284 |
} |
| 285 |
{ output.state before.all = |
| 286 |
'write$ %$ |
| 287 |
{ add.period$ space * write$ |
| 288 |
} |
| 289 |
if$ %$ |
| 290 |
} |
| 291 |
if$ %$ |
| 292 |
mid.sentence 'output.state := |
| 293 |
} |
| 294 |
if$ %$ |
| 295 |
s |
| 296 |
} |
| 297 |
FUNCTION {output} |
| 298 |
{ swap$ duplicate$ empty$ |
| 299 |
{ pop$ |
| 300 |
pop$ %$ |
| 301 |
} |
| 302 |
'output.internal |
| 303 |
if$ %$ |
| 304 |
} |
| 305 |
FUNCTION {output.bibitem} |
| 306 |
{ newline$ %$ |
| 307 |
"\bibitem[\UnexpandableProtect\SCcite{" write$ %$ |
| 308 |
label write$ %$ |
| 309 |
"}{" write$ %$ |
| 310 |
year.label year.label.tag * write$ %$ |
| 311 |
"}]{" write$ %$ |
| 312 |
cite$ write$ |
| 313 |
"}" write$ %$ |
| 314 |
newline$ %$ |
| 315 |
} |
| 316 |
FUNCTION {field.or.null} |
| 317 |
{ duplicate$ empty$ |
| 318 |
{ pop$ %$ |
| 319 |
"" |
| 320 |
} |
| 321 |
'skip$ %$ |
| 322 |
if$ %$ |
| 323 |
} |
| 324 |
FUNCTION {italicize} |
| 325 |
{ duplicate$ empty$ |
| 326 |
{ pop$ %$ |
| 327 |
"" |
| 328 |
} |
| 329 |
{ "\textitswitch{" swap$ * "}" * %$ |
| 330 |
} |
| 331 |
if$ %$ |
| 332 |
} |
| 333 |
FUNCTION {parenthesize} |
| 334 |
{ duplicate$ empty$ |
| 335 |
{ pop$ %$ |
| 336 |
"" |
| 337 |
} |
| 338 |
{ "(" swap$ * ")" * %$ |
| 339 |
} |
| 340 |
if$ %$ |
| 341 |
} |
| 342 |
FUNCTION {format.clip} |
| 343 |
{ #1 entry.max$ substring$ |
| 344 |
#1 global.max$ substring$ |
| 345 |
} |
| 346 |
FUNCTION {format.sortify.clip} |
| 347 |
{ % duplicate$ "sinful" debugval %$ |
| 348 |
purify$ %$ |
| 349 |
"l" change.case$ %$ |
| 350 |
format.clip |
| 351 |
} |
| 352 |
FUNCTION {check.empty} |
| 353 |
{ 't := |
| 354 |
duplicate$ empty$ |
| 355 |
{ "empty " t * " in " * cite$ * warning$ |
| 356 |
} |
| 357 |
'skip$ %$ |
| 358 |
if$ %$ |
| 359 |
} |
| 360 |
FUNCTION {multipage.p} |
| 361 |
{ pages 't := |
| 362 |
#0 'j := |
| 363 |
% WHILE |
| 364 |
{ j not |
| 365 |
t empty$ not %$ |
| 366 |
and |
| 367 |
} |
| 368 |
{ t #1 #1 substring$ %$ |
| 369 |
duplicate$ hyphen = %$ |
| 370 |
swap$ duplicate$ comma = |
| 371 |
swap$ "+" = %$ |
| 372 |
or |
| 373 |
or |
| 374 |
{ #1 'j := |
| 375 |
} |
| 376 |
{ t #2 global.max$ substring$ 't := |
| 377 |
} |
| 378 |
if$ |
| 379 |
} |
| 380 |
while$ |
| 381 |
j |
| 382 |
} |
| 383 |
FUNCTION {format.n.dashify} |
| 384 |
{ 't := |
| 385 |
"" |
| 386 |
% WHILE |
| 387 |
{ t empty$ not } %$ |
| 388 |
{ t #1 #1 substring$ hyphen = %$ |
| 389 |
{ t #1 #2 substring$ "--" = not %$ |
| 390 |
{ "--" * |
| 391 |
t #2 global.max$ substring$ 't := |
| 392 |
} |
| 393 |
{ % WHILE |
| 394 |
{ t #1 #1 substring$ hyphen = } %$ |
| 395 |
{ hyphen * |
| 396 |
t #2 global.max$ substring$ 't := |
| 397 |
} |
| 398 |
while$ %$ |
| 399 |
} |
| 400 |
if$ %$ |
| 401 |
} |
| 402 |
{ t #1 #1 substring$ * %$ |
| 403 |
t #2 global.max$ substring$ 't := |
| 404 |
} |
| 405 |
if$ %$ |
| 406 |
} |
| 407 |
while$ %$ |
| 408 |
} |
| 409 |
FUNCTION {tie.or.space.connect} |
| 410 |
{ duplicate$ text.length$ #5 < |
| 411 |
{ tie |
| 412 |
} |
| 413 |
{ space |
| 414 |
} |
| 415 |
if$ |
| 416 |
swap$ * * |
| 417 |
} |
| 418 |
FUNCTION {either.or.check} |
| 419 |
{ empty$ |
| 420 |
'pop$ |
| 421 |
{ "can't use both " swap$ * " fields in " * cite$ * warning$ |
| 422 |
} |
| 423 |
if$ |
| 424 |
} |
| 425 |
FUNCTION {start.a.q} |
| 426 |
{ #-1 'j := |
| 427 |
"" |
| 428 |
} |
| 429 |
FUNCTION {inc.j} |
| 430 |
{ j #1 + 'j := |
| 431 |
} |
| 432 |
|
| 433 |
FUNCTION {key.q} |
| 434 |
{ duplicate$ empty$ |
| 435 |
{ pop$ %$ |
| 436 |
key field.or.null |
| 437 |
inc.j |
| 438 |
} |
| 439 |
'skip$ %$ |
| 440 |
if$ %$ |
| 441 |
} |
| 442 |
|
| 443 |
FUNCTION {organization.q} |
| 444 |
{ duplicate$ empty$ |
| 445 |
{ pop$ %$ |
| 446 |
organization field.or.null |
| 447 |
inc.j |
| 448 |
} |
| 449 |
'skip$ %$ |
| 450 |
if$ %$ |
| 451 |
} |
| 452 |
|
| 453 |
FUNCTION {editor.q} |
| 454 |
{ duplicate$ empty$ |
| 455 |
{ pop$ %$ |
| 456 |
editor field.or.null |
| 457 |
inc.j |
| 458 |
} |
| 459 |
'skip$ %$ |
| 460 |
if$ %$ |
| 461 |
} |
| 462 |
|
| 463 |
FUNCTION {author.q} |
| 464 |
{ duplicate$ empty$ |
| 465 |
{ pop$ %$ |
| 466 |
author field.or.null |
| 467 |
inc.j |
| 468 |
} |
| 469 |
'skip$ %$ |
| 470 |
if$ %$ |
| 471 |
} |
| 472 |
|
| 473 |
FUNCTION {blank.q} |
| 474 |
{ duplicate$ empty$ |
| 475 |
'inc.j |
| 476 |
'skip$ %$ |
| 477 |
if$ %$ |
| 478 |
} |
| 479 |
FUNCTION {check.q} |
| 480 |
{ 't := |
| 481 |
duplicate$ empty$ |
| 482 |
{ pop$ %$ |
| 483 |
cite$ format.clip 'u := %$ |
| 484 |
"Need " t * " in " * cite$ * "; using: " * u * warning$ |
| 485 |
u |
| 486 |
inc.j |
| 487 |
} |
| 488 |
'skip$ %$ |
| 489 |
if$ %$ |
| 490 |
} |
| 491 |
FUNCTION {format.names.for.label} |
| 492 |
{ 's := |
| 493 |
s num.names$ 'numnames := %$ |
| 494 |
s #1 "{vv~}{ll}" format.name$ %$ |
| 495 |
s numnames "{ff}{vv}{ll}{jj}" format.name$ "others" = %$ |
| 496 |
numnames #3 > |
| 497 |
or |
| 498 |
% more than 3 names, or final name is "others" |
| 499 |
{ etal * |
| 500 |
} |
| 501 |
{ numnames #1 - 'namesleft := |
| 502 |
#2 'nameptr := |
| 503 |
{ namesleft #0 > } |
| 504 |
{ nameptr numnames = |
| 505 |
% we're on the final name (and it's not "others") |
| 506 |
{ numnames #2 > |
| 507 |
{ comma * |
| 508 |
} |
| 509 |
'skip$ %$ |
| 510 |
if$ %$ |
| 511 |
" and " * s nameptr "{vv~}{ll}" format.name$ * %$ |
| 512 |
} |
| 513 |
% we're not on the final name (in this case: 2d of 3 names) |
| 514 |
{ comma * space * |
| 515 |
s nameptr "{vv~}{ll}" format.name$ * %$ |
| 516 |
} |
| 517 |
if$ %$ |
| 518 |
nameptr #1 + 'nameptr := |
| 519 |
namesleft #1 - 'namesleft := |
| 520 |
} |
| 521 |
while$ %$ |
| 522 |
} |
| 523 |
if$ %$ |
| 524 |
} |
| 525 |
FUNCTION {format.names.lastfirst} |
| 526 |
{ 's := |
| 527 |
s num.names$ 'numnames := % numnames = num.name$(s); |
| 528 |
numnames 'namesleft := |
| 529 |
#1 'nameptr := % nameptr = 1; |
| 530 |
% WHILE |
| 531 |
{ namesleft #0 > } |
| 532 |
{ nameptr #1 = |
| 533 |
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ %$ |
| 534 |
} |
| 535 |
{ comma * |
| 536 |
s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := %$ |
| 537 |
nameptr numnames = |
| 538 |
% final name |
| 539 |
{ t "others" = |
| 540 |
{ etal * |
| 541 |
} |
| 542 |
{ " and " * t * |
| 543 |
} |
| 544 |
if$ %$ |
| 545 |
} |
| 546 |
% names both precede and follow this name |
| 547 |
{ space * t * |
| 548 |
} |
| 549 |
if$ %$ |
| 550 |
} |
| 551 |
if$ %$ |
| 552 |
nameptr #1 + 'nameptr := % nameptr += 1; |
| 553 |
namesleft #1 - 'namesleft := % namesleft =- 1; |
| 554 |
} |
| 555 |
while$ %$ |
| 556 |
} |
| 557 |
FUNCTION {format.names.firstfirst} |
| 558 |
{ 's := |
| 559 |
s num.names$ 'numnames := % numnames = num.name$(s); |
| 560 |
numnames 'namesleft := |
| 561 |
#1 'nameptr := % nameptr = 1; |
| 562 |
% WHILE |
| 563 |
{ namesleft #0 > } |
| 564 |
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := %$ |
| 565 |
nameptr #1 = |
| 566 |
't |
| 567 |
{ nameptr numnames = |
| 568 |
% final name |
| 569 |
{ numnames #2 > |
| 570 |
{ comma * |
| 571 |
} |
| 572 |
'skip$ %$ |
| 573 |
if$ %$ |
| 574 |
t "others" = |
| 575 |
{ etal * |
| 576 |
} |
| 577 |
{ " and " * t * |
| 578 |
} |
| 579 |
if$ %$ |
| 580 |
} |
| 581 |
% names both precede and follow this name |
| 582 |
{ comma * space * t * |
| 583 |
} |
| 584 |
if$ %$ |
| 585 |
} |
| 586 |
if$ %$ |
| 587 |
nameptr #1 + 'nameptr := % nameptr += 1; |
| 588 |
namesleft #1 - 'namesleft := % namesleft =- 1; |
| 589 |
} |
| 590 |
while$ %$ |
| 591 |
} |
| 592 |
FUNCTION {make.annotation} |
| 593 |
{ annotation empty$ %$ |
| 594 |
{ "" |
| 595 |
} |
| 596 |
{ "\begin{SCannotation}" |
| 597 |
annotation * |
| 598 |
"\end{SCannotation}" * |
| 599 |
} |
| 600 |
if$ %$ |
| 601 |
} |
| 602 |
FUNCTION {make.edition} |
| 603 |
{ edition empty$ %$ |
| 604 |
{ seriesedition empty$ not series field.or.null title field.or.null = and %$ |
| 605 |
{ seriesedition |
| 606 |
} |
| 607 |
{ "" |
| 608 |
} |
| 609 |
if$ %$ |
| 610 |
} |
| 611 |
{ edition |
| 612 |
} |
| 613 |
if$ %$ |
| 614 |
} |
| 615 |
FUNCTION {make.year.month} |
| 616 |
{ year empty$ %$ |
| 617 |
{ "" |
| 618 |
} |
| 619 |
{ year year.label.tag * |
| 620 |
month empty$ %$ |
| 621 |
'skip$ %$ |
| 622 |
{ comma * space * month * |
| 623 |
} |
| 624 |
if$ %$ |
| 625 |
} |
| 626 |
if$ %$ |
| 627 |
} |
| 628 |
FUNCTION {make.year.nomonth} |
| 629 |
{ year empty$ %$ |
| 630 |
{ "" |
| 631 |
} |
| 632 |
{ year year.label.tag * |
| 633 |
} |
| 634 |
if$ %$ |
| 635 |
} |
| 636 |
FUNCTION {make.year.or.oyear.month} |
| 637 |
{ oyear empty$ %$ |
| 638 |
{ make.year.month |
| 639 |
} |
| 640 |
{ year empty$ %$ |
| 641 |
{ "oyear without year in " cite$ * warning$ |
| 642 |
} |
| 643 |
'skip$ %$ |
| 644 |
if$ %$ |
| 645 |
oyear year.label.tag * |
| 646 |
month empty$ %$ |
| 647 |
'skip$ %$ |
| 648 |
{ comma * space * month * |
| 649 |
} |
| 650 |
if$ %$ |
| 651 |
} |
| 652 |
if$ %$ |
| 653 |
} |
| 654 |
FUNCTION {make.leaditem.with.tags} |
| 655 |
{ leaditem |
| 656 |
principal-type editor.ptype = |
| 657 |
{ editor num.names$ #1 > %$ |
| 658 |
{ ",~eds." * |
| 659 |
} |
| 660 |
{ ",~ed." * |
| 661 |
} |
| 662 |
if$ %$ |
| 663 |
} |
| 664 |
'skip$ %$ |
| 665 |
if$ %$ |
| 666 |
} |
| 667 |
FUNCTION {make.editors.secondary} |
| 668 |
{ editor empty$ %$ |
| 669 |
{ "" |
| 670 |
} |
| 671 |
{ output.state after.sentence = |
| 672 |
output.state after.block = or |
| 673 |
{ "E" |
| 674 |
} |
| 675 |
{ "e" |
| 676 |
} |
| 677 |
if$ %$ |
| 678 |
"dited by " * editor format.names.firstfirst * |
| 679 |
} |
| 680 |
if$ %$ |
| 681 |
} |
| 682 |
FUNCTION {make.bookauthors.secondary} |
| 683 |
{ bookauthor empty$ %$ |
| 684 |
{ "" |
| 685 |
} |
| 686 |
{ output.state after.sentence = |
| 687 |
output.state after.block = |
| 688 |
or |
| 689 |
{ "B" |
| 690 |
} |
| 691 |
{ "b" |
| 692 |
} |
| 693 |
if$ %$ |
| 694 |
"y " * bookauthor format.names.firstfirst * |
| 695 |
} |
| 696 |
if$ %$ |
| 697 |
} |
| 698 |
FUNCTION {make.translators} |
| 699 |
{ translator empty$ %$ |
| 700 |
{ "" |
| 701 |
} |
| 702 |
{ output.state after.sentence = |
| 703 |
output.state after.block = |
| 704 |
or |
| 705 |
{ "T" |
| 706 |
} |
| 707 |
{ "t" |
| 708 |
} |
| 709 |
if$ %$ |
| 710 |
"ranslated " * |
| 711 |
flanguage empty$ %$ |
| 712 |
'skip$ %$ |
| 713 |
{ "from the " * flanguage * space * |
| 714 |
} |
| 715 |
if$ %$ |
| 716 |
"by " * translator format.names.firstfirst * |
| 717 |
} |
| 718 |
if$ %$ |
| 719 |
} |
| 720 |
|
| 721 |
FUNCTION {make.illustrators} |
| 722 |
{ illustrator empty$ %$ |
| 723 |
{ "" |
| 724 |
} |
| 725 |
{ output.state after.sentence = |
| 726 |
output.state after.block = |
| 727 |
or |
| 728 |
{ "I" |
| 729 |
} |
| 730 |
{ "i" |
| 731 |
} |
| 732 |
if$ %$ |
| 733 |
"llustrated by " * illustrator format.names.firstfirst * |
| 734 |
} |
| 735 |
if$ %$ |
| 736 |
} |
| 737 |
FUNCTION {make.title.ital} |
| 738 |
{ title field.or.null italicize |
| 739 |
} |
| 740 |
|
| 741 |
FUNCTION {make.booktitle.ital} |
| 742 |
{ booktitle field.or.null italicize |
| 743 |
} |
| 744 |
|
| 745 |
FUNCTION {make.as.ftitle.ital} |
| 746 |
{ ftitle empty$ %$ |
| 747 |
{ "" |
| 748 |
} |
| 749 |
{ "as " ftitle italicize * |
| 750 |
} |
| 751 |
if$ %$ |
| 752 |
} |
| 753 |
FUNCTION {make.title.inquotes} |
| 754 |
{ title empty$ %$ |
| 755 |
{ "" |
| 756 |
} |
| 757 |
{ |
| 758 |
"\Wrapquotes{" title * "}" * |
| 759 |
} |
| 760 |
if$ %$ |
| 761 |
} |
| 762 |
FUNCTION {make.pages} |
| 763 |
{ pages empty$ %$ |
| 764 |
{ "" |
| 765 |
} |
| 766 |
{ pages format.n.dashify |
| 767 |
} |
| 768 |
if$ %$ |
| 769 |
} |
| 770 |
FUNCTION {make.vol.series.num.month.pages} |
| 771 |
{ volume empty$ %$ |
| 772 |
{ series empty$ %$ |
| 773 |
{ number empty$ %$ |
| 774 |
{ month empty$ %$ |
| 775 |
{ pages empty$ %$ |
| 776 |
% none of VSNMP |
| 777 |
{ space 'u := |
| 778 |
"" |
| 779 |
} |
| 780 |
% P |
| 781 |
{ comma 'u := |
| 782 |
multipage.p |
| 783 |
{ "pp." pages format.n.dashify |
| 784 |
} |
| 785 |
{ "p." pages |
| 786 |
} |
| 787 |
if$ %$ |
| 788 |
tie.or.space.connect |
| 789 |
} |
| 790 |
if$ %$ |
| 791 |
} |
| 792 |
{ pages empty$ %$ |
| 793 |
% M |
| 794 |
{ comma 'u := |
| 795 |
month |
| 796 |
} |
| 797 |
% MP |
| 798 |
{ comma 'u := |
| 799 |
month comma * space * make.pages * |
| 800 |
} |
| 801 |
if$ %$ |
| 802 |
} |
| 803 |
if$ %$ |
| 804 |
} |
| 805 |
{ month empty$ %$ |
| 806 |
{ pages empty$ %$ |
| 807 |
% N |
| 808 |
{ comma 'u := |
| 809 |
"no." number tie.or.space.connect |
| 810 |
} |
| 811 |
% NP |
| 812 |
{ comma 'u := |
| 813 |
"no." number colon * make.pages * tie.or.space.connect |
| 814 |
} |
| 815 |
if$ %$ |
| 816 |
} |
| 817 |
{ pages empty$ %$ |
| 818 |
% NM |
| 819 |
{ comma 'u := |
| 820 |
"no." number tie.or.space.connect |
| 821 |
space * month parenthesize * |
| 822 |
} |
| 823 |
% NMP |
| 824 |
{ comma 'u := |
| 825 |
"no." number tie.or.space.connect |
| 826 |
space * month parenthesize * |
| 827 |
colon * space * make.pages * |
| 828 |
} |
| 829 |
if$ %$ |
| 830 |
} |
| 831 |
if$ %$ |
| 832 |
} |
| 833 |
if$ %$ |
| 834 |
} |
| 835 |
{ number empty$ %$ |
| 836 |
{ month empty$ %$ |
| 837 |
{ pages empty$ %$ |
| 838 |
% S |
| 839 |
{ |
| 840 |
} |
| 841 |
% SP |
| 842 |
{ |
| 843 |
} |
| 844 |
if$ %$ |
| 845 |
} |
| 846 |
{ pages empty$ %$ |
| 847 |
% SM |
| 848 |
{ |
| 849 |
} |
| 850 |
% SMP |
| 851 |
{ |
| 852 |
} |
| 853 |
if$ %$ |
| 854 |
} |
| 855 |
if$ %$ |
| 856 |
} |
| 857 |
{ month empty$ %$ |
| 858 |
{ pages empty$ %$ |
| 859 |
% SN |
| 860 |
{ |
| 861 |
} |
| 862 |
% SNP |
| 863 |
{ |
| 864 |
} |
| 865 |
if$ %$ |
| 866 |
} |
| 867 |
{ pages empty$ %$ |
| 868 |
% SNP |
| 869 |
{ |
| 870 |
} |
| 871 |
% SNMP |
| 872 |
{ |
| 873 |
} |
| 874 |
if$ %$ |
| 875 |
} |
| 876 |
if$ %$ |
| 877 |
} |
| 878 |
if$ %$ |
| 879 |
} |
| 880 |
if$ %$ |
| 881 |
} |
| 882 |
{ series empty$ %$ |
| 883 |
{ number empty$ %$ |
| 884 |
{ month empty$ %$ |
| 885 |
{ pages empty$ %$ |
| 886 |
% V |
| 887 |
{ comma 'u := |
| 888 |
"vol." volume tie.or.space.connect |
| 889 |
} |
| 890 |
% VP |
| 891 |
{ space 'u := |
| 892 |
volume colon * make.pages * |
| 893 |
} |
| 894 |
if$ %$ |
| 895 |
} |
| 896 |
{ pages empty$ %$ |
| 897 |
% VM |
| 898 |
{ comma 'u := |
| 899 |
"vol." volume tie.or.space.connect |
| 900 |
space * month parenthesize * |
| 901 |
} |
| 902 |
% VMP |
| 903 |
{ space 'u := |
| 904 |
volume space * |
| 905 |
month parenthesize * colon * space * make.pages * |
| 906 |
} |
| 907 |
if$ %$ |
| 908 |
} |
| 909 |
if$ %$ |
| 910 |
} |
| 911 |
{ month empty$ %$ |
| 912 |
{ pages empty$ %$ |
| 913 |
% VN |
| 914 |
{ space 'u := |
| 915 |
volume ", no." number tie.or.space.connect * |
| 916 |
} |
| 917 |
% VNP |
| 918 |
{ space 'u := |
| 919 |
volume space * |
| 920 |
number parenthesize * colon * space * make.pages * |
| 921 |
} |
| 922 |
if$ %$ |
| 923 |
} |
| 924 |
{ pages empty$ %$ |
| 925 |
% VNM |
| 926 |
{ space 'u := |
| 927 |
volume ", no." number tie.or.space.connect * |
| 928 |
space * month parenthesize * |
| 929 |
} |
| 930 |
% VNMP |
| 931 |
{ space 'u := |
| 932 |
volume space * number parenthesize * colon * space * |
| 933 |
make.pages * space * month parenthesize * |
| 934 |
} |
| 935 |
if$ %$ |
| 936 |
} |
| 937 |
if$ %$ |
| 938 |
} |
| 939 |
if$ %$ |
| 940 |
} |
| 941 |
{ number empty$ %$ |
| 942 |
{ month empty$ %$ |
| 943 |
{ pages empty$ %$ |
| 944 |
% VS |
| 945 |
{ |
| 946 |
} |
| 947 |
% VSP |
| 948 |
{ |
| 949 |
} |
| 950 |
if$ %$ |
| 951 |
} |
| 952 |
{ pages empty$ %$ |
| 953 |
% VSM |
| 954 |
{ |
| 955 |
} |
| 956 |
% VSMP |
| 957 |
{ |
| 958 |
} |
| 959 |
if$ %$ |
| 960 |
} |
| 961 |
if$ %$ |
| 962 |
} |
| 963 |
{ month empty$ %$ |
| 964 |
{ pages empty$ %$ |
| 965 |
% VSN |
| 966 |
{ |
| 967 |
} |
| 968 |
% VSNP |
| 969 |
{ |
| 970 |
} |
| 971 |
if$ %$ |
| 972 |
} |
| 973 |
{ pages empty$ %$ |
| 974 |
% VSNM |
| 975 |
{ |
| 976 |
} |
| 977 |
% VSNMP |
| 978 |
{ |
| 979 |
} |
| 980 |
if$ %$ |
| 981 |
} |
| 982 |
if$ %$ |
| 983 |
} |
| 984 |
if$ %$ |
| 985 |
} |
| 986 |
if$ %$ |
| 987 |
} |
| 988 |
if$ %$ |
| 989 |
} |
| 990 |
FUNCTION {make.crossref} |
| 991 |
{ "\citeNP{" crossref * "}" * |
| 992 |
} |
| 993 |
FUNCTION {output.series.number} |
| 994 |
{ series empty$ %$ |
| 995 |
{ number empty$ %$ |
| 996 |
{ "" |
| 997 |
} |
| 998 |
{ "Can't use `number' without `series' in " cite$ * warning$ |
| 999 |
"" |
| 1000 |
} |
| 1001 |
if$ %$ |
| 1002 |
} |
| 1003 |
{ number empty$ %$ |
| 1004 |
{ series |
| 1005 |
seriesedition empty$ %$ |
| 1006 |
'skip$ %$ |
| 1007 |
{ comma output |
| 1008 |
new.block |
| 1009 |
seriesedition |
| 1010 |
} |
| 1011 |
if$ %$ |
| 1012 |
} |
| 1013 |
{ series space * |
| 1014 |
"no." * |
| 1015 |
number tie.or.space.connect |
| 1016 |
"number and seriesedition" seriesedition either.or.check |
| 1017 |
} |
| 1018 |
if$ %$ |
| 1019 |
} |
| 1020 |
if$ %$ |
| 1021 |
comma output |
| 1022 |
} |
| 1023 |
FUNCTION {output.volume.series} |
| 1024 |
{ volume empty$ %$ |
| 1025 |
{ "" |
| 1026 |
} |
| 1027 |
{ "Volume" volume tie.or.space.connect |
| 1028 |
series empty$ %$ |
| 1029 |
'skip$ %$ |
| 1030 |
{ " of " * series italicize * |
| 1031 |
seriesedition empty$ %$ |
| 1032 |
'skip$ %$ |
| 1033 |
{ comma output |
| 1034 |
new.block |
| 1035 |
seriesedition |
| 1036 |
} |
| 1037 |
if$ %$ |
| 1038 |
} |
| 1039 |
if$ %$ |
| 1040 |
"volume and number" number either.or.check |
| 1041 |
} |
| 1042 |
if$ %$ |
| 1043 |
comma output |
| 1044 |
} |
| 1045 |
FUNCTION {make.chapter.of} |
| 1046 |
{ chapter empty$ %$ |
| 1047 |
{ "" |
| 1048 |
} |
| 1049 |
{ type empty$ %$ |
| 1050 |
{ "Chapter" |
| 1051 |
} |
| 1052 |
{ type "t" change.case$ %$ |
| 1053 |
} |
| 1054 |
if$ %$ |
| 1055 |
chapter tie.or.space.connect |
| 1056 |
" of " * |
| 1057 |
} |
| 1058 |
if$ %$ |
| 1059 |
} |
| 1060 |
FUNCTION {make.chapter} |
| 1061 |
{ chapter empty$ %$ |
| 1062 |
{ "" |
| 1063 |
} |
| 1064 |
{ type empty$ %$ |
| 1065 |
{ "Chapter" |
| 1066 |
} |
| 1067 |
{ type "t" change.case$ %$ |
| 1068 |
} |
| 1069 |
if$ %$ |
| 1070 |
chapter tie.or.space.connect |
| 1071 |
} |
| 1072 |
if$ %$ |
| 1073 |
} |
| 1074 |
FUNCTION {make.number.tr} |
| 1075 |
{ type empty$ %$ |
| 1076 |
{ "Technical Report" |
| 1077 |
} |
| 1078 |
{ type "t" change.case$ %$ |
| 1079 |
} |
| 1080 |
if$ %$ |
| 1081 |
number empty$ %$ |
| 1082 |
'skip$ %$ |
| 1083 |
{ number tie.or.space.connect |
| 1084 |
} |
| 1085 |
if$ %$ |
| 1086 |
} |
| 1087 |
%% |
| 1088 |
%% FIX: new idea, start using it |
| 1089 |
FUNCTION {set.principal-field.principal-type} |
| 1090 |
{ type$ "book" = %$ |
| 1091 |
type$ "inbook" = %$ |
| 1092 |
or |
| 1093 |
{ start.a.q |
| 1094 |
author.q |
| 1095 |
editor.q |
| 1096 |
blank.q |
| 1097 |
key.q |
| 1098 |
"author, editor, or key for entry type " type$ * check.q %$ |
| 1099 |
} |
| 1100 |
{ type$ "proceedings" = %$ |
| 1101 |
{ start.a.q |
| 1102 |
blank.q |
| 1103 |
editor.q |
| 1104 |
organization.q |
| 1105 |
key.q |
| 1106 |
"editor, organization, or key for entry type " type$ * check.q %$ |
| 1107 |
} |
| 1108 |
{ type$ "manual" = %$ |
| 1109 |
{ start.a.q |
| 1110 |
author.q |
| 1111 |
blank.q |
| 1112 |
organization.q |
| 1113 |
key.q |
| 1114 |
"author, organization, or key for entry type " type$ * check.q %$ |
| 1115 |
} |
| 1116 |
% for all other entry types |
| 1117 |
{ start.a.q |
| 1118 |
author.q |
| 1119 |
blank.q |
| 1120 |
blank.q |
| 1121 |
key.q |
| 1122 |
"author or key for entry type " type$ * check.q %$ |
| 1123 |
} |
| 1124 |
if$ %$ |
| 1125 |
} |
| 1126 |
if$ %$ |
| 1127 |
} |
| 1128 |
if$ %$ |
| 1129 |
'principal-field := |
| 1130 |
j 'principal-type := |
| 1131 |
} |
| 1132 |
|
| 1133 |
FUNCTION {key.special.p} |
| 1134 |
{ type$ "manual" = %$ |
| 1135 |
type$ "proceedings" = %$ |
| 1136 |
or |
| 1137 |
principal-type organization.ptype = |
| 1138 |
and |
| 1139 |
key empty$ not %$ |
| 1140 |
and |
| 1141 |
} |
| 1142 |
|
| 1143 |
FUNCTION {make.leaditem} |
| 1144 |
{ key.special.p |
| 1145 |
% is \field{key} all-caps? |
| 1146 |
{ key duplicate$ "u" change.case$ = |
| 1147 |
% if so, key is assumed to be an acronym FIX; should I warn what we're doing? |
| 1148 |
{ key " (" * organization * ")" * |
| 1149 |
} |
| 1150 |
% if not, key is assumed to be an initial prefix (abbreviation) of organization |
| 1151 |
% for use only in the label |
| 1152 |
{ organization |
| 1153 |
} |
| 1154 |
if$ %$ |
| 1155 |
} |
| 1156 |
{ principal-field |
| 1157 |
principal-type author.ptype = |
| 1158 |
principal-type editor.ptype = |
| 1159 |
or |
| 1160 |
{ format.names.lastfirst |
| 1161 |
} |
| 1162 |
'skip$ %$ |
| 1163 |
if$ %$ |
| 1164 |
} |
| 1165 |
if$ %$ |
| 1166 |
} |
| 1167 |
|
| 1168 |
FUNCTION {make.label.from.principal-field} |
| 1169 |
{ principal-field |
| 1170 |
principal-type author.ptype = |
| 1171 |
principal-type editor.ptype = |
| 1172 |
or |
| 1173 |
{ format.names.for.label |
| 1174 |
} |
| 1175 |
% organization, key, or emergency |
| 1176 |
'skip$ %$ |
| 1177 |
if$ %$ |
| 1178 |
} |
| 1179 |
|
| 1180 |
FUNCTION {make.label} |
| 1181 |
{ key.special.p |
| 1182 |
{ key |
| 1183 |
} |
| 1184 |
{ make.label.from.principal-field |
| 1185 |
} |
| 1186 |
if$ %$ |
| 1187 |
} |
| 1188 |
|
| 1189 |
|
| 1190 |
FUNCTION {length} |
| 1191 |
{ 'u := |
| 1192 |
#0 'len := |
| 1193 |
% WHILE |
| 1194 |
{ u "" = not } |
| 1195 |
{ len #1 + 'len := |
| 1196 |
u #2 global.max$ substring$ 'u := |
| 1197 |
} |
| 1198 |
while$ %$ |
| 1199 |
len |
| 1200 |
} |
| 1201 |
|
| 1202 |
|
| 1203 |
FUNCTION {head} |
| 1204 |
{ 'w := |
| 1205 |
w #1 #1 substring$ %$ |
| 1206 |
duplicate$ "{" = %$ |
| 1207 |
{ w #2 #1 substring$ "\" = %$ |
| 1208 |
{ pop$ %$ |
| 1209 |
w #1 text.prefix$ %$ |
| 1210 |
} |
| 1211 |
'skip$ %$ |
| 1212 |
if$ %$ |
| 1213 |
} |
| 1214 |
'skip$ %$ |
| 1215 |
if$ %$ |
| 1216 |
} |
| 1217 |
|
| 1218 |
|
| 1219 |
FUNCTION {behead} |
| 1220 |
{ 'u := |
| 1221 |
u |
| 1222 |
u head length #1 + |
| 1223 |
global.max$ %$ |
| 1224 |
substring$ %$ |
| 1225 |
} |
| 1226 |
|
| 1227 |
FUNCTION {behead.t} |
| 1228 |
{ t behead 't := |
| 1229 |
} |
| 1230 |
|
| 1231 |
FUNCTION {format.dehyphen} |
| 1232 |
{ 't := |
| 1233 |
"" |
| 1234 |
% WHILE |
| 1235 |
{ t "" = not } |
| 1236 |
{ t head |
| 1237 |
duplicate$ hyphen = %$ |
| 1238 |
{ pop$ %$ |
| 1239 |
} |
| 1240 |
{ * |
| 1241 |
} |
| 1242 |
if$ %$ |
| 1243 |
behead.t |
| 1244 |
} |
| 1245 |
while$ %$ |
| 1246 |
} |
| 1247 |
|
| 1248 |
|
| 1249 |
|
| 1250 |
|
| 1251 |
FUNCTION {format.dehyphen.dewhitespace} |
| 1252 |
{ 't := |
| 1253 |
"" |
| 1254 |
% WHILE |
| 1255 |
{ t "" = not } |
| 1256 |
{ t head |
| 1257 |
duplicate$ %$ |
| 1258 |
duplicate$ hyphen = %$ |
| 1259 |
swap$ empty$ |
| 1260 |
or |
| 1261 |
{ pop$ %$ |
| 1262 |
} |
| 1263 |
{ * |
| 1264 |
} |
| 1265 |
if$ %$ |
| 1266 |
behead.t |
| 1267 |
} |
| 1268 |
while$ %$ |
| 1269 |
} |
| 1270 |
|
| 1271 |
FUNCTION {format.names.for.sort} |
| 1272 |
{ 's := |
| 1273 |
#1 'nameptr := |
| 1274 |
s num.names$ 'numnames := %$ |
| 1275 |
numnames 'namesleft := |
| 1276 |
% WHILE |
| 1277 |
{ namesleft #0 > } |
| 1278 |
{ |
| 1279 |
% NOTE: order or name-parts ought to follow that used for leaditem |
| 1280 |
% word-by-word alphabetization: |
| 1281 |
% letter-by-letter alphabetization, no attention to initials: |
| 1282 |
|
| 1283 |
% letter-by-letter alphabetization, with first initials exception: |
| 1284 |
|
| 1285 |
s nameptr "{vv{}}{ll{}}{ jj{}}" format.name$ %$ |
| 1286 |
|
| 1287 |
% Each first-name token of the form of an initial ("L.") will be followed by a |
| 1288 |
% space but other spaces will be removed. |
| 1289 |
|
| 1290 |
% Algorithm: step through looking for space, which terminates name tokens, |
| 1291 |
% adding non-spaces to an accumulator on the stack as we go. |
| 1292 |
% When we find a space, look at the accumulator (a whole name token). |
| 1293 |
% If it's length is 2 and 2d char is a period, we've got an initial, so |
| 1294 |
% add the space to the accumulator. If not, throw away the space |
| 1295 |
% and step on looking for another name. |
| 1296 |
|
| 1297 |
% FIX: would it be simpler to replace periods with spaces? |
| 1298 |
% would a period ever appear in a first-name when not an initial? |
| 1299 |
% Rev.? Col.? These should be alphabetized as spelled out, prob. |
| 1300 |
% but need to check \manual |
| 1301 |
|
| 1302 |
|
| 1303 |
s nameptr "{ff{ } }" format.name$ 't := %$ |
| 1304 |
% t is "F1 F2 F3 ... FN " or empty |
| 1305 |
|
| 1306 |
|
| 1307 |
t empty$ %$ |
| 1308 |
'skip$ %$ |
| 1309 |
{ delimiter.name-part * |
| 1310 |
"" % accumulator |
| 1311 |
% WHILE |
| 1312 |
{ t "" = not } |
| 1313 |
{ t head |
| 1314 |
duplicate$ empty$ |
| 1315 |
% last char will always be a space |
| 1316 |
% accumulator contains whole name token |
| 1317 |
{ pop$ %$ throw space away for now; top of stack is now accumulator |
| 1318 |
duplicate$ %$ |
| 1319 |
duplicate$ text.length$ #2 = % 2 chars long |
| 1320 |
swap$ behead head period = %$ 2d char is period |
| 1321 |
and |
| 1322 |
% name token in accumulator is an initial, so add a space to it |
| 1323 |
{ space * |
| 1324 |
} |
| 1325 |
% name token in accumulator is not an initial |
| 1326 |
'skip$ %$ |
| 1327 |
if$ %$ |
| 1328 |
% in either case, concatenate the accumulator the name on the |
| 1329 |
% stack and initialize it again |
| 1330 |
* "" |
| 1331 |
} |
| 1332 |
% accumulator contains partial name token |
| 1333 |
% add t's head (not a space) to accumulator |
| 1334 |
{ * |
| 1335 |
} |
| 1336 |
if$ %$ |
| 1337 |
behead.t |
| 1338 |
} |
| 1339 |
while$ %$ |
| 1340 |
% we always end up with an empty string on the stack |
| 1341 |
pop$ %$ |
| 1342 |
} |
| 1343 |
if$ %$ |
| 1344 |
|
| 1345 |
format.dehyphen |
| 1346 |
't := |
| 1347 |
% t now contains one name of a namelist |
| 1348 |
nameptr #1 = |
| 1349 |
{ t |
| 1350 |
} |
| 1351 |
{ delimiter.name * |
| 1352 |
nameptr numnames = |
| 1353 |
t "others" = |
| 1354 |
and |
| 1355 |
{ "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" * |
| 1356 |
} |
| 1357 |
{ t * |
| 1358 |
} |
| 1359 |
if$ %$ |
| 1360 |
} |
| 1361 |
if$ %$ |
| 1362 |
nameptr #1 + 'nameptr := |
| 1363 |
namesleft #1 - 'namesleft := |
| 1364 |
} |
| 1365 |
while$ %$ |
| 1366 |
} |
| 1367 |
FUNCTION {make.principal-field.for.sort} % FIX: note: leaditem must already be set |
| 1368 |
{ principal-type author.ptype = |
| 1369 |
principal-type editor.ptype = |
| 1370 |
or |
| 1371 |
{ principal-field format.names.for.sort |
| 1372 |
} |
| 1373 |
{ principal-type emergency.ptype = |
| 1374 |
{ principal-field |
| 1375 |
} |
| 1376 |
% organization.ptype, key.ptype, including both key.special cases |
| 1377 |
% leaditem is the same as principal-field except in the key.special |
| 1378 |
% cases, when we do want the leaditem not the principal-field |
| 1379 |
{ leaditem |
| 1380 |
% letter-by-letter alphabetization: |
| 1381 |
format.dehyphen.dewhitespace |
| 1382 |
} |
| 1383 |
if$ %$ |
| 1384 |
} |
| 1385 |
if$ %$ |
| 1386 |
} |
| 1387 |
FUNCTION {begin.entry} |
| 1388 |
{ output.begin |
| 1389 |
output.bibitem |
| 1390 |
} |
| 1391 |
FUNCTION {finish.entry} |
| 1392 |
{ add.period$ %$ |
| 1393 |
output.end |
| 1394 |
newline$ %$ |
| 1395 |
make.annotation write$ %$ |
| 1396 |
} |
| 1397 |
FUNCTION {article} |
| 1398 |
{ begin.entry |
| 1399 |
make.leaditem.with.tags space output |
| 1400 |
new.block |
| 1401 |
make.year.nomonth "year" check.empty space output |
| 1402 |
new.block |
| 1403 |
make.title.inquotes "title" check.empty space output |
| 1404 |
new.block |
| 1405 |
crossref empty$ %$ |
| 1406 |
{ journal italicize "journal" check.empty space output |
| 1407 |
series empty$ %$ |
| 1408 |
'skip$ %$ |
| 1409 |
{ "Achicago can not yet handle nonempty series! in " cite$ * warning$ |
| 1410 |
} |
| 1411 |
if$ %$ |
| 1412 |
volume empty$ number empty$ month empty$ pages empty$ and and and |
| 1413 |
{ "empty volume, number, month, and pages in " cite$ * warning$ |
| 1414 |
} |
| 1415 |
'skip$ %$ |
| 1416 |
if$ %$ |
| 1417 |
make.vol.series.num.month.pages u output |
| 1418 |
} |
| 1419 |
{ "In " make.crossref * space output |
| 1420 |
make.pages "pages" check.empty comma output |
| 1421 |
} |
| 1422 |
if$ %$ |
| 1423 |
new.block |
| 1424 |
note space output |
| 1425 |
finish.entry |
| 1426 |
} |
| 1427 |
FUNCTION {book} |
| 1428 |
{ begin.entry |
| 1429 |
make.leaditem.with.tags comma output |
| 1430 |
new.block |
| 1431 |
make.year.or.oyear.month "year" check.empty comma output |
| 1432 |
new.block |
| 1433 |
make.title.ital "title" check.empty comma output |
| 1434 |
new.block |
| 1435 |
make.edition comma output |
| 1436 |
new.block |
| 1437 |
crossref empty$ %$ |
| 1438 |
{ volume empty$ %$ |
| 1439 |
{ output.series.number |
| 1440 |
} |
| 1441 |
{ output.volume.series |
| 1442 |
} |
| 1443 |
if$ %$ |
| 1444 |
editor empty$ author empty$ or |
| 1445 |
'skip$ %$ |
| 1446 |
{ new.block |
| 1447 |
make.editors.secondary comma output |
| 1448 |
} |
| 1449 |
if$ %$ |
| 1450 |
new.block |
| 1451 |
make.translators comma output |
| 1452 |
new.block |
| 1453 |
make.illustrators comma output |
| 1454 |
new.block |
| 1455 |
oyear empty$ %$ |
| 1456 |
{ address comma output |
| 1457 |
publisher "publisher" check.empty colon output |
| 1458 |
} |
| 1459 |
{ oaddress comma output |
| 1460 |
opublisher "opublisher" check.empty colon output |
| 1461 |
new.block |
| 1462 |
"Reprint" comma output |
| 1463 |
address field.or.null comma output |
| 1464 |
publisher "publisher" check.empty |
| 1465 |
address empty$ %$ |
| 1466 |
{ comma |
| 1467 |
} |
| 1468 |
{ colon |
| 1469 |
} |
| 1470 |
if$ %$ |
| 1471 |
output |
| 1472 |
year "year" check.empty comma output |
| 1473 |
} |
| 1474 |
if$ %$ |
| 1475 |
} |
| 1476 |
{ volume empty$ %$ |
| 1477 |
{ "In " |
| 1478 |
} |
| 1479 |
{ "Volume" volume tie.or.space.connect |
| 1480 |
" of " * |
| 1481 |
} |
| 1482 |
if$ %$ |
| 1483 |
make.crossref * comma output |
| 1484 |
} |
| 1485 |
if$ %$ |
| 1486 |
new.block |
| 1487 |
yearcomp empty$ %$ |
| 1488 |
'skip$ %$ |
| 1489 |
{ "Composed in " yearcomp * |
| 1490 |
comma output |
| 1491 |
new.block |
| 1492 |
} |
| 1493 |
if$ %$ |
| 1494 |
fyear empty$ |
| 1495 |
'skip$ |
| 1496 |
{ "First published " |
| 1497 |
translator empty$ flanguage empty$ not and |
| 1498 |
{ "in " * flanguage * space * |
| 1499 |
} |
| 1500 |
'skip$ |
| 1501 |
if$ |
| 1502 |
make.as.ftitle.ital * space output |
| 1503 |
faddress empty$ fpublisher empty$ not and |
| 1504 |
{ "by " |
| 1505 |
} |
| 1506 |
{ "in " |
| 1507 |
} |
| 1508 |
if$ %$ |
| 1509 |
space output |
| 1510 |
faddress space output |
| 1511 |
fpublisher |
| 1512 |
faddress empty$ %$ |
| 1513 |
{ space |
| 1514 |
} |
| 1515 |
{ colon |
| 1516 |
} |
| 1517 |
if$ %$ |
| 1518 |
output |
| 1519 |
fyear |
| 1520 |
faddress empty$ fpublisher empty$ and |
| 1521 |
{ space |
| 1522 |
} |
| 1523 |
{ comma |
| 1524 |
} |
| 1525 |
if$ output %$ |
| 1526 |
new.block |
| 1527 |
} |
| 1528 |
if$ %$ |
| 1529 |
note comma output |
| 1530 |
finish.entry |
| 1531 |
} |
| 1532 |
FUNCTION {inbook} |
| 1533 |
{ begin.entry |
| 1534 |
make.leaditem.with.tags comma output |
| 1535 |
new.block |
| 1536 |
make.year.or.oyear.month "year" check.empty comma output |
| 1537 |
new.block |
| 1538 |
crossref empty$ %$ |
| 1539 |
{ make.chapter.of |
| 1540 |
duplicate$ 'u := %$ |
| 1541 |
duplicate$ empty$ |
| 1542 |
{ pop$ %$ |
| 1543 |
pages empty$ %$ |
| 1544 |
{ "empty chapter, type, and pages in " cite$ * warning$ |
| 1545 |
"In " |
| 1546 |
} |
| 1547 |
{ "Pages " make.pages * " in " * |
| 1548 |
} |
| 1549 |
if$ %$ |
| 1550 |
} |
| 1551 |
'skip$ %$ |
| 1552 |
if$ %$ |
| 1553 |
comma output |
| 1554 |
make.title.ital "title" check.empty space output |
| 1555 |
make.bookauthors.secondary comma output |
| 1556 |
make.editors.secondary comma output |
| 1557 |
volume empty$ %$ |
| 1558 |
{ output.series.number |
| 1559 |
} |
| 1560 |
{ output.volume.series |
| 1561 |
} |
| 1562 |
if$ %$ |
| 1563 |
make.edition comma output |
| 1564 |
u empty$ %$ |
| 1565 |
'skip$ %$ |
| 1566 |
{ make.pages comma output |
| 1567 |
} |
| 1568 |
if$ %$ |
| 1569 |
new.block |
| 1570 |
make.translators comma output |
| 1571 |
new.block |
| 1572 |
make.illustrators comma output |
| 1573 |
new.block |
| 1574 |
oyear empty$ %$ |
| 1575 |
{ address comma output |
| 1576 |
publisher "publisher" check.empty colon output |
| 1577 |
} |
| 1578 |
{ oaddress comma output |
| 1579 |
opublisher "opublisher" check.empty colon output |
| 1580 |
new.block |
| 1581 |
"Reprint" comma output |
| 1582 |
address field.or.null comma output |
| 1583 |
publisher "publisher" check.empty |
| 1584 |
address empty$ %$ |
| 1585 |
{ comma |
| 1586 |
} |
| 1587 |
{ colon |
| 1588 |
} |
| 1589 |
if$ %$ |
| 1590 |
output |
| 1591 |
year "year" check.empty comma output |
| 1592 |
} |
| 1593 |
if$ %$ |
| 1594 |
} |
| 1595 |
% crossref not empty |
| 1596 |
{ "In " make.crossref * comma output |
| 1597 |
make.chapter comma output |
| 1598 |
make.pages comma output |
| 1599 |
chapter empty$ pages empty$ and |
| 1600 |
{ "empty chapter and pages in " cite$ * warning$ |
| 1601 |
} |
| 1602 |
'skip$ %$ |
| 1603 |
if$ %$ |
| 1604 |
} |
| 1605 |
if$ %$ |
| 1606 |
new.block |
| 1607 |
note comma output |
| 1608 |
finish.entry |
| 1609 |
} |
| 1610 |
FUNCTION {incollection} |
| 1611 |
{ begin.entry |
| 1612 |
make.leaditem.with.tags comma output |
| 1613 |
new.block |
| 1614 |
make.year.or.oyear.month "year" check.empty space output |
| 1615 |
new.block |
| 1616 |
make.title.inquotes "title" check.empty space output |
| 1617 |
new.block |
| 1618 |
crossref empty$ %$ |
| 1619 |
{ make.chapter.of duplicate$ empty$ |
| 1620 |
{ pop$ %$ |
| 1621 |
"In " |
| 1622 |
} |
| 1623 |
'skip$ %$ |
| 1624 |
if$ %$ |
| 1625 |
space output |
| 1626 |
make.booktitle.ital "booktitle" check.empty space output |
| 1627 |
make.bookauthors.secondary comma output |
| 1628 |
make.editors.secondary comma output |
| 1629 |
volume empty$ %$ |
| 1630 |
{ output.series.number |
| 1631 |
} |
| 1632 |
{ output.volume.series |
| 1633 |
} |
| 1634 |
if$ %$ |
| 1635 |
make.edition comma output |
| 1636 |
make.pages comma output |
| 1637 |
chapter empty$ type empty$ and pages empty$ and %$ |
| 1638 |
{ "empty chapter, type, and pages in " cite$ * warning$ |
| 1639 |
} |
| 1640 |
'skip$ %$ |
| 1641 |
if$ %$ |
| 1642 |
new.block |
| 1643 |
make.translators space output |
| 1644 |
new.block |
| 1645 |
make.illustrators space output |
| 1646 |
new.block |
| 1647 |
oyear empty$ %$ |
| 1648 |
{ address space output |
| 1649 |
publisher "publisher" check.empty colon output |
| 1650 |
} |
| 1651 |
{ oaddress space output |
| 1652 |
opublisher "opublisher" check.empty colon output |
| 1653 |
new.block |
| 1654 |
"Reprint" comma output |
| 1655 |
address comma output |
| 1656 |
publisher "publisher" check.empty |
| 1657 |
address empty$ %$ |
| 1658 |
{ comma |
| 1659 |
} |
| 1660 |
{ colon |
| 1661 |
} |
| 1662 |
if$ %$ |
| 1663 |
output |
| 1664 |
year comma output |
| 1665 |
} |
| 1666 |
if$ %$ |
| 1667 |
} |
| 1668 |
% crossref not empty |
| 1669 |
{ new.block |
| 1670 |
"In " make.crossref * space output |
| 1671 |
make.chapter comma output |
| 1672 |
make.pages comma output |
| 1673 |
chapter empty$ pages empty$ and |
| 1674 |
{ "empty chapter and pages in " cite$ * warning$ |
| 1675 |
} |
| 1676 |
'skip$ %$ |
| 1677 |
if$ %$ |
| 1678 |
} |
| 1679 |
if$ %$ |
| 1680 |
new.block |
| 1681 |
note space output |
| 1682 |
finish.entry |
| 1683 |
} |
| 1684 |
FUNCTION {format.thesis} |
| 1685 |
{ 'v := |
| 1686 |
begin.entry |
| 1687 |
make.leaditem.with.tags comma output |
| 1688 |
new.block |
| 1689 |
make.year.month "year" check.empty space output |
| 1690 |
new.block |
| 1691 |
make.title.inquotes "title" check.empty space output |
| 1692 |
new.block |
| 1693 |
v "type" check.empty space output |
| 1694 |
school "school" check.empty comma output |
| 1695 |
address comma output |
| 1696 |
new.block |
| 1697 |
note space output |
| 1698 |
finish.entry |
| 1699 |
} |
| 1700 |
FUNCTION {thesis} |
| 1701 |
{ type field.or.null format.thesis |
| 1702 |
} |
| 1703 |
FUNCTION{mastersthesis} |
| 1704 |
{ type empty$ %$ |
| 1705 |
{ "Master's thesis" |
| 1706 |
} |
| 1707 |
{ type |
| 1708 |
} |
| 1709 |
if$ %$ |
| 1710 |
format.thesis |
| 1711 |
} |
| 1712 |
FUNCTION {minorthesis} |
| 1713 |
{ mastersthesis |
| 1714 |
} |
| 1715 |
FUNCTION {phdthesis} |
| 1716 |
{ type empty$ %$ |
| 1717 |
{ "Ph.D.~diss." |
| 1718 |
} |
| 1719 |
{ type |
| 1720 |
} |
| 1721 |
if$ %$ |
| 1722 |
format.thesis |
| 1723 |
} |
| 1724 |
FUNCTION {majorthesis} |
| 1725 |
{ phdthesis |
| 1726 |
} |
| 1727 |
FUNCTION {manual} |
| 1728 |
{ begin.entry |
| 1729 |
make.leaditem.with.tags space output |
| 1730 |
new.block |
| 1731 |
make.year.month space output |
| 1732 |
new.block |
| 1733 |
make.title.ital "title" check.empty comma output |
| 1734 |
new.block |
| 1735 |
make.edition comma output |
| 1736 |
new.block |
| 1737 |
address space output |
| 1738 |
organization colon output |
| 1739 |
new.block |
| 1740 |
note space output |
| 1741 |
finish.entry |
| 1742 |
} |
| 1743 |
FUNCTION {booklet} |
| 1744 |
{ begin.entry |
| 1745 |
make.leaditem.with.tags comma output |
| 1746 |
new.block |
| 1747 |
make.year.month space output |
| 1748 |
new.block |
| 1749 |
make.title.inquotes "title" check.empty comma output |
| 1750 |
new.block |
| 1751 |
howpublished space output |
| 1752 |
address comma output |
| 1753 |
new.block |
| 1754 |
note space output |
| 1755 |
finish.entry |
| 1756 |
} |
| 1757 |
FUNCTION {inproceedings} |
| 1758 |
{ begin.entry |
| 1759 |
make.leaditem.with.tags comma output |
| 1760 |
new.block |
| 1761 |
make.year.month "year" check.empty space output |
| 1762 |
new.block |
| 1763 |
make.title.inquotes "title" check.empty space output |
| 1764 |
new.block |
| 1765 |
crossref empty$ %$ |
| 1766 |
{ make.editors.secondary space output |
| 1767 |
make.booktitle.ital "booktitle" check.empty comma output |
| 1768 |
volume empty$ %$ |
| 1769 |
{ output.series.number |
| 1770 |
} |
| 1771 |
{ output.volume.series |
| 1772 |
} |
| 1773 |
if$ %$ |
| 1774 |
make.edition comma output |
| 1775 |
new.block |
| 1776 |
organization space output |
| 1777 |
address comma output |
| 1778 |
publisher colon output |
| 1779 |
make.pages comma output |
| 1780 |
} |
| 1781 |
{ "In " make.crossref * space output |
| 1782 |
make.chapter comma output |
| 1783 |
make.pages comma output |
| 1784 |
chapter empty$ pages empty$ and |
| 1785 |
{ "empty chapter and pages in " cite$ * warning$ |
| 1786 |
} |
| 1787 |
'skip$ %$ |
| 1788 |
if$ %$ |
| 1789 |
} |
| 1790 |
if$ %$ |
| 1791 |
new.block |
| 1792 |
note space output |
| 1793 |
finish.entry |
| 1794 |
} |
| 1795 |
FUNCTION {conference} |
| 1796 |
{ inproceedings |
| 1797 |
} |
| 1798 |
FUNCTION {proceedings} |
| 1799 |
{ begin.entry |
| 1800 |
make.leaditem.with.tags space output |
| 1801 |
new.block |
| 1802 |
make.year.month "year" check.empty space output |
| 1803 |
new.block |
| 1804 |
make.title.ital "title" check.empty comma output |
| 1805 |
new.block |
| 1806 |
make.edition comma output |
| 1807 |
new.block |
| 1808 |
volume empty$ %$ |
| 1809 |
{ output.series.number |
| 1810 |
} |
| 1811 |
{ output.volume.series |
| 1812 |
} |
| 1813 |
if$ %$ |
| 1814 |
new.block |
| 1815 |
organization space output |
| 1816 |
address comma output |
| 1817 |
publisher colon output |
| 1818 |
new.block |
| 1819 |
note comma output |
| 1820 |
finish.entry |
| 1821 |
} |
| 1822 |
FUNCTION {misc} |
| 1823 |
{ begin.entry |
| 1824 |
make.leaditem.with.tags comma output |
| 1825 |
new.block |
| 1826 |
make.year.month space output |
| 1827 |
new.block |
| 1828 |
title space output |
| 1829 |
new.block |
| 1830 |
howpublished comma output |
| 1831 |
new.block |
| 1832 |
note space output |
| 1833 |
finish.entry |
| 1834 |
} |
| 1835 |
FUNCTION {techreport} |
| 1836 |
{ begin.entry |
| 1837 |
make.leaditem.with.tags comma output |
| 1838 |
new.block |
| 1839 |
make.year.month "year" check.empty comma output |
| 1840 |
new.block |
| 1841 |
make.title.inquotes "title" check.empty comma output |
| 1842 |
new.block |
| 1843 |
make.number.tr comma output |
| 1844 |
institution "institution" check.empty comma output |
| 1845 |
address comma output |
| 1846 |
new.block |
| 1847 |
note comma output |
| 1848 |
finish.entry |
| 1849 |
} |
| 1850 |
FUNCTION {unpublished} |
| 1851 |
{ begin.entry |
| 1852 |
make.leaditem.with.tags comma output |
| 1853 |
new.block |
| 1854 |
make.year.month space output |
| 1855 |
new.block |
| 1856 |
make.title.inquotes "title" check.empty space output |
| 1857 |
new.block |
| 1858 |
note "note" check.empty space output |
| 1859 |
finish.entry |
| 1860 |
} |
| 1861 |
FUNCTION {default.type} |
| 1862 |
{ misc } |
| 1863 |
FUNCTION {chop.word} |
| 1864 |
{ 't := |
| 1865 |
'len := |
| 1866 |
t #1 len substring$ = %$ |
| 1867 |
{ t len #1 + global.max$ substring$ |
| 1868 |
} |
| 1869 |
{ t |
| 1870 |
} |
| 1871 |
if$ %$ |
| 1872 |
} |
| 1873 |
FUNCTION {make.title.for.sort} |
| 1874 |
{ title field.or.null |
| 1875 |
't := |
| 1876 |
"A " #2 |
| 1877 |
"An " #3 |
| 1878 |
"The " #4 t chop.word |
| 1879 |
chop.word |
| 1880 |
chop.word |
| 1881 |
format.dehyphen.dewhitespace |
| 1882 |
} |
| 1883 |
FUNCTION {presort} |
| 1884 |
{ set.principal-field.principal-type |
| 1885 |
|
| 1886 |
make.leaditem |
| 1887 |
'leaditem := |
| 1888 |
|
| 1889 |
make.label |
| 1890 |
'label := |
| 1891 |
|
| 1892 |
oyear empty$ %$ |
| 1893 |
{ year |
| 1894 |
} |
| 1895 |
{ oyear |
| 1896 |
} |
| 1897 |
if$ %$ |
| 1898 |
field.or.null purify$ #-1 #4 substring$ |
| 1899 |
'year.label := |
| 1900 |
} |
| 1901 |
|
| 1902 |
FUNCTION {sortkey<-label+year+principal+title} |
| 1903 |
{ label |
| 1904 |
delimiter.sub-sortkey * |
| 1905 |
year.label * |
| 1906 |
delimiter.sub-sortkey * |
| 1907 |
make.principal-field.for.sort * |
| 1908 |
delimiter.sub-sortkey * |
| 1909 |
make.title.for.sort * |
| 1910 |
format.sortify.clip |
| 1911 |
'sort.key$ := %$ |
| 1912 |
} |
| 1913 |
|
| 1914 |
FUNCTION {sortkey<-principal+year+year-tag} |
| 1915 |
{ make.principal-field.for.sort |
| 1916 |
delimiter.sub-sortkey * |
| 1917 |
year.label * |
| 1918 |
year.label.tag * |
| 1919 |
format.sortify.clip |
| 1920 |
'sort.key$ := %$ |
| 1921 |
} |
| 1922 |
|
| 1923 |
FUNCTION {presort.&.sortkey<-label+year+principal+title} |
| 1924 |
{ presort |
| 1925 |
sortkey<-label+year+principal+title |
| 1926 |
} |
| 1927 |
FUNCTION {initialize.sorting-gvars} |
| 1928 |
{ unidentified 'last.leaditem := |
| 1929 |
unidentified 'last.label.and.year := |
| 1930 |
"" 'following.year.label.tag := |
| 1931 |
#0 'last.year.tag.num := |
| 1932 |
} |
| 1933 |
FUNCTION {forward.pass.wrap.dupe.leaditems} |
| 1934 |
{ leaditem |
| 1935 |
duplicate$ last.leaditem = %$ |
| 1936 |
% we add the brace pair at the end because this forces add.period$ to add a %$ |
| 1937 |
% period after it. FIX: if we ever want \SCdup to actually print its |
| 1938 |
% argument, we must get it to print its argument minus any final period. |
| 1939 |
{ "\SCduplicate{" swap$ * "{}}" * 'leaditem := %$ |
| 1940 |
} |
| 1941 |
{ 'last.leaditem := |
| 1942 |
} |
| 1943 |
if$ %$ |
| 1944 |
} |
| 1945 |
FUNCTION {forward.pass.add.bcds} |
| 1946 |
{ label year.label * format.clip |
| 1947 |
duplicate$ last.label.and.year = %$ |
| 1948 |
% same as previous entry |
| 1949 |
{ pop$ %$ |
| 1950 |
last.year.tag.num #1 + 'last.year.tag.num := |
| 1951 |
last.year.tag.num int.to.chr$ 'year.label.tag := %$ |
| 1952 |
} |
| 1953 |
% different from previous entry |
| 1954 |
{ "a" chr.to.int$ 'last.year.tag.num := %$ |
| 1955 |
"" 'year.label.tag := |
| 1956 |
'last.label.and.year := |
| 1957 |
} |
| 1958 |
if$ %$ |
| 1959 |
} |
| 1960 |
|
| 1961 |
FUNCTION {reverse.pass.add.as} |
| 1962 |
{ following.year.label.tag "b" = |
| 1963 |
{ "a" 'year.label.tag := |
| 1964 |
} |
| 1965 |
'skip$ %$ |
| 1966 |
if$ %$ |
| 1967 |
year.label.tag 'following.year.label.tag := |
| 1968 |
} |
| 1969 |
FUNCTION {begin.bib} |
| 1970 |
{ preamble$ empty$ |
| 1971 |
'skip$ %$ |
| 1972 |
{ preamble$ write$ newline$ %$ |
| 1973 |
} |
| 1974 |
if$ %$ |
| 1975 |
"\begin{thebibliography}{}" write$ newline$ |
| 1976 |
} |
| 1977 |
FUNCTION {end.bib} |
| 1978 |
{ newline$ %$ |
| 1979 |
"\end{thebibliography}" write$ newline$ |
| 1980 |
} |
| 1981 |
READ |
| 1982 |
|
| 1983 |
EXECUTE {init.scalars} |
| 1984 |
|
| 1985 |
ITERATE {presort.&.sortkey<-label+year+principal+title} |
| 1986 |
SORT |
| 1987 |
|
| 1988 |
EXECUTE {initialize.sorting-gvars} |
| 1989 |
|
| 1990 |
ITERATE {forward.pass.add.bcds} |
| 1991 |
REVERSE {reverse.pass.add.as} |
| 1992 |
|
| 1993 |
ITERATE{sortkey<-principal+year+year-tag} |
| 1994 |
SORT |
| 1995 |
|
| 1996 |
EXECUTE {initialize.sorting-gvars} |
| 1997 |
ITERATE {forward.pass.wrap.dupe.leaditems} |
| 1998 |
|
| 1999 |
EXECUTE {begin.bib} |
| 2000 |
ITERATE {call.type$} %$ |
| 2001 |
EXECUTE {end.bib} |