| 1 |
%%% ==================================================================== |
| 2 |
%%% @BibTeX-style-file{ |
| 3 |
%%% filename = "ijmart.bst", |
| 4 |
%%% copyright = "Copyright 1995 American Mathematical Society, |
| 5 |
%%% 2005 The Hebrew University Magnes Press (changes) |
| 6 |
%%% all rights reserved. Copying of this file is |
| 7 |
%%% authorized only if either: |
| 8 |
%%% (1) you make absolutely no changes to your copy, |
| 9 |
%%% including name; OR |
| 10 |
%%% (2) if you do make changes, you first rename it |
| 11 |
%%% to some other name.", |
| 12 |
%%% abstract = "BibTeX bibliography style `ijmart' for BibTeX |
| 13 |
%%% versions 0.99a or later and LaTeX version 2e. |
| 14 |
%%% Produces numeric-label bibliography items in |
| 15 |
%%% a form typical for the Israel journal of |
| 16 |
%%% Mathematics. The style is based on amsplain.bst |
| 17 |
%%% |
| 18 |
%%% } |
| 19 |
%%% ==================================================================== |
| 20 |
|
| 21 |
% See the file btxbst.doc for extra documentation other than |
| 22 |
% what is included here. And see btxhak.tex for a description |
| 23 |
% of the BibTeX language and how to use it. |
| 24 |
|
| 25 |
% This defines the types of fields that can occur in a database entry |
| 26 |
% for this particular bibliography style. Except for `language', |
| 27 |
% this is the standard list from plain.bst. |
| 28 |
|
| 29 |
%% Types of entries currently allowed in a BibTeX file: |
| 30 |
%% |
| 31 |
%% ARTICLE -- An article from a journal or magazine. |
| 32 |
%% |
| 33 |
%% BOOK -- A book with an explicit publisher. |
| 34 |
%% |
| 35 |
%% BOOKLET -- A work that is printed and bound, |
| 36 |
%% but without a named publisher or sponsoring institution. |
| 37 |
%% |
| 38 |
%% CONFERENCE -- The same as INPROCEEDINGS, |
| 39 |
%% included for Scribe compatibility. |
| 40 |
%% |
| 41 |
%% INBOOK -- A part of a book, |
| 42 |
%% which may be a chapter (or section or whatever) and/or a range of pages. |
| 43 |
%% |
| 44 |
%% INCOLLECTION -- A part of a book having its own title. |
| 45 |
%% |
| 46 |
%% INPROCEEDINGS -- An article in a conference proceedings. |
| 47 |
%% |
| 48 |
%% MANUAL -- Technical documentation. |
| 49 |
%% |
| 50 |
%% MASTERSTHESIS -- A Master's thesis. |
| 51 |
%% |
| 52 |
%% MISC -- Use this type when nothing else fits. |
| 53 |
%% |
| 54 |
%% PHDTHESIS -- A PhD thesis. |
| 55 |
%% |
| 56 |
%% PROCEEDINGS -- The proceedings of a conference. |
| 57 |
%% |
| 58 |
%% TECHREPORT -- A report published by a school or other institution, |
| 59 |
%% usually numbered within a series. |
| 60 |
%% |
| 61 |
%% UNPUBLISHED -- A document having an author and title, but not formally |
| 62 |
%% published. |
| 63 |
|
| 64 |
ENTRY |
| 65 |
{ address |
| 66 |
author |
| 67 |
booktitle |
| 68 |
chapter |
| 69 |
edition |
| 70 |
editor |
| 71 |
howpublished |
| 72 |
institution |
| 73 |
journal |
| 74 |
fjournal |
| 75 |
key |
| 76 |
language |
| 77 |
month |
| 78 |
mrnumber |
| 79 |
note |
| 80 |
number |
| 81 |
organization |
| 82 |
pages |
| 83 |
publisher |
| 84 |
school |
| 85 |
series |
| 86 |
title |
| 87 |
type |
| 88 |
volume |
| 89 |
year |
| 90 |
} |
| 91 |
{} |
| 92 |
{ label } |
| 93 |
|
| 94 |
|
| 95 |
% Removed after.sentence, after.block---not needed. |
| 96 |
|
| 97 |
INTEGERS { output.state before.all mid.sentence } |
| 98 |
|
| 99 |
FUNCTION {init.state.consts} |
| 100 |
{ #0 'before.all := |
| 101 |
#1 'mid.sentence := |
| 102 |
} |
| 103 |
|
| 104 |
% Scratch variables: |
| 105 |
|
| 106 |
STRINGS { s t } |
| 107 |
|
| 108 |
% Utility functions |
| 109 |
|
| 110 |
FUNCTION {shows} |
| 111 |
{ duplicate$ ":::: `" swap$ * "'" * top$ |
| 112 |
} |
| 113 |
|
| 114 |
FUNCTION {showstack} |
| 115 |
{"STACK=====================================================================" |
| 116 |
top$ |
| 117 |
stack$ |
| 118 |
"ENDSTACK==================================================================" |
| 119 |
top$ |
| 120 |
} |
| 121 |
|
| 122 |
FUNCTION {not} |
| 123 |
{ { #0 } |
| 124 |
{ #1 } |
| 125 |
if$ |
| 126 |
} |
| 127 |
|
| 128 |
FUNCTION {and} |
| 129 |
{ 'skip$ |
| 130 |
{ pop$ #0 } |
| 131 |
if$ |
| 132 |
} |
| 133 |
|
| 134 |
FUNCTION {or} |
| 135 |
{ { pop$ #1 } |
| 136 |
'skip$ |
| 137 |
if$ |
| 138 |
} |
| 139 |
|
| 140 |
FUNCTION {field.or.null} |
| 141 |
{ duplicate$ empty$ |
| 142 |
{ pop$ "" } |
| 143 |
'skip$ |
| 144 |
if$ |
| 145 |
} |
| 146 |
|
| 147 |
FUNCTION {emphasize} |
| 148 |
{ duplicate$ empty$ |
| 149 |
{ pop$ "" } |
| 150 |
{ "\textsl{" swap$ * "}" * } |
| 151 |
if$ |
| 152 |
} |
| 153 |
|
| 154 |
% n.dashify is used to make sure page ranges get the TeX code |
| 155 |
% (two hyphens) for en-dashes. |
| 156 |
|
| 157 |
FUNCTION {n.dashify} |
| 158 |
{ 't := |
| 159 |
"" |
| 160 |
{ t empty$ not } |
| 161 |
{ t #1 #1 substring$ "-" = |
| 162 |
{ t #1 #2 substring$ "--" = not |
| 163 |
{ "--" * |
| 164 |
t #2 global.max$ substring$ 't := |
| 165 |
} |
| 166 |
{ { t #1 #1 substring$ "-" = } |
| 167 |
{ "-" * |
| 168 |
t #2 global.max$ substring$ 't := |
| 169 |
} |
| 170 |
while$ |
| 171 |
} |
| 172 |
if$ |
| 173 |
} |
| 174 |
{ t #1 #1 substring$ * |
| 175 |
t #2 global.max$ substring$ 't := |
| 176 |
} |
| 177 |
if$ |
| 178 |
} |
| 179 |
while$ |
| 180 |
} |
| 181 |
|
| 182 |
% tie.or.space.connect connects two items with a ~ if the |
| 183 |
% second item is less than 3 letters long, otherwise it just puts an |
| 184 |
% ordinary space. |
| 185 |
|
| 186 |
FUNCTION {tie.or.space.connect} |
| 187 |
{ duplicate$ text.length$ #3 < |
| 188 |
{ "~" } |
| 189 |
{ " " } |
| 190 |
if$ |
| 191 |
swap$ * * |
| 192 |
} |
| 193 |
|
| 194 |
FUNCTION {add.space.if.necessary} |
| 195 |
{ duplicate$ "" = |
| 196 |
'skip$ |
| 197 |
{ " " * } |
| 198 |
if$ |
| 199 |
} |
| 200 |
|
| 201 |
% either.or.check gives a warning if two mutually exclusive fields |
| 202 |
% were used in the database. |
| 203 |
|
| 204 |
FUNCTION {either.or.check} |
| 205 |
{ empty$ |
| 206 |
'pop$ |
| 207 |
{ "can't use both " swap$ * " fields in " * cite$ * warning$ } |
| 208 |
if$ |
| 209 |
} |
| 210 |
|
| 211 |
% output.nonnull is called by output. |
| 212 |
|
| 213 |
FUNCTION {output.nonnull} |
| 214 |
% remove the top item from the stack because it's in the way. |
| 215 |
{ 's := |
| 216 |
output.state mid.sentence = |
| 217 |
% If we're in mid-sentence, add a comma to the new top item and write it |
| 218 |
{ ", " * write$ } |
| 219 |
% Otherwise, if we're at the beginning of a bibitem, |
| 220 |
{ output.state before.all = |
| 221 |
% just write out the top item from the stack; |
| 222 |
'write$ |
| 223 |
% and the last alternative is that we're at the end of the current |
| 224 |
% bibitem, so we add a period to the top stack item and write it out. |
| 225 |
{ add.period$ " " * write$ } |
| 226 |
if$ |
| 227 |
mid.sentence 'output.state := |
| 228 |
} |
| 229 |
if$ |
| 230 |
% Put the top item back on the stack that we removed earlier. |
| 231 |
s |
| 232 |
} |
| 233 |
|
| 234 |
% Output checks to see if the stack top is empty; if not, it |
| 235 |
% calls output.nonnull to write it out. |
| 236 |
|
| 237 |
FUNCTION {output} |
| 238 |
{ duplicate$ empty$ |
| 239 |
'pop$ |
| 240 |
'output.nonnull |
| 241 |
if$ |
| 242 |
} |
| 243 |
|
| 244 |
% Standard warning message for a missing or empty field. For the user |
| 245 |
% we call any such field `missing' without respect to the distinction |
| 246 |
% made by BibTeX between missing and empty. |
| 247 |
|
| 248 |
FUNCTION {missing.warning} |
| 249 |
{ "missing " swap$ * " in " * cite$ * warning$ } |
| 250 |
|
| 251 |
% Output.check is like output except that it gives a warning on-screen |
| 252 |
% if the given field in the database entry is empty. t is the field |
| 253 |
% name. |
| 254 |
|
| 255 |
FUNCTION {output.check} |
| 256 |
{ 't := |
| 257 |
duplicate$ empty$ |
| 258 |
{ pop$ t missing.warning } |
| 259 |
'output.nonnull |
| 260 |
if$ |
| 261 |
} |
| 262 |
|
| 263 |
FUNCTION {output.bibitem} |
| 264 |
{ newline$ |
| 265 |
"\bibitem{" write$ |
| 266 |
cite$ write$ |
| 267 |
"}" write$ |
| 268 |
newline$ |
| 269 |
% This empty string is the first thing that will be written |
| 270 |
% the next time write$ is called. Done this way because each |
| 271 |
% item is saved on the stack until we find out what punctuation |
| 272 |
% should be added after it. Therefore we need an empty first item. |
| 273 |
"" |
| 274 |
before.all 'output.state := |
| 275 |
} |
| 276 |
|
| 277 |
FUNCTION {output.nonempty.mrnumber} |
| 278 |
{ duplicate$ missing$ |
| 279 |
{ pop$ "" } |
| 280 |
'skip$ |
| 281 |
if$ |
| 282 |
duplicate$ empty$ |
| 283 |
'pop$ |
| 284 |
{ " \MR{" swap$ * "}" * write$ } |
| 285 |
if$ |
| 286 |
} |
| 287 |
|
| 288 |
FUNCTION {fin.entry} |
| 289 |
{ add.period$ |
| 290 |
write$ |
| 291 |
mrnumber output.nonempty.mrnumber |
| 292 |
newline$ |
| 293 |
} |
| 294 |
|
| 295 |
% Removed new.block, new.block.checka, new.block.checkb, new.sentence, |
| 296 |
% new.sentence.checka, and new.sentence.checkb functions here, since they |
| 297 |
% don't seem to be needed in the AMS style. Also moved some real |
| 298 |
% basic functions like `and' and 'or' earlier in the file. |
| 299 |
|
| 300 |
INTEGERS { nameptr namesleft numnames } |
| 301 |
|
| 302 |
% The extra section to write out a language field was added |
| 303 |
% for AMSPLAIN.BST. Not present in plain.bst. |
| 304 |
|
| 305 |
FUNCTION {format.language} |
| 306 |
{ language empty$ |
| 307 |
{ "" } |
| 308 |
{ " (" language * ")" * } |
| 309 |
if$ |
| 310 |
} |
| 311 |
|
| 312 |
% This version of format.names puts names in the format |
| 313 |
% |
| 314 |
% First von Last, Jr. |
| 315 |
% |
| 316 |
% (i.e., first name first, no abbreviating to initials). |
| 317 |
% |
| 318 |
% Changed by BV, 2008/01/20: no comma before "and" |
| 319 |
|
| 320 |
|
| 321 |
FUNCTION {format.names} |
| 322 |
{ 's := |
| 323 |
#1 'nameptr := |
| 324 |
s num.names$ 'numnames := |
| 325 |
numnames 'namesleft := |
| 326 |
{ namesleft #0 > } |
| 327 |
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := |
| 328 |
nameptr #1 > |
| 329 |
{ namesleft #1 > |
| 330 |
{ ", " * t * } |
| 331 |
{ numnames #3 > |
| 332 |
{ "," * } |
| 333 |
'skip$ |
| 334 |
if$ |
| 335 |
t "others" = |
| 336 |
{ " et~al." * } |
| 337 |
{ " and " * t * } |
| 338 |
if$ |
| 339 |
} |
| 340 |
if$ |
| 341 |
} |
| 342 |
't |
| 343 |
if$ |
| 344 |
nameptr #1 + 'nameptr := |
| 345 |
namesleft #1 - 'namesleft := |
| 346 |
} |
| 347 |
while$ |
| 348 |
} |
| 349 |
|
| 350 |
FUNCTION {format.authors} |
| 351 |
{ author empty$ |
| 352 |
{ "" } |
| 353 |
{ author format.names } |
| 354 |
if$ |
| 355 |
} |
| 356 |
|
| 357 |
FUNCTION {format.editors} |
| 358 |
{ editor empty$ |
| 359 |
{ "" } |
| 360 |
{ editor format.names |
| 361 |
editor num.names$ #1 > |
| 362 |
{ " (eds.)" * } |
| 363 |
{ " (ed.)" * } |
| 364 |
if$ |
| 365 |
} |
| 366 |
if$ |
| 367 |
} |
| 368 |
|
| 369 |
FUNCTION {format.nonauthor.editors} |
| 370 |
{ editor empty$ |
| 371 |
{ "" } |
| 372 |
{ editor format.names |
| 373 |
editor num.names$ #1 > |
| 374 |
{ ", eds." * } |
| 375 |
{ ", ed." * } |
| 376 |
if$ |
| 377 |
} |
| 378 |
if$ |
| 379 |
} |
| 380 |
|
| 381 |
FUNCTION {format.title} |
| 382 |
{ title empty$ |
| 383 |
{ "" } |
| 384 |
{ title "t" change.case$ emphasize } |
| 385 |
if$ |
| 386 |
} |
| 387 |
|
| 388 |
FUNCTION {format.journal.vol.year} |
| 389 |
{ fjournal empty$ |
| 390 |
{ journal empty$ |
| 391 |
{ "journal name" missing.warning ""} |
| 392 |
{ journal } |
| 393 |
if$ } |
| 394 |
{ fjournal } |
| 395 |
if$ |
| 396 |
volume empty$ |
| 397 |
'skip$ |
| 398 |
{ " \textbf{" * volume * "}" * } |
| 399 |
if$ |
| 400 |
year empty$ |
| 401 |
{ "year" missing.warning } |
| 402 |
{ " (" * year * ")" * } |
| 403 |
if$ |
| 404 |
} |
| 405 |
|
| 406 |
% For formatting the issue number for a journal article. |
| 407 |
|
| 408 |
FUNCTION {format.number} |
| 409 |
{ number empty$ |
| 410 |
{ "" } |
| 411 |
{ "no.~" number * } |
| 412 |
if$ |
| 413 |
} |
| 414 |
|
| 415 |
% For formatting miscellaneous dates |
| 416 |
|
| 417 |
FUNCTION {format.date} |
| 418 |
{ year empty$ |
| 419 |
{ month empty$ |
| 420 |
{ "" } |
| 421 |
{ "there's a month but no year in " cite$ * warning$ |
| 422 |
month |
| 423 |
} |
| 424 |
if$ |
| 425 |
} |
| 426 |
{ month empty$ |
| 427 |
'year |
| 428 |
{ month " " * year * } |
| 429 |
if$ |
| 430 |
} |
| 431 |
if$ |
| 432 |
} |
| 433 |
|
| 434 |
%% The volume, series and number information is sort of tricky. |
| 435 |
%% This code handles it as follows: |
| 436 |
%% If the series is present, and the volume, but not the number, |
| 437 |
%% then we do "\emph{Book title}, Series Name, vol. 000" |
| 438 |
%% If the series is present, and the number, but not the volume, |
| 439 |
%% then we do "\emph{Book title}, Series Name, no. 000" |
| 440 |
%% If the series is present, and both number and volume, |
| 441 |
%% then we do "\emph{Book title}, vol. XX, Series Name, no. 000" |
| 442 |
%% Finally, if the series is absent, |
| 443 |
%% then we do "\emph{Book title}, vol. XX" |
| 444 |
%% or "\emph{Book title}, no. 000" |
| 445 |
%% and if both volume and number are present, give a warning message. |
| 446 |
|
| 447 |
FUNCTION {format.bookvolume.series.number} |
| 448 |
{ volume empty$ |
| 449 |
{ "" % Push the empty string as a placeholder in case everything else |
| 450 |
% is empty too. |
| 451 |
series empty$ |
| 452 |
'skip$ |
| 453 |
{ pop$ series } % if series is not empty put in stack |
| 454 |
if$ |
| 455 |
number empty$ |
| 456 |
'skip$ |
| 457 |
{ duplicate$ empty$ % if no preceding material, |
| 458 |
'skip$ % do nothing, otherwise |
| 459 |
{ ", " * } % add a comma and space to separate. |
| 460 |
if$ |
| 461 |
"no." number tie.or.space.connect * % add the number information |
| 462 |
} |
| 463 |
if$ |
| 464 |
} |
| 465 |
%% If the volume is NOT EMPTY: |
| 466 |
{ "vol." volume tie.or.space.connect % vol. XX |
| 467 |
number empty$ |
| 468 |
{ series empty$ |
| 469 |
'skip$ |
| 470 |
{ series ", " * swap$ *} % Series Name, vol. XX |
| 471 |
if$ |
| 472 |
} |
| 473 |
{ series empty$ |
| 474 |
{ "can't use both volume and number if series info is missing" |
| 475 |
warning$ |
| 476 |
"in BibTeX entry type `" type$ * "'" * top$ |
| 477 |
} |
| 478 |
{ ", " * series * ", no." * number tie.or.space.connect } |
| 479 |
if$ |
| 480 |
} |
| 481 |
if$ |
| 482 |
} |
| 483 |
if$ |
| 484 |
|
| 485 |
} % end of format.bookvolume.series.number |
| 486 |
|
| 487 |
%% format.inproc.title.where.editors is used by inproceedings entry types |
| 488 |
|
| 489 |
%% No case changing or emphasizing for the title. We want initial |
| 490 |
%% caps, roman. |
| 491 |
%% We add parentheses around the address (place where conference |
| 492 |
%% was held). |
| 493 |
%% Likewise we add parentheses around the editors' names. |
| 494 |
|
| 495 |
FUNCTION {format.inproc.title.address.editors} |
| 496 |
{ booktitle empty$ |
| 497 |
{ "" } |
| 498 |
{ booktitle |
| 499 |
address empty$ |
| 500 |
'skip$ |
| 501 |
{ add.space.if.necessary "(" * address * ")" * } |
| 502 |
if$ |
| 503 |
editor empty$ |
| 504 |
'skip$ |
| 505 |
{ add.space.if.necessary "(" * format.nonauthor.editors * ")" * } |
| 506 |
if$ |
| 507 |
} |
| 508 |
if$ |
| 509 |
} |
| 510 |
|
| 511 |
%% format.incoll.title.editors is similar to format.inproc... but |
| 512 |
%% omits the address. For collections that are not proceedings volumes. |
| 513 |
|
| 514 |
FUNCTION {format.incoll.title.editors} |
| 515 |
{ booktitle empty$ |
| 516 |
{ "" } |
| 517 |
{ editor empty$ |
| 518 |
{ booktitle } |
| 519 |
{ booktitle |
| 520 |
add.space.if.necessary "(" * format.nonauthor.editors * ")" * |
| 521 |
} |
| 522 |
if$ |
| 523 |
} |
| 524 |
if$ |
| 525 |
} |
| 526 |
|
| 527 |
FUNCTION {format.edition} |
| 528 |
{ edition empty$ |
| 529 |
{ "" } |
| 530 |
{ output.state mid.sentence = |
| 531 |
{ edition "l" change.case$ " ed." * } |
| 532 |
{ edition "t" change.case$ " ed." * } |
| 533 |
if$ |
| 534 |
} |
| 535 |
if$ |
| 536 |
} |
| 537 |
|
| 538 |
INTEGERS { multiresult } |
| 539 |
|
| 540 |
FUNCTION {multi.page.check} |
| 541 |
{ 't := |
| 542 |
#0 'multiresult := |
| 543 |
{ multiresult not |
| 544 |
t empty$ not |
| 545 |
and |
| 546 |
} |
| 547 |
{ t #1 #1 substring$ |
| 548 |
duplicate$ "-" = |
| 549 |
swap$ duplicate$ "," = |
| 550 |
swap$ "+" = |
| 551 |
or or |
| 552 |
{ #1 'multiresult := } |
| 553 |
{ t #2 global.max$ substring$ 't := } |
| 554 |
if$ |
| 555 |
} |
| 556 |
while$ |
| 557 |
multiresult |
| 558 |
} |
| 559 |
|
| 560 |
FUNCTION {format.pages} |
| 561 |
{ pages empty$ |
| 562 |
{ "" } |
| 563 |
{ pages n.dashify } |
| 564 |
if$ |
| 565 |
} |
| 566 |
|
| 567 |
FUNCTION {format.book.pages} |
| 568 |
{ pages empty$ |
| 569 |
{ "" } |
| 570 |
{ pages multi.page.check |
| 571 |
{ "pp.~" pages n.dashify * } |
| 572 |
{ "p.~" pages * } |
| 573 |
if$ |
| 574 |
} |
| 575 |
if$ |
| 576 |
} |
| 577 |
|
| 578 |
FUNCTION {format.chapter.pages} |
| 579 |
{ chapter empty$ |
| 580 |
'format.book.pages |
| 581 |
{ type empty$ |
| 582 |
{ "ch.~" } |
| 583 |
{ type "l" change.case$ " " * } |
| 584 |
if$ |
| 585 |
chapter * |
| 586 |
pages empty$ |
| 587 |
'skip$ |
| 588 |
{ ", " * format.book.pages * } |
| 589 |
if$ |
| 590 |
} |
| 591 |
if$ |
| 592 |
} |
| 593 |
|
| 594 |
FUNCTION {empty.misc.check} |
| 595 |
{ author empty$ title empty$ howpublished empty$ |
| 596 |
month empty$ year empty$ note empty$ |
| 597 |
and and and and and |
| 598 |
key empty$ not and |
| 599 |
{ "all relevant fields are empty in " cite$ * warning$ } |
| 600 |
'skip$ |
| 601 |
if$ |
| 602 |
} |
| 603 |
|
| 604 |
FUNCTION {format.thesis.type} |
| 605 |
{ type empty$ |
| 606 |
'skip$ |
| 607 |
{ pop$ |
| 608 |
type "t" change.case$ |
| 609 |
} |
| 610 |
if$ |
| 611 |
} |
| 612 |
|
| 613 |
FUNCTION {format.tr.number} |
| 614 |
{ type empty$ |
| 615 |
{ "Tech. Report" } |
| 616 |
'type |
| 617 |
if$ |
| 618 |
number empty$ |
| 619 |
{ "t" change.case$ } |
| 620 |
{ number tie.or.space.connect } |
| 621 |
if$ |
| 622 |
} |
| 623 |
|
| 624 |
% The format.crossref functions haven't been paid much attention |
| 625 |
% at the present time (June 1990) and could probably use some |
| 626 |
% work. MJD |
| 627 |
|
| 628 |
FUNCTION {format.article.crossref} |
| 629 |
{ key empty$ |
| 630 |
{ journal empty$ |
| 631 |
{ "need key or journal for " cite$ * " to crossref " * crossref * |
| 632 |
warning$ |
| 633 |
"" |
| 634 |
} |
| 635 |
{ "in " journal * } |
| 636 |
if$ |
| 637 |
} |
| 638 |
{ "in " key * } |
| 639 |
if$ |
| 640 |
" \cite{" * crossref * "}" * |
| 641 |
} |
| 642 |
|
| 643 |
FUNCTION {format.crossref.editor} |
| 644 |
{ editor #1 "{vv~}{ll}" format.name$ |
| 645 |
editor num.names$ duplicate$ |
| 646 |
#2 > |
| 647 |
{ pop$ " et~al." * } |
| 648 |
{ #2 < |
| 649 |
'skip$ |
| 650 |
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
| 651 |
{ " et~al." * } |
| 652 |
{ " and " * editor #2 "{vv~}{ll}" format.name$ * } |
| 653 |
if$ |
| 654 |
} |
| 655 |
if$ |
| 656 |
} |
| 657 |
if$ |
| 658 |
} |
| 659 |
|
| 660 |
FUNCTION {format.book.crossref} |
| 661 |
{ volume empty$ |
| 662 |
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
| 663 |
"in " |
| 664 |
} |
| 665 |
{ "vol." volume tie.or.space.connect |
| 666 |
" of " * |
| 667 |
} |
| 668 |
if$ |
| 669 |
editor empty$ |
| 670 |
editor field.or.null author field.or.null = |
| 671 |
or |
| 672 |
{ key empty$ |
| 673 |
{ series empty$ |
| 674 |
{ "need editor, key, or series for " cite$ * " to crossref " * |
| 675 |
crossref * warning$ |
| 676 |
"" * |
| 677 |
} |
| 678 |
{ series * } |
| 679 |
if$ |
| 680 |
} |
| 681 |
{ key * } |
| 682 |
if$ |
| 683 |
} |
| 684 |
{ format.crossref.editor * } |
| 685 |
if$ |
| 686 |
" \cite{" * crossref * "}" * |
| 687 |
} |
| 688 |
|
| 689 |
FUNCTION {format.incoll.inproc.crossref} |
| 690 |
{ editor empty$ |
| 691 |
editor field.or.null author field.or.null = |
| 692 |
or |
| 693 |
{ key empty$ |
| 694 |
{ booktitle empty$ |
| 695 |
{ "need editor, key, or booktitle for " cite$ * " to crossref " * |
| 696 |
crossref * warning$ |
| 697 |
"" |
| 698 |
} |
| 699 |
{ "in \emph{" booktitle * "}" * } |
| 700 |
if$ |
| 701 |
} |
| 702 |
{ "in " key * } |
| 703 |
if$ |
| 704 |
} |
| 705 |
{ "in " format.crossref.editor * } |
| 706 |
if$ |
| 707 |
" \cite{" * crossref * "}" * |
| 708 |
} |
| 709 |
|
| 710 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 711 |
|
| 712 |
% The main functions for each entry type. |
| 713 |
|
| 714 |
% journal, vol and year are formatted together because they are |
| 715 |
% not separated by commas. |
| 716 |
|
| 717 |
FUNCTION {article} |
| 718 |
{ output.bibitem |
| 719 |
format.authors "author" output.check |
| 720 |
format.title "title" output.check |
| 721 |
crossref missing$ |
| 722 |
{ format.journal.vol.year output |
| 723 |
format.number output |
| 724 |
format.pages "pages" output.check |
| 725 |
} |
| 726 |
{ format.article.crossref output.nonnull |
| 727 |
format.pages "pages" output.check |
| 728 |
} |
| 729 |
if$ |
| 730 |
format.language * |
| 731 |
note output |
| 732 |
fin.entry |
| 733 |
} |
| 734 |
|
| 735 |
FUNCTION {book} |
| 736 |
{ output.bibitem |
| 737 |
author empty$ |
| 738 |
{ format.editors "author and editor" output.check } |
| 739 |
{ format.authors output.nonnull |
| 740 |
crossref missing$ |
| 741 |
{ "author and editor" editor either.or.check } |
| 742 |
'skip$ |
| 743 |
if$ |
| 744 |
} |
| 745 |
if$ |
| 746 |
format.title "title" output.check |
| 747 |
format.edition output |
| 748 |
crossref missing$ |
| 749 |
{ format.bookvolume.series.number output |
| 750 |
publisher "publisher" output.check |
| 751 |
address output |
| 752 |
} |
| 753 |
{ format.book.crossref output.nonnull |
| 754 |
} |
| 755 |
if$ |
| 756 |
format.date "year" output.check |
| 757 |
format.language * |
| 758 |
note output |
| 759 |
fin.entry |
| 760 |
} |
| 761 |
|
| 762 |
FUNCTION {booklet} |
| 763 |
{ output.bibitem |
| 764 |
format.authors output |
| 765 |
format.title "title" output.check |
| 766 |
howpublished output |
| 767 |
address output |
| 768 |
format.date output |
| 769 |
note output |
| 770 |
fin.entry |
| 771 |
} |
| 772 |
|
| 773 |
FUNCTION {inbook} |
| 774 |
{ output.bibitem |
| 775 |
author empty$ |
| 776 |
{ format.editors "author and editor" output.check } |
| 777 |
{ format.authors output.nonnull |
| 778 |
crossref missing$ |
| 779 |
{ "author and editor" editor either.or.check } |
| 780 |
'skip$ |
| 781 |
if$ |
| 782 |
} |
| 783 |
if$ |
| 784 |
format.title "title" output.check |
| 785 |
format.edition output |
| 786 |
crossref missing$ |
| 787 |
{ format.bookvolume.series.number output |
| 788 |
format.chapter.pages "chapter and pages" output.check |
| 789 |
publisher "publisher" output.check |
| 790 |
address output |
| 791 |
} |
| 792 |
{ format.chapter.pages "chapter and pages" output.check |
| 793 |
format.book.crossref output.nonnull |
| 794 |
} |
| 795 |
if$ |
| 796 |
format.date "year" output.check |
| 797 |
format.language * |
| 798 |
note output |
| 799 |
fin.entry |
| 800 |
} |
| 801 |
|
| 802 |
FUNCTION {incollection} |
| 803 |
{ output.bibitem |
| 804 |
format.authors "author" output.check |
| 805 |
format.title "title" output.check |
| 806 |
crossref missing$ |
| 807 |
{ format.incoll.title.editors "booktitle" output.check |
| 808 |
format.bookvolume.series.number output |
| 809 |
publisher "publisher" output.check |
| 810 |
address output |
| 811 |
format.edition output |
| 812 |
format.date "year" output.check |
| 813 |
} |
| 814 |
{ format.incoll.inproc.crossref output.nonnull |
| 815 |
} |
| 816 |
if$ |
| 817 |
note output |
| 818 |
format.book.pages output |
| 819 |
format.language * |
| 820 |
fin.entry |
| 821 |
} |
| 822 |
|
| 823 |
FUNCTION {inproceedings} |
| 824 |
{ output.bibitem |
| 825 |
format.authors "author" output.check |
| 826 |
format.title "title" output.check |
| 827 |
crossref missing$ |
| 828 |
{ format.inproc.title.address.editors "booktitle" output.check |
| 829 |
format.bookvolume.series.number output |
| 830 |
organization output |
| 831 |
publisher output |
| 832 |
format.date "year" output.check |
| 833 |
} |
| 834 |
{ format.incoll.inproc.crossref output.nonnull |
| 835 |
} |
| 836 |
if$ |
| 837 |
note output |
| 838 |
format.book.pages output |
| 839 |
format.language * |
| 840 |
fin.entry |
| 841 |
} |
| 842 |
|
| 843 |
FUNCTION {conference} { inproceedings } |
| 844 |
|
| 845 |
FUNCTION {manual} |
| 846 |
{ output.bibitem |
| 847 |
author empty$ |
| 848 |
{ organization empty$ |
| 849 |
'skip$ |
| 850 |
{ organization output.nonnull |
| 851 |
address output |
| 852 |
} |
| 853 |
if$ |
| 854 |
} |
| 855 |
{ format.authors output.nonnull } |
| 856 |
if$ |
| 857 |
format.title "title" output.check |
| 858 |
author empty$ |
| 859 |
{ organization empty$ |
| 860 |
{ address output } |
| 861 |
'skip$ |
| 862 |
if$ |
| 863 |
} |
| 864 |
{ organization output |
| 865 |
address output |
| 866 |
} |
| 867 |
if$ |
| 868 |
format.edition output |
| 869 |
format.date output |
| 870 |
note output |
| 871 |
fin.entry |
| 872 |
} |
| 873 |
|
| 874 |
FUNCTION {mastersthesis} |
| 875 |
{ output.bibitem |
| 876 |
format.authors "author" output.check |
| 877 |
format.title "title" output.check |
| 878 |
"Master's thesis" format.thesis.type output.nonnull |
| 879 |
school "school" output.check |
| 880 |
address output |
| 881 |
format.date "year" output.check |
| 882 |
note output |
| 883 |
format.book.pages output |
| 884 |
fin.entry |
| 885 |
} |
| 886 |
|
| 887 |
FUNCTION {misc} |
| 888 |
{ output.bibitem |
| 889 |
format.authors output |
| 890 |
format.title output |
| 891 |
howpublished output |
| 892 |
format.date output |
| 893 |
note output |
| 894 |
format.book.pages output |
| 895 |
fin.entry |
| 896 |
empty.misc.check |
| 897 |
} |
| 898 |
|
| 899 |
FUNCTION {phdthesis} |
| 900 |
{ output.bibitem |
| 901 |
format.authors "author" output.check |
| 902 |
format.title "title" output.check |
| 903 |
"Ph.D. thesis" format.thesis.type output.nonnull |
| 904 |
school "school" output.check |
| 905 |
address output |
| 906 |
format.date "year" output.check |
| 907 |
note output |
| 908 |
format.book.pages output |
| 909 |
fin.entry |
| 910 |
} |
| 911 |
|
| 912 |
FUNCTION {proceedings} |
| 913 |
{ output.bibitem |
| 914 |
editor empty$ |
| 915 |
{ organization output } |
| 916 |
{ format.editors output.nonnull } |
| 917 |
if$ |
| 918 |
format.title "title" output.check |
| 919 |
format.bookvolume.series.number output |
| 920 |
address empty$ |
| 921 |
{ editor empty$ |
| 922 |
'skip$ |
| 923 |
{ organization output } |
| 924 |
if$ |
| 925 |
publisher output |
| 926 |
format.date "year" output.check |
| 927 |
} |
| 928 |
{ address output.nonnull |
| 929 |
editor empty$ |
| 930 |
'skip$ |
| 931 |
{ organization output } |
| 932 |
if$ |
| 933 |
publisher output |
| 934 |
format.date "year" output.check |
| 935 |
} |
| 936 |
if$ |
| 937 |
note output |
| 938 |
fin.entry |
| 939 |
} |
| 940 |
|
| 941 |
FUNCTION {techreport} |
| 942 |
{ output.bibitem |
| 943 |
format.authors "author" output.check |
| 944 |
format.title "title" output.check |
| 945 |
format.tr.number output.nonnull |
| 946 |
institution "institution" output.check |
| 947 |
address output |
| 948 |
format.date "year" output.check |
| 949 |
note output |
| 950 |
fin.entry |
| 951 |
} |
| 952 |
|
| 953 |
FUNCTION {unpublished} |
| 954 |
{ output.bibitem |
| 955 |
format.authors "author" output.check |
| 956 |
format.title "title" output.check |
| 957 |
note "note" output.check |
| 958 |
format.date output |
| 959 |
fin.entry |
| 960 |
} |
| 961 |
|
| 962 |
FUNCTION {default.type} { misc } |
| 963 |
|
| 964 |
MACRO {jan} {"January"} |
| 965 |
|
| 966 |
MACRO {feb} {"February"} |
| 967 |
|
| 968 |
MACRO {mar} {"March"} |
| 969 |
|
| 970 |
MACRO {apr} {"April"} |
| 971 |
|
| 972 |
MACRO {may} {"May"} |
| 973 |
|
| 974 |
MACRO {jun} {"June"} |
| 975 |
|
| 976 |
MACRO {jul} {"July"} |
| 977 |
|
| 978 |
MACRO {aug} {"August"} |
| 979 |
|
| 980 |
MACRO {sep} {"September"} |
| 981 |
|
| 982 |
MACRO {oct} {"October"} |
| 983 |
|
| 984 |
MACRO {nov} {"November"} |
| 985 |
|
| 986 |
MACRO {dec} {"December"} |
| 987 |
|
| 988 |
READ |
| 989 |
|
| 990 |
FUNCTION {sortify} |
| 991 |
{ purify$ |
| 992 |
"l" change.case$ |
| 993 |
} |
| 994 |
|
| 995 |
INTEGERS { len } |
| 996 |
|
| 997 |
FUNCTION {chop.word} |
| 998 |
{ 's := |
| 999 |
'len := |
| 1000 |
s #1 len substring$ = |
| 1001 |
{ s len #1 + global.max$ substring$ } |
| 1002 |
's |
| 1003 |
if$ |
| 1004 |
} |
| 1005 |
|
| 1006 |
FUNCTION {sort.format.names} |
| 1007 |
{ 's := |
| 1008 |
#1 'nameptr := |
| 1009 |
"" |
| 1010 |
s num.names$ 'numnames := |
| 1011 |
numnames 'namesleft := |
| 1012 |
{ namesleft #0 > } |
| 1013 |
{ nameptr #1 > |
| 1014 |
{ " " * } |
| 1015 |
'skip$ |
| 1016 |
if$ |
| 1017 |
s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't := |
| 1018 |
nameptr numnames = t "others" = and |
| 1019 |
{ "et al" * } |
| 1020 |
{ t sortify * } |
| 1021 |
if$ |
| 1022 |
nameptr #1 + 'nameptr := |
| 1023 |
namesleft #1 - 'namesleft := |
| 1024 |
} |
| 1025 |
while$ |
| 1026 |
} |
| 1027 |
|
| 1028 |
FUNCTION {sort.format.title} |
| 1029 |
{ 't := |
| 1030 |
"A " #2 |
| 1031 |
"An " #3 |
| 1032 |
"The " #4 t chop.word |
| 1033 |
chop.word |
| 1034 |
chop.word |
| 1035 |
sortify |
| 1036 |
#1 global.max$ substring$ |
| 1037 |
} |
| 1038 |
|
| 1039 |
FUNCTION {author.sort} |
| 1040 |
{ author empty$ |
| 1041 |
{ key empty$ |
| 1042 |
{ "to sort, need author or key in " cite$ * warning$ |
| 1043 |
"" |
| 1044 |
} |
| 1045 |
{ key sortify } |
| 1046 |
if$ |
| 1047 |
} |
| 1048 |
{ author sort.format.names } |
| 1049 |
if$ |
| 1050 |
} |
| 1051 |
|
| 1052 |
FUNCTION {author.editor.sort} |
| 1053 |
{ author empty$ |
| 1054 |
{ editor empty$ |
| 1055 |
{ key empty$ |
| 1056 |
{ "to sort, need author, editor, or key in " cite$ * warning$ |
| 1057 |
"" |
| 1058 |
} |
| 1059 |
{ key sortify } |
| 1060 |
if$ |
| 1061 |
} |
| 1062 |
{ editor sort.format.names } |
| 1063 |
if$ |
| 1064 |
} |
| 1065 |
{ author sort.format.names } |
| 1066 |
if$ |
| 1067 |
} |
| 1068 |
|
| 1069 |
FUNCTION {author.organization.sort} |
| 1070 |
{ author empty$ |
| 1071 |
{ organization empty$ |
| 1072 |
{ key empty$ |
| 1073 |
{ "to sort, need author, organization, or key in " cite$ * warning$ |
| 1074 |
"" |
| 1075 |
} |
| 1076 |
{ key sortify } |
| 1077 |
if$ |
| 1078 |
} |
| 1079 |
{ "The " #4 organization chop.word sortify } |
| 1080 |
if$ |
| 1081 |
} |
| 1082 |
{ author sort.format.names } |
| 1083 |
if$ |
| 1084 |
} |
| 1085 |
|
| 1086 |
FUNCTION {editor.organization.sort} |
| 1087 |
{ editor empty$ |
| 1088 |
{ organization empty$ |
| 1089 |
{ key empty$ |
| 1090 |
{ "to sort, need editor, organization, or key in " cite$ * warning$ |
| 1091 |
"" |
| 1092 |
} |
| 1093 |
{ key sortify } |
| 1094 |
if$ |
| 1095 |
} |
| 1096 |
{ "The " #4 organization chop.word sortify } |
| 1097 |
if$ |
| 1098 |
} |
| 1099 |
{ editor sort.format.names } |
| 1100 |
if$ |
| 1101 |
} |
| 1102 |
|
| 1103 |
FUNCTION {presort} |
| 1104 |
{ type$ "book" = |
| 1105 |
type$ "inbook" = |
| 1106 |
or |
| 1107 |
'author.editor.sort |
| 1108 |
{ type$ "proceedings" = |
| 1109 |
'editor.organization.sort |
| 1110 |
{ type$ "manual" = |
| 1111 |
'author.organization.sort |
| 1112 |
'author.sort |
| 1113 |
if$ |
| 1114 |
} |
| 1115 |
if$ |
| 1116 |
} |
| 1117 |
if$ |
| 1118 |
" " |
| 1119 |
* |
| 1120 |
year field.or.null sortify |
| 1121 |
* |
| 1122 |
" " |
| 1123 |
* |
| 1124 |
title field.or.null |
| 1125 |
sort.format.title |
| 1126 |
* |
| 1127 |
#1 entry.max$ substring$ |
| 1128 |
'sort.key$ := |
| 1129 |
} |
| 1130 |
|
| 1131 |
ITERATE {presort} |
| 1132 |
|
| 1133 |
SORT |
| 1134 |
|
| 1135 |
STRINGS { longest.label prev.author this.author } |
| 1136 |
|
| 1137 |
INTEGERS { number.label longest.label.width } |
| 1138 |
|
| 1139 |
FUNCTION {initialize.longest.label} |
| 1140 |
{ "" 'longest.label := |
| 1141 |
#1 'number.label := |
| 1142 |
#0 'longest.label.width := |
| 1143 |
"abcxyz" 'prev.author := |
| 1144 |
"" 'this.author := |
| 1145 |
} |
| 1146 |
|
| 1147 |
FUNCTION {longest.label.pass} |
| 1148 |
{ number.label int.to.str$ 'label := |
| 1149 |
number.label #1 + 'number.label := |
| 1150 |
label width$ longest.label.width > |
| 1151 |
{ label 'longest.label := |
| 1152 |
label width$ 'longest.label.width := |
| 1153 |
} |
| 1154 |
'skip$ |
| 1155 |
if$ |
| 1156 |
author empty$ |
| 1157 |
{ editor empty$ |
| 1158 |
{ "" } |
| 1159 |
'editor |
| 1160 |
if$ |
| 1161 |
} |
| 1162 |
'author |
| 1163 |
if$ |
| 1164 |
'this.author := |
| 1165 |
} |
| 1166 |
|
| 1167 |
EXECUTE {initialize.longest.label} |
| 1168 |
|
| 1169 |
ITERATE {longest.label.pass} |
| 1170 |
|
| 1171 |
FUNCTION {write.lines} |
| 1172 |
{ { duplicate$ "." = NOT } |
| 1173 |
{ write$ newline$ } |
| 1174 |
while$ |
| 1175 |
pop$ |
| 1176 |
} |
| 1177 |
|
| 1178 |
FUNCTION {begin.bib} |
| 1179 |
{ preamble$ empty$ |
| 1180 |
'skip$ |
| 1181 |
{ preamble$ write$ newline$ } |
| 1182 |
if$ |
| 1183 |
"\providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR }" |
| 1184 |
write$ newline$ |
| 1185 |
"% \MRhref is called by the amsart/book/proc definition of \MR." |
| 1186 |
write$ newline$ |
| 1187 |
"\providecommand{\MRhref}[2]{%" |
| 1188 |
write$ newline$ |
| 1189 |
" \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}" |
| 1190 |
write$ newline$ |
| 1191 |
"}" |
| 1192 |
write$ newline$ |
| 1193 |
"\providecommand{\href}[2]{#2}" |
| 1194 |
write$ newline$ |
| 1195 |
"\begin{thebibliography}{" longest.label * "}" * |
| 1196 |
write$ newline$ |
| 1197 |
} |
| 1198 |
|
| 1199 |
EXECUTE {begin.bib} |
| 1200 |
|
| 1201 |
EXECUTE {init.state.consts} |
| 1202 |
|
| 1203 |
ITERATE {call.type$} |
| 1204 |
|
| 1205 |
FUNCTION {end.bib} |
| 1206 |
{ newline$ |
| 1207 |
"\end{thebibliography}" write$ newline$ |
| 1208 |
} |
| 1209 |
|
| 1210 |
EXECUTE {end.bib} |
| 1211 |
%% \CharacterTable |
| 1212 |
%% {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 |
| 1213 |
%% 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 |
| 1214 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 1215 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 1216 |
%% Dollar \$ Percent \% Ampersand \& |
| 1217 |
%% Acute accent \' Left paren \( Right paren \) |
| 1218 |
%% Asterisk \* Plus \+ Comma \, |
| 1219 |
%% Minus \- Point \. Solidus \/ |
| 1220 |
%% Colon \: Semicolon \; Less than \< |
| 1221 |
%% Equals \= Greater than \> Question mark \? |
| 1222 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 1223 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 1224 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 1225 |
%% Right brace \} Tilde \~} |
| 1226 |
|