| 1 |
%% |
| 2 |
%% This is file `amsry.bst', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% amsxport.dtx (with options: `bst,sort,alpha,y2k') |
| 8 |
%% |
| 9 |
%% Copyright 2001, 2004, 2010 American Mathematical Society. |
| 10 |
%% |
| 11 |
%% American Mathematical Society |
| 12 |
%% Technical Support |
| 13 |
%% Publications Technical Group |
| 14 |
%% 201 Charles Street |
| 15 |
%% Providence, RI 02904 |
| 16 |
%% USA |
| 17 |
%% tel: (401) 455-4080 |
| 18 |
%% (800) 321-4267 (USA and Canada only) |
| 19 |
%% fax: (401) 331-3842 |
| 20 |
%% email: tech-support<at>ams.org |
| 21 |
%% |
| 22 |
%% This work may be distributed and/or modified under the |
| 23 |
%% conditions of the LaTeX Project Public License, either version 1.3c |
| 24 |
%% of this license or (at your option) any later version. |
| 25 |
%% The latest version of this license is in |
| 26 |
%% http://www.latex-project.org/lppl.txt |
| 27 |
%% and version 1.3c or later is part of all distributions of LaTeX |
| 28 |
%% version 2005/12/01 or later. |
| 29 |
%% |
| 30 |
%% This work has the LPPL maintenance status `maintained'. |
| 31 |
%% |
| 32 |
%% The Current Maintainer of this work is the American Mathematical |
| 33 |
%% Society. |
| 34 |
%% |
| 35 |
ENTRY |
| 36 |
{ |
| 37 |
address institution number status |
| 38 |
archive isbn organization subtitle |
| 39 |
author issn pages title |
| 40 |
booktitle journal part translator |
| 41 |
chapter key pii type |
| 42 |
date language preprint url |
| 43 |
edition meeting publisher volume |
| 44 |
editor month review xid |
| 45 |
eprint mrnumber school year |
| 46 |
howpublished note series |
| 47 |
} |
| 48 |
{ } |
| 49 |
{ label } |
| 50 |
MACRO {jan} {"-01"} |
| 51 |
MACRO {feb} {"-02"} |
| 52 |
MACRO {mar} {"-03"} |
| 53 |
MACRO {apr} {"-04"} |
| 54 |
MACRO {may} {"-05"} |
| 55 |
MACRO {jun} {"-06"} |
| 56 |
MACRO {jul} {"-07"} |
| 57 |
MACRO {aug} {"-08"} |
| 58 |
MACRO {sep} {"-09"} |
| 59 |
MACRO {oct} {"-10"} |
| 60 |
MACRO {nov} {"-11"} |
| 61 |
MACRO {dec} {"-12"} |
| 62 |
STRINGS { p s t l } |
| 63 |
INTEGERS { len ptr } |
| 64 |
|
| 65 |
FUNCTION {NOT} { { #0 } { #1 } if$ } |
| 66 |
|
| 67 |
FUNCTION {AND} { 'skip$ { pop$ #0 } if$ } |
| 68 |
|
| 69 |
FUNCTION {OR} { { pop$ #1 } 'skip$ if$ } |
| 70 |
|
| 71 |
FUNCTION {TRUE} { #1 } |
| 72 |
|
| 73 |
FUNCTION {FALSE} { #0 } |
| 74 |
|
| 75 |
FUNCTION {incr.ptr} { ptr #1 + 'ptr := } |
| 76 |
|
| 77 |
FUNCTION {current.char} { ptr #1 substring$ } |
| 78 |
FUNCTION {copy.two.chars} { t * incr.ptr s current.char * incr.ptr } |
| 79 |
|
| 80 |
FUNCTION {is.digit} { |
| 81 |
chr.to.int$ |
| 82 |
duplicate$ |
| 83 |
"0" chr.to.int$ #1 - > |
| 84 |
swap$ |
| 85 |
"9" chr.to.int$ #1 + < |
| 86 |
AND |
| 87 |
} |
| 88 |
|
| 89 |
FUNCTION {is.lowercase.letter} { |
| 90 |
chr.to.int$ duplicate$ |
| 91 |
"a" chr.to.int$ #1 - > |
| 92 |
swap$ |
| 93 |
"z" chr.to.int$ #1 + < |
| 94 |
AND |
| 95 |
} |
| 96 |
FUNCTION {is.uppercase.letter} { |
| 97 |
chr.to.int$ duplicate$ |
| 98 |
"A" chr.to.int$ #1 - > |
| 99 |
swap$ |
| 100 |
"Z" chr.to.int$ #1 + < |
| 101 |
AND |
| 102 |
} |
| 103 |
FUNCTION {is.letter} { |
| 104 |
duplicate$ |
| 105 |
is.lowercase.letter |
| 106 |
{ pop$ TRUE } |
| 107 |
{ is.uppercase.letter } |
| 108 |
if$ |
| 109 |
} |
| 110 |
FUNCTION {skip.accent} { pop$ incr.ptr } |
| 111 |
FUNCTION {strip.label} { |
| 112 |
's := |
| 113 |
#1 'ptr := |
| 114 |
"" |
| 115 |
{ s ptr #1 substring$ duplicate$ empty$ NOT } |
| 116 |
{ duplicate$ is.letter |
| 117 |
{ * } |
| 118 |
{ duplicate$ "\" = |
| 119 |
{ skip.accent } |
| 120 |
'pop$ |
| 121 |
if$ |
| 122 |
} |
| 123 |
if$ |
| 124 |
incr.ptr |
| 125 |
} |
| 126 |
while$ |
| 127 |
pop$ |
| 128 |
} |
| 129 |
FUNCTION {sortify} { |
| 130 |
purify$ |
| 131 |
"l" change.case$ |
| 132 |
} |
| 133 |
FUNCTION {lpad} { |
| 134 |
swap$ |
| 135 |
'l := |
| 136 |
l text.length$ - 'len := |
| 137 |
{ len #0 > } |
| 138 |
{ |
| 139 |
" " l * 'l := |
| 140 |
len #1 - 'len := |
| 141 |
} |
| 142 |
while$ |
| 143 |
l |
| 144 |
} |
| 145 |
FUNCTION {field.or.null} { |
| 146 |
duplicate$ empty$ |
| 147 |
{ pop$ "" } |
| 148 |
'skip$ |
| 149 |
if$ |
| 150 |
} |
| 151 |
FUNCTION {missing.or.empty} { duplicate$ missing$ swap$ empty$ OR } |
| 152 |
|
| 153 |
FUNCTION {append.ndash.and.skip.hyphens} { |
| 154 |
"\ndash " * |
| 155 |
incr.ptr |
| 156 |
{ s current.char "-" = } |
| 157 |
{ incr.ptr } |
| 158 |
while$ |
| 159 |
} |
| 160 |
FUNCTION {n.dashify} { |
| 161 |
's := |
| 162 |
#1 'ptr := |
| 163 |
"" |
| 164 |
{ s current.char 't := t "" = NOT } |
| 165 |
{ t "\" = |
| 166 |
{ copy.two.chars } |
| 167 |
{ t "-" = |
| 168 |
{ append.ndash.and.skip.hyphens } |
| 169 |
{ t * incr.ptr } |
| 170 |
if$ |
| 171 |
} |
| 172 |
if$ |
| 173 |
} |
| 174 |
while$ |
| 175 |
} |
| 176 |
FUNCTION {missing.warning} { |
| 177 |
"missing " swap$ * " in " * cite$ * warning$ |
| 178 |
} |
| 179 |
|
| 180 |
INTEGERS { string.ptr } |
| 181 |
|
| 182 |
FUNCTION {string.length} { |
| 183 |
#1 'string.ptr := |
| 184 |
{ duplicate$ string.ptr #1 substring$ "" = 'FALSE 'TRUE if$ } |
| 185 |
{ string.ptr #1 + 'string.ptr := } |
| 186 |
while$ |
| 187 |
pop$ |
| 188 |
string.ptr #1 - |
| 189 |
} |
| 190 |
FUNCTION {format.title}{ |
| 191 |
duplicate$ |
| 192 |
missing.or.empty |
| 193 |
{ pop$ "" } |
| 194 |
{ "t" change.case$ } |
| 195 |
if$ |
| 196 |
} |
| 197 |
FUNCTION {start.field} { |
| 198 |
#12 lpad "={" * write$ |
| 199 |
} |
| 200 |
FUNCTION {fin.field} { "}," write$ newline$ } |
| 201 |
|
| 202 |
FUNCTION {write.field} { |
| 203 |
duplicate$ |
| 204 |
missing$ |
| 205 |
{ pop$ missing.warning } |
| 206 |
{ duplicate$ empty$ |
| 207 |
{ pop$ missing.warning } |
| 208 |
{ swap$ start.field write$ fin.field } |
| 209 |
if$ |
| 210 |
} |
| 211 |
if$ |
| 212 |
} |
| 213 |
FUNCTION {optional.field} { |
| 214 |
duplicate$ |
| 215 |
missing.or.empty |
| 216 |
{ pop$ pop$ } |
| 217 |
{ swap$ start.field write$ fin.field } |
| 218 |
if$ |
| 219 |
} |
| 220 |
FUNCTION {optional.title.field} { |
| 221 |
duplicate$ |
| 222 |
missing.or.empty |
| 223 |
{ pop$ pop$ } |
| 224 |
{ format.title swap$ start.field write$ fin.field } |
| 225 |
if$ |
| 226 |
} |
| 227 |
FUNCTION {optional.pages.field} { |
| 228 |
duplicate$ |
| 229 |
missing.or.empty |
| 230 |
{ pop$ pop$ } |
| 231 |
{ swap$ start.field |
| 232 |
n.dashify |
| 233 |
write$ fin.field |
| 234 |
} |
| 235 |
if$ |
| 236 |
} |
| 237 |
FUNCTION {optional.mr.field} { |
| 238 |
duplicate$ |
| 239 |
missing.or.empty |
| 240 |
{ pop$ pop$ } |
| 241 |
{ |
| 242 |
swap$ start.field |
| 243 |
"\MR{" swap$ * "}" * write$ fin.field |
| 244 |
} |
| 245 |
if$ |
| 246 |
} |
| 247 |
FUNCTION {remove.ordinal.suffix} { |
| 248 |
's := |
| 249 |
s string.length 'len := |
| 250 |
#1 'ptr := |
| 251 |
{ ptr len < s ptr #1 substring$ is.digit AND } |
| 252 |
'incr.ptr |
| 253 |
while$ |
| 254 |
s ptr global.max$ substring$ 'p := |
| 255 |
p "st" = |
| 256 |
{ TRUE } |
| 257 |
{ p "nd" = |
| 258 |
{ TRUE } |
| 259 |
{ p "rd" = |
| 260 |
{ TRUE } |
| 261 |
{ p "th" = |
| 262 |
{ TRUE } |
| 263 |
{ FALSE } |
| 264 |
if$ |
| 265 |
} |
| 266 |
if$ |
| 267 |
} |
| 268 |
if$ |
| 269 |
} |
| 270 |
if$ |
| 271 |
{ s #1 ptr #1 - substring$ } |
| 272 |
{ s } |
| 273 |
if$ |
| 274 |
} |
| 275 |
FUNCTION {optional.edition.field} { |
| 276 |
duplicate$ missing.or.empty |
| 277 |
{ pop$ pop$ } |
| 278 |
{ swap$ start.field |
| 279 |
remove.ordinal.suffix |
| 280 |
write$ fin.field |
| 281 |
} |
| 282 |
if$ |
| 283 |
} |
| 284 |
INTEGERS { nameptr numnames namesleft } |
| 285 |
STRINGS { namelist fieldname } |
| 286 |
FUNCTION {format.name} { "{vv~}{ll}{, ff}{, jj}" format.name$ } |
| 287 |
|
| 288 |
FUNCTION {optional.name.field}{ |
| 289 |
duplicate$ missing.or.empty |
| 290 |
{ pop$ pop$ } |
| 291 |
{ swap$ 'fieldname := |
| 292 |
duplicate$ num.names$ |
| 293 |
'namesleft := |
| 294 |
#1 'ptr := |
| 295 |
{ namesleft #0 > } |
| 296 |
{ fieldname start.field |
| 297 |
duplicate$ ptr format.name write$ |
| 298 |
fin.field |
| 299 |
ptr #1 + 'ptr := |
| 300 |
namesleft #1 - 'namesleft := |
| 301 |
} |
| 302 |
while$ |
| 303 |
pop$ |
| 304 |
} |
| 305 |
if$ |
| 306 |
} |
| 307 |
FUNCTION {assemble.date.field} |
| 308 |
{ date missing$ |
| 309 |
{ year missing.or.empty |
| 310 |
{ status missing.or.empty |
| 311 |
{ "No year or other date information for " |
| 312 |
cite$ * warning$ } |
| 313 |
'skip$ |
| 314 |
if$ |
| 315 |
"status" |
| 316 |
} |
| 317 |
{ year month missing$ { "" } { month } if$ * } |
| 318 |
if$ |
| 319 |
} |
| 320 |
{ date } |
| 321 |
if$ |
| 322 |
duplicate$ "status" = |
| 323 |
{ pop$ pop$ } |
| 324 |
{ swap$ start.field write$ fin.field } |
| 325 |
if$ |
| 326 |
} |
| 327 |
FUNCTION {optional.journal.field} { |
| 328 |
duplicate$ missing.or.empty |
| 329 |
{ pop$ pop$ } |
| 330 |
{ |
| 331 |
's := |
| 332 |
start.field |
| 333 |
#1 'ptr := |
| 334 |
s current.char is.lowercase.letter |
| 335 |
{ |
| 336 |
s "/" * 's := |
| 337 |
{ s ptr #1 substring$ "/" = NOT } |
| 338 |
{ incr.ptr } |
| 339 |
while$ |
| 340 |
s ptr #1 + #1 substring$ empty$ |
| 341 |
{ s #1 ptr #1 - substring$ } |
| 342 |
{ |
| 343 |
s #1 ptr #1 - substring$ |
| 344 |
write$ |
| 345 |
fin.field |
| 346 |
"ISSN" start.field |
| 347 |
s ptr #1 + #9 substring$ |
| 348 |
} |
| 349 |
if$ |
| 350 |
} |
| 351 |
{ s } |
| 352 |
if$ |
| 353 |
write$ |
| 354 |
fin.field |
| 355 |
} |
| 356 |
if$ |
| 357 |
} |
| 358 |
FUNCTION {optional.type.field} |
| 359 |
{ duplicate$ missing.or.empty |
| 360 |
{ type$ "mastersthesis" = { "Master's Thesis" } |
| 361 |
{ type$ "phdthesis" = { "Ph.D. Thesis" } |
| 362 |
{ "" } if$ } if$ |
| 363 |
swap$ pop$ |
| 364 |
} |
| 365 |
'skip$ |
| 366 |
if$ |
| 367 |
duplicate$ empty$ |
| 368 |
{ pop$ pop$ } |
| 369 |
{ swap$ start.field write$ fin.field } |
| 370 |
if$ |
| 371 |
} |
| 372 |
FUNCTION {url.note.status.review} { |
| 373 |
"url" url optional.field |
| 374 |
"note" note optional.field |
| 375 |
"status" status optional.field |
| 376 |
"review" review optional.field |
| 377 |
"review" mrnumber optional.mr.field |
| 378 |
} |
| 379 |
FUNCTION {start.entry} { |
| 380 |
newline$ |
| 381 |
"\bib{" cite$ * "}{" * |
| 382 |
type$ "mastersthesis" = type$ "phdthesis" = OR |
| 383 |
{ "thesis" } |
| 384 |
{ type$ } |
| 385 |
if$ |
| 386 |
* "}{" * write$ |
| 387 |
newline$ |
| 388 |
} |
| 389 |
FUNCTION {fin.entry} { |
| 390 |
"}" write$ |
| 391 |
newline$ |
| 392 |
} |
| 393 |
FUNCTION {article} { |
| 394 |
start.entry |
| 395 |
"author" author optional.name.field |
| 396 |
"translator" translator optional.name.field |
| 397 |
"title" title format.title write.field |
| 398 |
"subtitle" subtitle optional.title.field |
| 399 |
"language" language optional.field |
| 400 |
"organization" organization optional.field |
| 401 |
"how" howpublished optional.field |
| 402 |
"date" assemble.date.field |
| 403 |
"ISSN" issn optional.field |
| 404 |
"journal" journal optional.journal.field |
| 405 |
"volume" volume optional.field |
| 406 |
"number" number optional.field |
| 407 |
"pages" pages optional.pages.field |
| 408 |
"PII" pii optional.field |
| 409 |
"archive" archive optional.field |
| 410 |
"eprint" eprint optional.field |
| 411 |
"preprint" preprint optional.field |
| 412 |
url.note.status.review |
| 413 |
fin.entry |
| 414 |
} |
| 415 |
FUNCTION {inproceedings} { |
| 416 |
start.entry |
| 417 |
"author" author optional.name.field |
| 418 |
"translator" translator optional.name.field |
| 419 |
"title" title format.title write.field |
| 420 |
"subtitle" subtitle optional.title.field |
| 421 |
"language" language optional.field |
| 422 |
"organization" organization optional.field |
| 423 |
"how" howpublished optional.field |
| 424 |
"date" assemble.date.field |
| 425 |
"xid" xid optional.field |
| 426 |
"conference" meeting optional.field |
| 427 |
"booktitle" booktitle optional.title.field |
| 428 |
"edition" edition optional.edition.field |
| 429 |
"editor" editor optional.name.field |
| 430 |
"series" series optional.field |
| 431 |
"volume" volume optional.field |
| 432 |
"publisher" publisher optional.field |
| 433 |
"address" address optional.field |
| 434 |
"pages" pages optional.pages.field |
| 435 |
url.note.status.review |
| 436 |
fin.entry |
| 437 |
} |
| 438 |
FUNCTION {inbook} { inproceedings } |
| 439 |
FUNCTION {incollection} { inproceedings } |
| 440 |
FUNCTION {conference} { inproceedings } |
| 441 |
FUNCTION {book} { |
| 442 |
start.entry |
| 443 |
"author" author optional.name.field |
| 444 |
"editor" editor optional.name.field |
| 445 |
"translator" translator optional.name.field |
| 446 |
"title" title missing$ { booktitle } { title } if$ |
| 447 |
format.title write.field |
| 448 |
"subtitle" subtitle optional.title.field |
| 449 |
"type" type optional.type.field |
| 450 |
"language" language optional.field |
| 451 |
"conference" meeting optional.field |
| 452 |
"edition" edition optional.edition.field |
| 453 |
"series" series optional.field |
| 454 |
"publisher" publisher optional.field |
| 455 |
organization missing.or.empty |
| 456 |
{ "institution" institution optional.field } |
| 457 |
{ "organization" organization optional.field } |
| 458 |
if$ |
| 459 |
"address" address optional.field |
| 460 |
"how" howpublished optional.field |
| 461 |
"date" year write.field |
| 462 |
"volume" volume optional.field |
| 463 |
"number" number optional.field |
| 464 |
"ISBN" isbn optional.field |
| 465 |
url.note.status.review |
| 466 |
fin.entry |
| 467 |
} |
| 468 |
FUNCTION {booklet} { book } |
| 469 |
FUNCTION {manual} { book } |
| 470 |
FUNCTION {mastersthesis} { book } |
| 471 |
|
| 472 |
FUNCTION {phdthesis} { book } |
| 473 |
|
| 474 |
FUNCTION {proceedings} { book } |
| 475 |
|
| 476 |
FUNCTION {collection} { book } |
| 477 |
|
| 478 |
FUNCTION {techreport} { book } |
| 479 |
|
| 480 |
FUNCTION {unpublished} { book } |
| 481 |
|
| 482 |
FUNCTION {misc} { book } |
| 483 |
|
| 484 |
FUNCTION {default.type} { misc } |
| 485 |
|
| 486 |
|
| 487 |
READ |
| 488 |
|
| 489 |
FUNCTION {chop.word} { |
| 490 |
's := |
| 491 |
'len := |
| 492 |
s #1 len substring$ = |
| 493 |
{ s len #1 + global.max$ substring$ } |
| 494 |
's |
| 495 |
if$ |
| 496 |
} |
| 497 |
FUNCTION {sort.format.title} { |
| 498 |
't := |
| 499 |
"A " #2 |
| 500 |
"An " #3 |
| 501 |
"The " #4 t chop.word |
| 502 |
chop.word |
| 503 |
chop.word |
| 504 |
sortify |
| 505 |
#1 global.max$ substring$ |
| 506 |
} |
| 507 |
FUNCTION {format.lab.names} { |
| 508 |
's := |
| 509 |
s num.names$ 'numnames := |
| 510 |
numnames #1 > |
| 511 |
{ numnames #4 > |
| 512 |
{ #3 'namesleft := } |
| 513 |
{ numnames 'namesleft := } |
| 514 |
if$ |
| 515 |
#1 'nameptr := |
| 516 |
"" |
| 517 |
{ namesleft #0 > } |
| 518 |
{ nameptr numnames = |
| 519 |
{ s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 520 |
{ "{\etalchar{+}}" * } |
| 521 |
{ s nameptr "{v{}}{l{}}" format.name$ * } |
| 522 |
if$ |
| 523 |
} |
| 524 |
{ s nameptr "{v{}}{l{}}" format.name$ * } |
| 525 |
if$ |
| 526 |
nameptr #1 + 'nameptr := |
| 527 |
namesleft #1 - 'namesleft := |
| 528 |
} |
| 529 |
while$ |
| 530 |
numnames #4 > |
| 531 |
{ "{\etalchar{+}}" * } |
| 532 |
'skip$ |
| 533 |
if$ |
| 534 |
} |
| 535 |
{ s #1 "{v{}}{l{}}" format.name$ |
| 536 |
duplicate$ text.length$ #2 < |
| 537 |
{ pop$ s #1 "{ll}" format.name$ #3 text.prefix$ } |
| 538 |
'skip$ |
| 539 |
if$ |
| 540 |
} |
| 541 |
if$ |
| 542 |
} |
| 543 |
|
| 544 |
FUNCTION {author.key.label} |
| 545 |
{ author empty$ |
| 546 |
{ key empty$ |
| 547 |
{ cite$ #1 #3 substring$ } |
| 548 |
{ key #3 text.prefix$ } |
| 549 |
if$ |
| 550 |
} |
| 551 |
{ author format.lab.names } |
| 552 |
if$ |
| 553 |
} |
| 554 |
|
| 555 |
FUNCTION {author.editor.key.label} |
| 556 |
{ author empty$ |
| 557 |
{ editor empty$ |
| 558 |
{ key empty$ |
| 559 |
{ cite$ #1 #3 substring$ } |
| 560 |
{ key #3 text.prefix$ } |
| 561 |
if$ |
| 562 |
} |
| 563 |
{ editor format.lab.names } |
| 564 |
if$ |
| 565 |
} |
| 566 |
{ author format.lab.names } |
| 567 |
if$ |
| 568 |
} |
| 569 |
|
| 570 |
FUNCTION {author.key.organization.label} |
| 571 |
{ author empty$ |
| 572 |
{ key empty$ |
| 573 |
{ organization empty$ |
| 574 |
{ cite$ #1 #3 substring$ } |
| 575 |
{ "The " #4 organization chop.word #3 text.prefix$ } |
| 576 |
if$ |
| 577 |
} |
| 578 |
{ key #3 text.prefix$ } |
| 579 |
if$ |
| 580 |
} |
| 581 |
{ author format.lab.names } |
| 582 |
if$ |
| 583 |
} |
| 584 |
|
| 585 |
FUNCTION {editor.key.organization.label} |
| 586 |
{ editor empty$ |
| 587 |
{ key empty$ |
| 588 |
{ organization empty$ |
| 589 |
{ cite$ #1 #3 substring$ } |
| 590 |
{ "The " #4 organization chop.word #3 text.prefix$ } |
| 591 |
if$ |
| 592 |
} |
| 593 |
{ key #3 text.prefix$ } |
| 594 |
if$ |
| 595 |
} |
| 596 |
{ editor format.lab.names } |
| 597 |
if$ |
| 598 |
} |
| 599 |
|
| 600 |
FUNCTION {calc.label}{ |
| 601 |
type$ "book" = type$ "inbook" = OR |
| 602 |
'author.editor.key.label |
| 603 |
{ type$ "proceedings" = |
| 604 |
'editor.key.organization.label |
| 605 |
{ type$ "manual" = |
| 606 |
'author.key.organization.label |
| 607 |
'author.key.label |
| 608 |
if$ |
| 609 |
} |
| 610 |
if$ |
| 611 |
} |
| 612 |
if$ |
| 613 |
strip.label |
| 614 |
sortify |
| 615 |
year field.or.null |
| 616 |
purify$ * |
| 617 |
'label := |
| 618 |
} |
| 619 |
FUNCTION {sort.format.names} { |
| 620 |
's := |
| 621 |
#1 'ptr := |
| 622 |
"" |
| 623 |
s num.names$ 'numnames := |
| 624 |
numnames 'namesleft := |
| 625 |
{ namesleft #0 > } |
| 626 |
{ ptr #1 > |
| 627 |
{ " " * } |
| 628 |
'skip$ |
| 629 |
if$ |
| 630 |
s ptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := |
| 631 |
ptr numnames = t "others" = AND |
| 632 |
{ "et al" } |
| 633 |
{ t sortify } |
| 634 |
if$ |
| 635 |
* |
| 636 |
ptr #1 + 'ptr := |
| 637 |
namesleft #1 - 'namesleft := |
| 638 |
} |
| 639 |
while$ |
| 640 |
} |
| 641 |
FUNCTION {sort.warning} { |
| 642 |
"to sort, need " swap$ * " or key in " * cite$ * warning$ |
| 643 |
} |
| 644 |
FUNCTION {author.sort} |
| 645 |
{ author empty$ |
| 646 |
{ key empty$ |
| 647 |
{ "author" sort.warning |
| 648 |
"" |
| 649 |
} |
| 650 |
{ key sortify } |
| 651 |
if$ |
| 652 |
} |
| 653 |
{ author sort.format.names } |
| 654 |
if$ |
| 655 |
} |
| 656 |
FUNCTION {author.editor.sort} |
| 657 |
{ author empty$ |
| 658 |
{ editor empty$ |
| 659 |
{ key empty$ |
| 660 |
{ "author, editor," sort.warning |
| 661 |
"" |
| 662 |
} |
| 663 |
{ key sortify } |
| 664 |
if$ |
| 665 |
} |
| 666 |
{ editor sort.format.names } |
| 667 |
if$ |
| 668 |
} |
| 669 |
{ author sort.format.names } |
| 670 |
if$ |
| 671 |
} |
| 672 |
FUNCTION {author.organization.sort} |
| 673 |
{ author empty$ |
| 674 |
{ organization empty$ |
| 675 |
{ key empty$ |
| 676 |
{ "author, organization," sort.warning |
| 677 |
"" |
| 678 |
} |
| 679 |
{ key sortify } |
| 680 |
if$ |
| 681 |
} |
| 682 |
{ "The " #4 organization chop.word sortify } |
| 683 |
if$ |
| 684 |
} |
| 685 |
{ author sort.format.names } |
| 686 |
if$ |
| 687 |
} |
| 688 |
FUNCTION {editor.organization.sort} |
| 689 |
{ editor empty$ |
| 690 |
{ organization empty$ |
| 691 |
{ key empty$ |
| 692 |
{ "editor, organization," sort.warning |
| 693 |
"" |
| 694 |
} |
| 695 |
{ key sortify } |
| 696 |
if$ |
| 697 |
} |
| 698 |
{ "The " #4 organization chop.word sortify } |
| 699 |
if$ |
| 700 |
} |
| 701 |
{ editor sort.format.names } |
| 702 |
if$ |
| 703 |
} |
| 704 |
FUNCTION {presort} { |
| 705 |
calc.label |
| 706 |
label |
| 707 |
type$ "book" = type$ "inbook" = OR type$ "collection" = OR |
| 708 |
'author.editor.sort |
| 709 |
{ type$ "proceedings" = |
| 710 |
'editor.organization.sort |
| 711 |
{ type$ "manual" = |
| 712 |
'author.organization.sort |
| 713 |
'author.sort |
| 714 |
if$ |
| 715 |
} |
| 716 |
if$ |
| 717 |
} |
| 718 |
if$ |
| 719 |
* |
| 720 |
" " * |
| 721 |
title field.or.null sort.format.title * |
| 722 |
#1 entry.max$ substring$ |
| 723 |
'sort.key$ := |
| 724 |
} |
| 725 |
ITERATE {presort} |
| 726 |
|
| 727 |
SORT |
| 728 |
FUNCTION {write.with.newlines} |
| 729 |
{ 's := #1 'ptr := |
| 730 |
{ s ptr #2 + #1 substring$ "" = NOT } |
| 731 |
{ s ptr #3 substring$ "^^M" = |
| 732 |
{ s #1 ptr #1 - substring$ write$ newline$ |
| 733 |
ptr #3 + 'ptr := |
| 734 |
s ptr global.max$ substring$ 's := |
| 735 |
#1 'ptr := |
| 736 |
} |
| 737 |
{ incr.ptr } |
| 738 |
if$ |
| 739 |
} |
| 740 |
while$ |
| 741 |
s write$ newline$ |
| 742 |
} |
| 743 |
FUNCTION {begin.bib} { |
| 744 |
preamble$ empty$ |
| 745 |
'skip$ |
| 746 |
{ preamble$ write.with.newlines } |
| 747 |
if$ |
| 748 |
"% \bib, bibdiv, biblist are defined by the amsrefs package." |
| 749 |
write$ newline$ |
| 750 |
"\begin{bibdiv}" write$ newline$ |
| 751 |
"\begin{biblist}" write$ newline$ |
| 752 |
} |
| 753 |
FUNCTION {end.bib} { |
| 754 |
newline$ |
| 755 |
"\end{biblist}" write$ newline$ |
| 756 |
"\end{bibdiv}" write$ newline$ |
| 757 |
} |
| 758 |
EXECUTE {begin.bib} |
| 759 |
|
| 760 |
ITERATE {call.type$} |
| 761 |
|
| 762 |
EXECUTE {end.bib} |