[593] | 1 | %% |
---|
| 2 | %% This is file `model3a-num-names.bst', |
---|
| 3 | %% |
---|
| 4 | %% Copyright 2009 Elsevier Ltd |
---|
| 5 | %% |
---|
| 6 | %% This file is part of the 'Elsarticle Bundle'. |
---|
| 7 | %% --------------------------------------------- |
---|
| 8 | %% |
---|
| 9 | %% It may be distributed under the conditions of the LaTeX Project Public |
---|
| 10 | %% License, either version 1.2 of this license or (at your option) any |
---|
| 11 | %% later version. The latest version of this license is in |
---|
| 12 | %% http://www.latex-project.org/lppl.txt |
---|
| 13 | %% and version 1.2 or later is part of all distributions of LaTeX |
---|
| 14 | %% version 1999/12/01 or later. |
---|
| 15 | %% |
---|
| 16 | %% $Id: model3a-num-names.bst 161 2009-10-08 06:57:45Z rishi $ |
---|
| 17 | %% |
---|
| 18 | %% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/New-Model-3a/model3a-num-names.bst $ |
---|
| 19 | %% |
---|
| 20 | ENTRY |
---|
| 21 | { address |
---|
| 22 | archive |
---|
| 23 | author |
---|
| 24 | booktitle |
---|
| 25 | chapter |
---|
| 26 | collaboration |
---|
| 27 | doi |
---|
| 28 | edition |
---|
| 29 | editor |
---|
| 30 | eid |
---|
| 31 | eprint |
---|
| 32 | howpublished |
---|
| 33 | institution |
---|
| 34 | isbn |
---|
| 35 | journal |
---|
| 36 | key |
---|
| 37 | month |
---|
| 38 | note |
---|
| 39 | number |
---|
| 40 | numpages |
---|
| 41 | organization |
---|
| 42 | pages |
---|
| 43 | publisher |
---|
| 44 | school |
---|
| 45 | series |
---|
| 46 | title |
---|
| 47 | type |
---|
| 48 | url |
---|
| 49 | volume |
---|
| 50 | year |
---|
| 51 | } |
---|
| 52 | {} |
---|
| 53 | { label extra.label sort.label short.list } |
---|
| 54 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } |
---|
| 55 | FUNCTION {init.state.consts} |
---|
| 56 | { #0 'before.all := |
---|
| 57 | #1 'mid.sentence := |
---|
| 58 | #2 'after.sentence := |
---|
| 59 | #3 'after.block := |
---|
| 60 | } |
---|
| 61 | STRINGS { s t} |
---|
| 62 | FUNCTION {output.nonnull} |
---|
| 63 | { 's := |
---|
| 64 | output.state mid.sentence = |
---|
| 65 | { "; " * write$ } |
---|
| 66 | { output.state after.block = |
---|
| 67 | { add.period$ write$ |
---|
| 68 | newline$ |
---|
| 69 | "\newblock " write$ |
---|
| 70 | } |
---|
| 71 | { output.state before.all = |
---|
| 72 | 'write$ |
---|
| 73 | { add.period$ " " * write$ } |
---|
| 74 | if$ |
---|
| 75 | } |
---|
| 76 | if$ |
---|
| 77 | mid.sentence 'output.state := |
---|
| 78 | } |
---|
| 79 | if$ |
---|
| 80 | s |
---|
| 81 | } |
---|
| 82 | FUNCTION {output} |
---|
| 83 | { duplicate$ empty$ |
---|
| 84 | 'pop$ |
---|
| 85 | 'output.nonnull |
---|
| 86 | if$ |
---|
| 87 | } |
---|
| 88 | FUNCTION {output.check} |
---|
| 89 | { 't := |
---|
| 90 | duplicate$ empty$ |
---|
| 91 | { pop$ "empty " t * " in " * cite$ * warning$ } |
---|
| 92 | 'output.nonnull |
---|
| 93 | if$ |
---|
| 94 | } |
---|
| 95 | FUNCTION {fin.entry} |
---|
| 96 | { add.period$ |
---|
| 97 | write$ |
---|
| 98 | newline$ |
---|
| 99 | } |
---|
| 100 | |
---|
| 101 | FUNCTION {new.block} |
---|
| 102 | { output.state before.all = |
---|
| 103 | 'skip$ |
---|
| 104 | { after.block 'output.state := } |
---|
| 105 | if$ |
---|
| 106 | } |
---|
| 107 | FUNCTION {new.sentence} |
---|
| 108 | { output.state after.block = |
---|
| 109 | 'skip$ |
---|
| 110 | { output.state before.all = |
---|
| 111 | 'skip$ |
---|
| 112 | { after.sentence 'output.state := } |
---|
| 113 | if$ |
---|
| 114 | } |
---|
| 115 | if$ |
---|
| 116 | } |
---|
| 117 | FUNCTION {add.blank} |
---|
| 118 | { " " * before.all 'output.state := |
---|
| 119 | } |
---|
| 120 | |
---|
| 121 | FUNCTION {no.blank.or.punct} |
---|
| 122 | { "\hspace{0pt}" * before.all 'output.state := |
---|
| 123 | } |
---|
| 124 | |
---|
| 125 | FUNCTION {date.block} |
---|
| 126 | { |
---|
| 127 | ";" * |
---|
| 128 | no.blank.or.punct |
---|
| 129 | } |
---|
| 130 | |
---|
| 131 | FUNCTION {book.date.block} |
---|
| 132 | { |
---|
| 133 | ", " * |
---|
| 134 | no.blank.or.punct |
---|
| 135 | } |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | FUNCTION {not} |
---|
| 139 | { { #0 } |
---|
| 140 | { #1 } |
---|
| 141 | if$ |
---|
| 142 | } |
---|
| 143 | FUNCTION {and} |
---|
| 144 | { 'skip$ |
---|
| 145 | { pop$ #0 } |
---|
| 146 | if$ |
---|
| 147 | } |
---|
| 148 | FUNCTION {or} |
---|
| 149 | { { pop$ #1 } |
---|
| 150 | 'skip$ |
---|
| 151 | if$ |
---|
| 152 | } |
---|
| 153 | STRINGS {z} |
---|
| 154 | FUNCTION {remove.dots} |
---|
| 155 | { 'z := |
---|
| 156 | "" |
---|
| 157 | { z empty$ not } |
---|
| 158 | { z #1 #1 substring$ |
---|
| 159 | z #2 global.max$ substring$ 'z := |
---|
| 160 | duplicate$ "." = 'pop$ |
---|
| 161 | { * } |
---|
| 162 | if$ |
---|
| 163 | } |
---|
| 164 | while$ |
---|
| 165 | } |
---|
| 166 | FUNCTION {new.block.checkb} |
---|
| 167 | { empty$ |
---|
| 168 | swap$ empty$ |
---|
| 169 | and |
---|
| 170 | 'skip$ |
---|
| 171 | 'new.block |
---|
| 172 | if$ |
---|
| 173 | } |
---|
| 174 | FUNCTION {field.or.null} |
---|
| 175 | { duplicate$ empty$ |
---|
| 176 | { pop$ "" } |
---|
| 177 | 'skip$ |
---|
| 178 | if$ |
---|
| 179 | } |
---|
| 180 | FUNCTION {emphasize} |
---|
| 181 | { duplicate$ empty$ |
---|
| 182 | { pop$ "" } |
---|
| 183 | { "\emph{" swap$ * "}" * } |
---|
| 184 | if$ |
---|
| 185 | } |
---|
| 186 | FUNCTION {bolden} |
---|
| 187 | { duplicate$ empty$ |
---|
| 188 | { pop$ "" } |
---|
| 189 | { "\textbf{" swap$ * "}" * } |
---|
| 190 | if$ |
---|
| 191 | } |
---|
| 192 | FUNCTION {tie.or.space.prefix} |
---|
| 193 | { duplicate$ text.length$ #3 < |
---|
| 194 | { "~" } |
---|
| 195 | { " " } |
---|
| 196 | if$ |
---|
| 197 | swap$ |
---|
| 198 | } |
---|
| 199 | |
---|
| 200 | FUNCTION {capitalize} |
---|
| 201 | { "u" change.case$ "t" change.case$ } |
---|
| 202 | |
---|
| 203 | FUNCTION {space.word} |
---|
| 204 | { " " swap$ * " " * } |
---|
| 205 | % Here are the language-specific definitions for explicit words. |
---|
| 206 | % Each function has a name bbl.xxx where xxx is the English word. |
---|
| 207 | % The language selected here is ENGLISH |
---|
| 208 | FUNCTION {bbl.and} |
---|
| 209 | { "and"} |
---|
| 210 | |
---|
| 211 | FUNCTION {bbl.etal} |
---|
| 212 | { "et~al." } |
---|
| 213 | |
---|
| 214 | FUNCTION {bbl.editors} |
---|
| 215 | { "editors" } |
---|
| 216 | |
---|
| 217 | FUNCTION {bbl.editor} |
---|
| 218 | { "editor" } |
---|
| 219 | |
---|
| 220 | FUNCTION {bbl.edby} |
---|
| 221 | { "edited by" } |
---|
| 222 | |
---|
| 223 | FUNCTION {bbl.edition} |
---|
| 224 | { "ed." } |
---|
| 225 | |
---|
| 226 | FUNCTION {bbl.volume} |
---|
| 227 | { "vol." } |
---|
| 228 | |
---|
| 229 | FUNCTION {bbl.of} |
---|
| 230 | { "of" } |
---|
| 231 | |
---|
| 232 | FUNCTION {bbl.number} |
---|
| 233 | { "no." } |
---|
| 234 | |
---|
| 235 | FUNCTION {bbl.nr} |
---|
| 236 | { "no." } |
---|
| 237 | |
---|
| 238 | FUNCTION {bbl.in} |
---|
| 239 | { "in" } |
---|
| 240 | |
---|
| 241 | FUNCTION {bbl.pages} |
---|
| 242 | { "p." } |
---|
| 243 | |
---|
| 244 | FUNCTION {bbl.page} |
---|
| 245 | { "p." } |
---|
| 246 | |
---|
| 247 | FUNCTION {bbl.eidpp} |
---|
| 248 | { "pages" } |
---|
| 249 | |
---|
| 250 | FUNCTION {bbl.chapter} |
---|
| 251 | { "chap." } |
---|
| 252 | |
---|
| 253 | FUNCTION {bbl.techrep} |
---|
| 254 | { "Tech. Rep." } |
---|
| 255 | |
---|
| 256 | FUNCTION {bbl.mthesis} |
---|
| 257 | { "Master's thesis" } |
---|
| 258 | |
---|
| 259 | FUNCTION {bbl.phdthesis} |
---|
| 260 | { "Ph.D. thesis" } |
---|
| 261 | |
---|
| 262 | MACRO {jan} {"Jan."} |
---|
| 263 | |
---|
| 264 | MACRO {feb} {"Feb."} |
---|
| 265 | |
---|
| 266 | MACRO {mar} {"Mar."} |
---|
| 267 | |
---|
| 268 | MACRO {apr} {"Apr."} |
---|
| 269 | |
---|
| 270 | MACRO {may} {"May"} |
---|
| 271 | |
---|
| 272 | MACRO {jun} {"Jun."} |
---|
| 273 | |
---|
| 274 | MACRO {jul} {"Jul."} |
---|
| 275 | |
---|
| 276 | MACRO {aug} {"Aug."} |
---|
| 277 | |
---|
| 278 | MACRO {sep} {"Sep."} |
---|
| 279 | |
---|
| 280 | MACRO {oct} {"Oct."} |
---|
| 281 | |
---|
| 282 | MACRO {nov} {"Nov."} |
---|
| 283 | |
---|
| 284 | MACRO {dec} {"Dec."} |
---|
| 285 | |
---|
| 286 | MACRO {acmcs} {"ACM Comput. Surv."} |
---|
| 287 | |
---|
| 288 | MACRO {acta} {"Acta Inf."} |
---|
| 289 | |
---|
| 290 | MACRO {cacm} {"Commun. ACM"} |
---|
| 291 | |
---|
| 292 | MACRO {ibmjrd} {"IBM J. Res. Dev."} |
---|
| 293 | |
---|
| 294 | MACRO {ibmsj} {"IBM Syst.~J."} |
---|
| 295 | |
---|
| 296 | MACRO {ieeese} {"IEEE Trans. Software Eng."} |
---|
| 297 | |
---|
| 298 | MACRO {ieeetc} {"IEEE Trans. Comput."} |
---|
| 299 | |
---|
| 300 | MACRO {ieeetcad} |
---|
| 301 | {"IEEE Trans. Comput. Aid. Des."} |
---|
| 302 | |
---|
| 303 | MACRO {ipl} {"Inf. Process. Lett."} |
---|
| 304 | |
---|
| 305 | MACRO {jacm} {"J.~ACM"} |
---|
| 306 | |
---|
| 307 | MACRO {jcss} {"J.~Comput. Syst. Sci."} |
---|
| 308 | |
---|
| 309 | MACRO {scp} {"Sci. Comput. Program."} |
---|
| 310 | |
---|
| 311 | MACRO {sicomp} {"SIAM J. Comput."} |
---|
| 312 | |
---|
| 313 | MACRO {tocs} {"ACM Trans. Comput. Syst."} |
---|
| 314 | |
---|
| 315 | MACRO {tods} {"ACM Trans. Database Syst."} |
---|
| 316 | |
---|
| 317 | MACRO {tog} {"ACM Trans. Graphic."} |
---|
| 318 | |
---|
| 319 | MACRO {toms} {"ACM Trans. Math. Software"} |
---|
| 320 | |
---|
| 321 | MACRO {toois} {"ACM Trans. Office Inf. Syst."} |
---|
| 322 | |
---|
| 323 | MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} |
---|
| 324 | |
---|
| 325 | MACRO {tcs} {"Theor. Comput. Sci."} |
---|
| 326 | |
---|
| 327 | FUNCTION {bibinfo.check} |
---|
| 328 | { swap$ |
---|
| 329 | duplicate$ missing$ |
---|
| 330 | { |
---|
| 331 | pop$ pop$ |
---|
| 332 | "" |
---|
| 333 | } |
---|
| 334 | { duplicate$ empty$ |
---|
| 335 | { |
---|
| 336 | swap$ pop$ |
---|
| 337 | } |
---|
| 338 | { swap$ |
---|
| 339 | "\bibinfo{" swap$ * "}{" * swap$ * "}" * |
---|
| 340 | } |
---|
| 341 | if$ |
---|
| 342 | } |
---|
| 343 | if$ |
---|
| 344 | } |
---|
| 345 | FUNCTION {bibinfo.warn} |
---|
| 346 | { swap$ |
---|
| 347 | duplicate$ missing$ |
---|
| 348 | { |
---|
| 349 | swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ |
---|
| 350 | "" |
---|
| 351 | } |
---|
| 352 | { duplicate$ empty$ |
---|
| 353 | { |
---|
| 354 | swap$ "empty " swap$ * " in " * cite$ * warning$ |
---|
| 355 | } |
---|
| 356 | { swap$ |
---|
| 357 | pop$ |
---|
| 358 | } |
---|
| 359 | if$ |
---|
| 360 | } |
---|
| 361 | if$ |
---|
| 362 | } |
---|
| 363 | FUNCTION {format.eprint} |
---|
| 364 | { eprint duplicate$ empty$ |
---|
| 365 | 'skip$ |
---|
| 366 | { "\eprint" |
---|
| 367 | archive empty$ |
---|
| 368 | 'skip$ |
---|
| 369 | { "[" * archive * "]" * } |
---|
| 370 | if$ |
---|
| 371 | "{" * swap$ * "}" * |
---|
| 372 | } |
---|
| 373 | if$ |
---|
| 374 | } |
---|
| 375 | FUNCTION {format.url} |
---|
| 376 | { url empty$ |
---|
| 377 | { "" } |
---|
| 378 | { "\urlprefix\url{" url * "}" * } |
---|
| 379 | if$ |
---|
| 380 | } |
---|
| 381 | |
---|
| 382 | INTEGERS { nameptr namesleft numnames } |
---|
| 383 | |
---|
| 384 | |
---|
| 385 | STRINGS { bibinfo} |
---|
| 386 | |
---|
| 387 | FUNCTION {format.names} |
---|
| 388 | { 'bibinfo := |
---|
| 389 | duplicate$ empty$ 'skip$ { |
---|
| 390 | 's := |
---|
| 391 | "" 't := |
---|
| 392 | #1 'nameptr := |
---|
| 393 | s num.names$ 'numnames := |
---|
| 394 | numnames 'namesleft := |
---|
| 395 | { namesleft #0 > } |
---|
| 396 | { s nameptr |
---|
| 397 | "{vv~}{ll}{ jj}\xfnm[{ f{.}.}]" |
---|
| 398 | format.name$ |
---|
| 399 | % remove.dots |
---|
| 400 | bibinfo bibinfo.check |
---|
| 401 | 't := |
---|
| 402 | nameptr #1 > |
---|
| 403 | { |
---|
| 404 | nameptr #6 |
---|
| 405 | #1 + = |
---|
| 406 | numnames #6 |
---|
| 407 | > and |
---|
| 408 | { "others" 't := |
---|
| 409 | #1 'namesleft := } |
---|
| 410 | 'skip$ |
---|
| 411 | if$ |
---|
| 412 | namesleft #1 > |
---|
| 413 | { ", " * t * } |
---|
| 414 | { |
---|
| 415 | s nameptr "{ll}" format.name$ duplicate$ "others" = |
---|
| 416 | { 't := } |
---|
| 417 | { pop$ } |
---|
| 418 | if$ |
---|
| 419 | "," * |
---|
| 420 | t "others" = |
---|
| 421 | { |
---|
| 422 | " " * bbl.etal * |
---|
| 423 | } |
---|
| 424 | { " " * t * } |
---|
| 425 | if$ |
---|
| 426 | } |
---|
| 427 | if$ |
---|
| 428 | } |
---|
| 429 | 't |
---|
| 430 | if$ |
---|
| 431 | nameptr #1 + 'nameptr := |
---|
| 432 | namesleft #1 - 'namesleft := |
---|
| 433 | } |
---|
| 434 | while$ |
---|
| 435 | } if$ |
---|
| 436 | } |
---|
| 437 | FUNCTION {format.names.ed} |
---|
| 438 | { |
---|
| 439 | format.names |
---|
| 440 | } |
---|
| 441 | FUNCTION {format.key} |
---|
| 442 | { empty$ |
---|
| 443 | { key field.or.null } |
---|
| 444 | { "" } |
---|
| 445 | if$ |
---|
| 446 | } |
---|
| 447 | |
---|
| 448 | FUNCTION {format.authors} |
---|
| 449 | { author "author" format.names |
---|
| 450 | duplicate$ empty$ 'skip$ |
---|
| 451 | { collaboration "collaboration" bibinfo.check |
---|
| 452 | duplicate$ empty$ 'skip$ |
---|
| 453 | { " (" swap$ * ")" * } |
---|
| 454 | if$ |
---|
| 455 | * |
---|
| 456 | } |
---|
| 457 | if$ |
---|
| 458 | } |
---|
| 459 | FUNCTION {get.bbl.editor} |
---|
| 460 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } |
---|
| 461 | |
---|
| 462 | FUNCTION {format.editors} |
---|
| 463 | { editor "editor" format.names duplicate$ empty$ 'skip$ |
---|
| 464 | { |
---|
| 465 | "," * |
---|
| 466 | " " * |
---|
| 467 | get.bbl.editor |
---|
| 468 | * |
---|
| 469 | } |
---|
| 470 | if$ |
---|
| 471 | } |
---|
| 472 | FUNCTION {format.isbn} |
---|
| 473 | { isbn "isbn" bibinfo.check |
---|
| 474 | duplicate$ empty$ 'skip$ |
---|
| 475 | { |
---|
| 476 | new.block |
---|
| 477 | "ISBN " swap$ * |
---|
| 478 | } |
---|
| 479 | if$ |
---|
| 480 | } |
---|
| 481 | |
---|
| 482 | FUNCTION {format.doi} |
---|
| 483 | { doi "doi" bibinfo.check |
---|
| 484 | duplicate$ empty$ 'skip$ |
---|
| 485 | { |
---|
| 486 | new.block |
---|
| 487 | "\doi{" swap$ * "}" * |
---|
| 488 | } |
---|
| 489 | if$ |
---|
| 490 | } |
---|
| 491 | FUNCTION {format.note} |
---|
| 492 | { |
---|
| 493 | note empty$ |
---|
| 494 | { "" } |
---|
| 495 | { note #1 #1 substring$ |
---|
| 496 | duplicate$ "{" = |
---|
| 497 | 'skip$ |
---|
| 498 | { output.state mid.sentence = |
---|
| 499 | { "l" } |
---|
| 500 | { "u" } |
---|
| 501 | if$ |
---|
| 502 | change.case$ |
---|
| 503 | } |
---|
| 504 | if$ |
---|
| 505 | note #2 global.max$ substring$ * "note" bibinfo.check |
---|
| 506 | } |
---|
| 507 | if$ |
---|
| 508 | } |
---|
| 509 | |
---|
| 510 | FUNCTION {format.title} |
---|
| 511 | { title |
---|
| 512 | duplicate$ empty$ 'skip$ |
---|
| 513 | { "t" change.case$ } |
---|
| 514 | if$ |
---|
| 515 | "title" bibinfo.check |
---|
| 516 | } |
---|
| 517 | FUNCTION {format.full.names} |
---|
| 518 | {'s := |
---|
| 519 | "" 't := |
---|
| 520 | #1 'nameptr := |
---|
| 521 | s num.names$ 'numnames := |
---|
| 522 | numnames 'namesleft := |
---|
| 523 | { namesleft #0 > } |
---|
| 524 | { s nameptr |
---|
| 525 | "{vv~}{ll}" format.name$ |
---|
| 526 | 't := |
---|
| 527 | nameptr #1 > |
---|
| 528 | { |
---|
| 529 | nameptr #6 |
---|
| 530 | #1 + = |
---|
| 531 | numnames #6 |
---|
| 532 | > and |
---|
| 533 | { "others" 't := |
---|
| 534 | #1 'namesleft := } |
---|
| 535 | 'skip$ |
---|
| 536 | if$ |
---|
| 537 | namesleft #1 > |
---|
| 538 | { ", " * t * } |
---|
| 539 | { |
---|
| 540 | s nameptr "{ll}" format.name$ duplicate$ "others" = |
---|
| 541 | { 't := } |
---|
| 542 | { pop$ } |
---|
| 543 | if$ |
---|
| 544 | t "others" = |
---|
| 545 | { |
---|
| 546 | " " * bbl.etal * |
---|
| 547 | } |
---|
| 548 | { |
---|
| 549 | bbl.and |
---|
| 550 | space.word * t * |
---|
| 551 | } |
---|
| 552 | if$ |
---|
| 553 | } |
---|
| 554 | if$ |
---|
| 555 | } |
---|
| 556 | 't |
---|
| 557 | if$ |
---|
| 558 | nameptr #1 + 'nameptr := |
---|
| 559 | namesleft #1 - 'namesleft := |
---|
| 560 | } |
---|
| 561 | while$ |
---|
| 562 | } |
---|
| 563 | |
---|
| 564 | FUNCTION {author.editor.key.full} |
---|
| 565 | { author empty$ |
---|
| 566 | { editor empty$ |
---|
| 567 | { key empty$ |
---|
| 568 | { cite$ #1 #3 substring$ } |
---|
| 569 | 'key |
---|
| 570 | if$ |
---|
| 571 | } |
---|
| 572 | { editor format.full.names } |
---|
| 573 | if$ |
---|
| 574 | } |
---|
| 575 | { author format.full.names } |
---|
| 576 | if$ |
---|
| 577 | } |
---|
| 578 | |
---|
| 579 | FUNCTION {author.key.full} |
---|
| 580 | { author empty$ |
---|
| 581 | { key empty$ |
---|
| 582 | { cite$ #1 #3 substring$ } |
---|
| 583 | 'key |
---|
| 584 | if$ |
---|
| 585 | } |
---|
| 586 | { author format.full.names } |
---|
| 587 | if$ |
---|
| 588 | } |
---|
| 589 | |
---|
| 590 | FUNCTION {editor.key.full} |
---|
| 591 | { editor empty$ |
---|
| 592 | { key empty$ |
---|
| 593 | { cite$ #1 #3 substring$ } |
---|
| 594 | 'key |
---|
| 595 | if$ |
---|
| 596 | } |
---|
| 597 | { editor format.full.names } |
---|
| 598 | if$ |
---|
| 599 | } |
---|
| 600 | |
---|
| 601 | FUNCTION {make.full.names} |
---|
| 602 | { type$ "book" = |
---|
| 603 | type$ "inbook" = |
---|
| 604 | or |
---|
| 605 | 'author.editor.key.full |
---|
| 606 | { type$ "proceedings" = |
---|
| 607 | 'editor.key.full |
---|
| 608 | 'author.key.full |
---|
| 609 | if$ |
---|
| 610 | } |
---|
| 611 | if$ |
---|
| 612 | } |
---|
| 613 | |
---|
| 614 | FUNCTION {output.bibitem} |
---|
| 615 | { newline$ |
---|
| 616 | "\bibitem[{" write$ |
---|
| 617 | label write$ |
---|
| 618 | ")" make.full.names duplicate$ short.list = |
---|
| 619 | { pop$ } |
---|
| 620 | { * } |
---|
| 621 | if$ |
---|
| 622 | "}]{" * write$ |
---|
| 623 | cite$ write$ |
---|
| 624 | "}" write$ |
---|
| 625 | newline$ |
---|
| 626 | "" |
---|
| 627 | before.all 'output.state := |
---|
| 628 | } |
---|
| 629 | |
---|
| 630 | FUNCTION {n.dashify} |
---|
| 631 | { |
---|
| 632 | 't := |
---|
| 633 | "" |
---|
| 634 | { t empty$ not } |
---|
| 635 | { t #1 #1 substring$ "-" = |
---|
| 636 | { t #1 #2 substring$ "--" = not |
---|
| 637 | { "--" * |
---|
| 638 | t #2 global.max$ substring$ 't := |
---|
| 639 | } |
---|
| 640 | { { t #1 #1 substring$ "-" = } |
---|
| 641 | { "-" * |
---|
| 642 | t #2 global.max$ substring$ 't := |
---|
| 643 | } |
---|
| 644 | while$ |
---|
| 645 | } |
---|
| 646 | if$ |
---|
| 647 | } |
---|
| 648 | { t #1 #1 substring$ * |
---|
| 649 | t #2 global.max$ substring$ 't := |
---|
| 650 | } |
---|
| 651 | if$ |
---|
| 652 | } |
---|
| 653 | while$ |
---|
| 654 | } |
---|
| 655 | |
---|
| 656 | FUNCTION {word.in} |
---|
| 657 | { bbl.in capitalize |
---|
| 658 | ":" * |
---|
| 659 | " " * } |
---|
| 660 | |
---|
| 661 | FUNCTION {format.date} |
---|
| 662 | { year "year" bibinfo.check duplicate$ empty$ |
---|
| 663 | { |
---|
| 664 | "empty year in " cite$ * "; set to ????" * warning$ |
---|
| 665 | pop$ "????" |
---|
| 666 | } |
---|
| 667 | 'skip$ |
---|
| 668 | if$ |
---|
| 669 | extra.label * |
---|
| 670 | } |
---|
| 671 | FUNCTION {format.btitle} |
---|
| 672 | { title "title" bibinfo.check |
---|
| 673 | duplicate$ empty$ 'skip$ |
---|
| 674 | { |
---|
| 675 | emphasize |
---|
| 676 | } |
---|
| 677 | if$ |
---|
| 678 | } |
---|
| 679 | FUNCTION {either.or.check} |
---|
| 680 | { empty$ |
---|
| 681 | 'pop$ |
---|
| 682 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } |
---|
| 683 | if$ |
---|
| 684 | } |
---|
| 685 | FUNCTION {format.bvolume} |
---|
| 686 | { volume empty$ |
---|
| 687 | { "" } |
---|
| 688 | { bbl.volume volume tie.or.space.prefix |
---|
| 689 | "volume" bibinfo.check * * |
---|
| 690 | series "series" bibinfo.check |
---|
| 691 | duplicate$ empty$ 'pop$ |
---|
| 692 | { swap$ bbl.of space.word * swap$ |
---|
| 693 | emphasize * } |
---|
| 694 | if$ |
---|
| 695 | "volume and number" number either.or.check |
---|
| 696 | } |
---|
| 697 | if$ |
---|
| 698 | } |
---|
| 699 | FUNCTION {format.number.series} |
---|
| 700 | { volume empty$ |
---|
| 701 | { number empty$ |
---|
| 702 | { series field.or.null } |
---|
| 703 | { series empty$ |
---|
| 704 | { number "number" bibinfo.check } |
---|
| 705 | { output.state mid.sentence = |
---|
| 706 | { bbl.number } |
---|
| 707 | { bbl.number capitalize } |
---|
| 708 | if$ |
---|
| 709 | number tie.or.space.prefix "number" bibinfo.check * * |
---|
| 710 | bbl.in space.word * |
---|
| 711 | series "series" bibinfo.check * |
---|
| 712 | } |
---|
| 713 | if$ |
---|
| 714 | } |
---|
| 715 | if$ |
---|
| 716 | } |
---|
| 717 | { "" } |
---|
| 718 | if$ |
---|
| 719 | } |
---|
| 720 | |
---|
| 721 | FUNCTION {format.edition} |
---|
| 722 | { edition duplicate$ empty$ 'skip$ |
---|
| 723 | { |
---|
| 724 | output.state mid.sentence = |
---|
| 725 | { "l" } |
---|
| 726 | { "t" } |
---|
| 727 | if$ change.case$ |
---|
| 728 | "edition" bibinfo.check |
---|
| 729 | " " * bbl.edition * |
---|
| 730 | } |
---|
| 731 | if$ |
---|
| 732 | } |
---|
| 733 | INTEGERS { multiresult } |
---|
| 734 | FUNCTION {multi.page.check} |
---|
| 735 | { 't := |
---|
| 736 | #0 'multiresult := |
---|
| 737 | { multiresult not |
---|
| 738 | t empty$ not |
---|
| 739 | and |
---|
| 740 | } |
---|
| 741 | { t #1 #1 substring$ |
---|
| 742 | duplicate$ "-" = |
---|
| 743 | swap$ duplicate$ "," = |
---|
| 744 | swap$ "+" = |
---|
| 745 | or or |
---|
| 746 | { #1 'multiresult := } |
---|
| 747 | { t #2 global.max$ substring$ 't := } |
---|
| 748 | if$ |
---|
| 749 | } |
---|
| 750 | while$ |
---|
| 751 | multiresult |
---|
| 752 | } |
---|
| 753 | FUNCTION {format.pages} |
---|
| 754 | { pages duplicate$ empty$ 'skip$ |
---|
| 755 | { duplicate$ multi.page.check |
---|
| 756 | { |
---|
| 757 | bbl.pages swap$ |
---|
| 758 | n.dashify |
---|
| 759 | } |
---|
| 760 | { |
---|
| 761 | bbl.page swap$ |
---|
| 762 | } |
---|
| 763 | if$ |
---|
| 764 | tie.or.space.prefix |
---|
| 765 | "pages" bibinfo.check |
---|
| 766 | * * |
---|
| 767 | } |
---|
| 768 | if$ |
---|
| 769 | } |
---|
| 770 | FUNCTION {format.journal.pages} |
---|
| 771 | { pages duplicate$ empty$ 'pop$ |
---|
| 772 | { swap$ duplicate$ empty$ |
---|
| 773 | { pop$ pop$ format.pages } |
---|
| 774 | { |
---|
| 775 | ":" * |
---|
| 776 | swap$ |
---|
| 777 | n.dashify |
---|
| 778 | "pages" bibinfo.check |
---|
| 779 | * |
---|
| 780 | } |
---|
| 781 | if$ |
---|
| 782 | } |
---|
| 783 | if$ |
---|
| 784 | } |
---|
| 785 | FUNCTION {format.journal.eid} |
---|
| 786 | { eid "eid" bibinfo.check |
---|
| 787 | duplicate$ empty$ 'pop$ |
---|
| 788 | { swap$ duplicate$ empty$ 'skip$ |
---|
| 789 | { |
---|
| 790 | ":" * |
---|
| 791 | } |
---|
| 792 | if$ |
---|
| 793 | swap$ * |
---|
| 794 | numpages empty$ 'skip$ |
---|
| 795 | { bbl.eidpp numpages tie.or.space.prefix |
---|
| 796 | "numpages" bibinfo.check * * |
---|
| 797 | " (" swap$ * ")" * * |
---|
| 798 | } |
---|
| 799 | if$ |
---|
| 800 | } |
---|
| 801 | if$ |
---|
| 802 | } |
---|
| 803 | FUNCTION {format.vol.num.pages} |
---|
| 804 | { volume field.or.null |
---|
| 805 | duplicate$ empty$ 'skip$ |
---|
| 806 | { |
---|
| 807 | "volume" bibinfo.check |
---|
| 808 | } |
---|
| 809 | if$ |
---|
| 810 | bolden |
---|
| 811 | number "number" bibinfo.check duplicate$ empty$ 'skip$ |
---|
| 812 | { |
---|
| 813 | swap$ duplicate$ empty$ |
---|
| 814 | { "there's a number but no volume in " cite$ * warning$ } |
---|
| 815 | 'skip$ |
---|
| 816 | if$ |
---|
| 817 | swap$ |
---|
| 818 | "(" swap$ * ")" * |
---|
| 819 | } |
---|
| 820 | if$ * |
---|
| 821 | } |
---|
| 822 | |
---|
| 823 | FUNCTION {format.chapter.pages} |
---|
| 824 | { chapter empty$ |
---|
| 825 | { "" } |
---|
| 826 | { type empty$ |
---|
| 827 | { bbl.chapter } |
---|
| 828 | { type "l" change.case$ |
---|
| 829 | "type" bibinfo.check |
---|
| 830 | } |
---|
| 831 | if$ |
---|
| 832 | chapter tie.or.space.prefix |
---|
| 833 | "chapter" bibinfo.check |
---|
| 834 | * * |
---|
| 835 | } |
---|
| 836 | if$ |
---|
| 837 | } |
---|
| 838 | |
---|
| 839 | FUNCTION {format.booktitle} |
---|
| 840 | { |
---|
| 841 | booktitle "booktitle" bibinfo.check |
---|
| 842 | emphasize |
---|
| 843 | } |
---|
| 844 | |
---|
| 845 | %FUNCTION {format.in.ed.booktitle} |
---|
| 846 | %{ format.booktitle duplicate$ empty$ 'skip$ |
---|
| 847 | % { |
---|
| 848 | % editor "editor" format.names.ed duplicate$ empty$ 'pop$ |
---|
| 849 | % { |
---|
| 850 | % get.bbl.editor |
---|
| 851 | % " " * swap$ * |
---|
| 852 | % swap$ |
---|
| 853 | % "," * |
---|
| 854 | % " " * swap$ |
---|
| 855 | % * } |
---|
| 856 | % if$ |
---|
| 857 | % word.in swap$ * |
---|
| 858 | % } |
---|
| 859 | % if$ |
---|
| 860 | %} |
---|
| 861 | |
---|
| 862 | FUNCTION {format.in.ed.booktitle} |
---|
| 863 | { format.booktitle duplicate$ empty$ 'skip$ |
---|
| 864 | { |
---|
| 865 | editor "editor" format.names.ed duplicate$ empty$ 'pop$ |
---|
| 866 | { |
---|
| 867 | "," * |
---|
| 868 | " " * |
---|
| 869 | get.bbl.editor |
---|
| 870 | ". " * |
---|
| 871 | * swap$ |
---|
| 872 | * } |
---|
| 873 | if$ |
---|
| 874 | word.in swap$ * |
---|
| 875 | } |
---|
| 876 | if$ |
---|
| 877 | } |
---|
| 878 | |
---|
| 879 | FUNCTION {format.thesis.type} |
---|
| 880 | { type duplicate$ empty$ |
---|
| 881 | 'pop$ |
---|
| 882 | { swap$ pop$ |
---|
| 883 | "t" change.case$ "type" bibinfo.check |
---|
| 884 | } |
---|
| 885 | if$ |
---|
| 886 | } |
---|
| 887 | FUNCTION {format.tr.number} |
---|
| 888 | { number "number" bibinfo.check |
---|
| 889 | type duplicate$ empty$ |
---|
| 890 | { pop$ bbl.techrep } |
---|
| 891 | 'skip$ |
---|
| 892 | if$ |
---|
| 893 | "type" bibinfo.check |
---|
| 894 | swap$ duplicate$ empty$ |
---|
| 895 | { pop$ "t" change.case$ } |
---|
| 896 | { tie.or.space.prefix * * } |
---|
| 897 | if$ |
---|
| 898 | } |
---|
| 899 | FUNCTION {format.article.crossref} |
---|
| 900 | { |
---|
| 901 | word.in |
---|
| 902 | " \cite{" * crossref * "}" * |
---|
| 903 | } |
---|
| 904 | FUNCTION {format.book.crossref} |
---|
| 905 | { volume duplicate$ empty$ |
---|
| 906 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ |
---|
| 907 | pop$ word.in |
---|
| 908 | } |
---|
| 909 | { bbl.volume |
---|
| 910 | capitalize |
---|
| 911 | swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * |
---|
| 912 | } |
---|
| 913 | if$ |
---|
| 914 | " \cite{" * crossref * "}" * |
---|
| 915 | } |
---|
| 916 | FUNCTION {format.incoll.inproc.crossref} |
---|
| 917 | { |
---|
| 918 | word.in |
---|
| 919 | " \cite{" * crossref * "}" * |
---|
| 920 | } |
---|
| 921 | FUNCTION {format.org.or.pub} |
---|
| 922 | { 't := |
---|
| 923 | "" |
---|
| 924 | address empty$ t empty$ and |
---|
| 925 | 'skip$ |
---|
| 926 | { |
---|
| 927 | address "address" bibinfo.check * |
---|
| 928 | t empty$ |
---|
| 929 | 'skip$ |
---|
| 930 | { address empty$ |
---|
| 931 | 'skip$ |
---|
| 932 | { ": " * } |
---|
| 933 | if$ |
---|
| 934 | t * |
---|
| 935 | } |
---|
| 936 | if$ |
---|
| 937 | } |
---|
| 938 | if$ |
---|
| 939 | } |
---|
| 940 | FUNCTION {format.publisher.address} |
---|
| 941 | { publisher "publisher" bibinfo.check format.org.or.pub |
---|
| 942 | } |
---|
| 943 | |
---|
| 944 | FUNCTION {format.organization.address} |
---|
| 945 | { organization "organization" bibinfo.check format.org.or.pub |
---|
| 946 | } |
---|
| 947 | |
---|
| 948 | FUNCTION {article} |
---|
| 949 | { "%Type = Article" write$ |
---|
| 950 | output.bibitem |
---|
| 951 | format.authors "author" output.check |
---|
| 952 | author format.key output |
---|
| 953 | new.block |
---|
| 954 | format.title "title" output.check |
---|
| 955 | new.block |
---|
| 956 | crossref missing$ |
---|
| 957 | { |
---|
| 958 | journal |
---|
| 959 | remove.dots |
---|
| 960 | "journal" bibinfo.check |
---|
| 961 | emphasize |
---|
| 962 | "journal" output.check |
---|
| 963 | add.blank |
---|
| 964 | format.date "year" output.check |
---|
| 965 | date.block |
---|
| 966 | format.vol.num.pages output |
---|
| 967 | } |
---|
| 968 | { format.article.crossref output.nonnull |
---|
| 969 | } |
---|
| 970 | if$ |
---|
| 971 | eid empty$ |
---|
| 972 | { format.journal.pages } |
---|
| 973 | { format.journal.eid } |
---|
| 974 | if$ |
---|
| 975 | format.doi output |
---|
| 976 | new.block |
---|
| 977 | format.note output |
---|
| 978 | format.eprint output |
---|
| 979 | format.url output |
---|
| 980 | fin.entry |
---|
| 981 | } |
---|
| 982 | FUNCTION {book} |
---|
| 983 | { "%Type = Book" write$ |
---|
| 984 | output.bibitem |
---|
| 985 | author empty$ |
---|
| 986 | { format.editors "author and editor" output.check |
---|
| 987 | editor format.key output |
---|
| 988 | } |
---|
| 989 | { format.authors output.nonnull |
---|
| 990 | crossref missing$ |
---|
| 991 | { "author and editor" editor either.or.check } |
---|
| 992 | 'skip$ |
---|
| 993 | if$ |
---|
| 994 | } |
---|
| 995 | if$ |
---|
| 996 | new.block |
---|
| 997 | format.btitle "title" output.check |
---|
| 998 | crossref missing$ |
---|
| 999 | { format.bvolume output |
---|
| 1000 | new.block |
---|
| 1001 | format.number.series output |
---|
| 1002 | new.sentence |
---|
| 1003 | format.publisher.address output |
---|
| 1004 | } |
---|
| 1005 | { |
---|
| 1006 | new.block |
---|
| 1007 | format.book.crossref output.nonnull |
---|
| 1008 | } |
---|
| 1009 | if$ |
---|
| 1010 | format.edition output |
---|
| 1011 | format.date "year" output.check |
---|
| 1012 | format.isbn output |
---|
| 1013 | format.doi output |
---|
| 1014 | new.block |
---|
| 1015 | format.note output |
---|
| 1016 | format.eprint output |
---|
| 1017 | format.url output |
---|
| 1018 | fin.entry |
---|
| 1019 | } |
---|
| 1020 | FUNCTION {booklet} |
---|
| 1021 | { "%Type = Booklet" write$ |
---|
| 1022 | output.bibitem |
---|
| 1023 | format.authors output |
---|
| 1024 | author format.key output |
---|
| 1025 | new.block |
---|
| 1026 | format.title "title" output.check |
---|
| 1027 | new.block |
---|
| 1028 | howpublished "howpublished" bibinfo.check output |
---|
| 1029 | address "address" bibinfo.check output |
---|
| 1030 | format.date "year" output.check |
---|
| 1031 | format.isbn output |
---|
| 1032 | format.doi output |
---|
| 1033 | new.block |
---|
| 1034 | format.note output |
---|
| 1035 | format.eprint output |
---|
| 1036 | format.url output |
---|
| 1037 | fin.entry |
---|
| 1038 | } |
---|
| 1039 | |
---|
| 1040 | FUNCTION {inbook} |
---|
| 1041 | { "%Type = Inbook" write$ |
---|
| 1042 | output.bibitem |
---|
| 1043 | author empty$ |
---|
| 1044 | { format.editors "author and editor" output.check |
---|
| 1045 | editor format.key output |
---|
| 1046 | } |
---|
| 1047 | { format.authors output.nonnull |
---|
| 1048 | crossref missing$ |
---|
| 1049 | { "author and editor" editor either.or.check } |
---|
| 1050 | 'skip$ |
---|
| 1051 | if$ |
---|
| 1052 | } |
---|
| 1053 | if$ |
---|
| 1054 | new.block |
---|
| 1055 | format.btitle "title" output.check |
---|
| 1056 | crossref missing$ |
---|
| 1057 | { |
---|
| 1058 | format.bvolume output |
---|
| 1059 | format.chapter.pages "chapter and pages" output.check |
---|
| 1060 | new.block |
---|
| 1061 | format.number.series output |
---|
| 1062 | new.sentence |
---|
| 1063 | format.publisher.address output |
---|
| 1064 | } |
---|
| 1065 | { |
---|
| 1066 | format.chapter.pages "chapter and pages" output.check |
---|
| 1067 | new.block |
---|
| 1068 | format.book.crossref output.nonnull |
---|
| 1069 | } |
---|
| 1070 | if$ |
---|
| 1071 | format.edition output |
---|
| 1072 | crossref missing$ |
---|
| 1073 | { format.isbn output } |
---|
| 1074 | 'skip$ |
---|
| 1075 | if$ |
---|
| 1076 | format.date "year" output.check |
---|
| 1077 | book.date.block |
---|
| 1078 | format.pages "pages" output.check |
---|
| 1079 | format.doi output |
---|
| 1080 | new.block |
---|
| 1081 | format.note output |
---|
| 1082 | format.eprint output |
---|
| 1083 | format.url output |
---|
| 1084 | fin.entry |
---|
| 1085 | } |
---|
| 1086 | |
---|
| 1087 | FUNCTION {incollection} |
---|
| 1088 | { "%Type = Incollection" write$ |
---|
| 1089 | output.bibitem |
---|
| 1090 | format.authors "author" output.check |
---|
| 1091 | author format.key output |
---|
| 1092 | new.block |
---|
| 1093 | format.title "title" output.check |
---|
| 1094 | new.block |
---|
| 1095 | crossref missing$ |
---|
| 1096 | { format.in.ed.booktitle "booktitle" output.check |
---|
| 1097 | format.bvolume output |
---|
| 1098 | format.number.series output |
---|
| 1099 | format.chapter.pages output |
---|
| 1100 | new.sentence |
---|
| 1101 | format.publisher.address output |
---|
| 1102 | format.edition output |
---|
| 1103 | format.isbn output |
---|
| 1104 | } |
---|
| 1105 | { format.incoll.inproc.crossref output.nonnull |
---|
| 1106 | format.chapter.pages output |
---|
| 1107 | } |
---|
| 1108 | if$ |
---|
| 1109 | format.date "year" output.check |
---|
| 1110 | book.date.block |
---|
| 1111 | format.pages "pages" output.check |
---|
| 1112 | format.doi output |
---|
| 1113 | new.block |
---|
| 1114 | format.note output |
---|
| 1115 | format.eprint output |
---|
| 1116 | format.url output |
---|
| 1117 | fin.entry |
---|
| 1118 | } |
---|
| 1119 | FUNCTION {inproceedings} |
---|
| 1120 | { "%Type = Inproceedings" write$ |
---|
| 1121 | output.bibitem |
---|
| 1122 | format.authors "author" output.check |
---|
| 1123 | author format.key output |
---|
| 1124 | new.block |
---|
| 1125 | format.title "title" output.check |
---|
| 1126 | new.block |
---|
| 1127 | crossref missing$ |
---|
| 1128 | { format.in.ed.booktitle "booktitle" output.check |
---|
| 1129 | format.bvolume output |
---|
| 1130 | format.number.series output |
---|
| 1131 | new.sentence |
---|
| 1132 | publisher empty$ |
---|
| 1133 | { format.organization.address output } |
---|
| 1134 | { organization "organization" bibinfo.check output |
---|
| 1135 | format.publisher.address output |
---|
| 1136 | } |
---|
| 1137 | if$ |
---|
| 1138 | format.isbn output |
---|
| 1139 | } |
---|
| 1140 | { format.incoll.inproc.crossref output.nonnull |
---|
| 1141 | } |
---|
| 1142 | if$ |
---|
| 1143 | format.date "year" output.check |
---|
| 1144 | book.date.block |
---|
| 1145 | format.pages "pages" output.check |
---|
| 1146 | format.doi output |
---|
| 1147 | new.block |
---|
| 1148 | format.note output |
---|
| 1149 | format.eprint output |
---|
| 1150 | format.url output |
---|
| 1151 | fin.entry |
---|
| 1152 | } |
---|
| 1153 | FUNCTION {conference} { inproceedings } |
---|
| 1154 | FUNCTION {manual} |
---|
| 1155 | { "%Type = Manual" write$ |
---|
| 1156 | output.bibitem |
---|
| 1157 | format.authors output |
---|
| 1158 | author format.key output |
---|
| 1159 | new.block |
---|
| 1160 | format.btitle "title" output.check |
---|
| 1161 | organization address new.block.checkb |
---|
| 1162 | organization "organization" bibinfo.check output |
---|
| 1163 | address "address" bibinfo.check output |
---|
| 1164 | format.edition output |
---|
| 1165 | format.date "year" output.check |
---|
| 1166 | format.doi output |
---|
| 1167 | new.block |
---|
| 1168 | format.note output |
---|
| 1169 | format.eprint output |
---|
| 1170 | format.url output |
---|
| 1171 | fin.entry |
---|
| 1172 | } |
---|
| 1173 | |
---|
| 1174 | FUNCTION {mastersthesis} |
---|
| 1175 | { "%Type = Masterthesis" write$ |
---|
| 1176 | output.bibitem |
---|
| 1177 | format.authors "author" output.check |
---|
| 1178 | author format.key output |
---|
| 1179 | new.block |
---|
| 1180 | format.btitle |
---|
| 1181 | "title" output.check |
---|
| 1182 | new.block |
---|
| 1183 | bbl.mthesis format.thesis.type output.nonnull |
---|
| 1184 | school "school" bibinfo.warn output |
---|
| 1185 | address "address" bibinfo.check output |
---|
| 1186 | format.date "year" output.check |
---|
| 1187 | format.doi output |
---|
| 1188 | new.block |
---|
| 1189 | format.note output |
---|
| 1190 | format.eprint output |
---|
| 1191 | format.url output |
---|
| 1192 | fin.entry |
---|
| 1193 | } |
---|
| 1194 | |
---|
| 1195 | FUNCTION {misc} |
---|
| 1196 | { "%Type = Misc" write$ |
---|
| 1197 | output.bibitem |
---|
| 1198 | format.authors output |
---|
| 1199 | author format.key output |
---|
| 1200 | new.block |
---|
| 1201 | format.title output |
---|
| 1202 | new.block |
---|
| 1203 | howpublished "howpublished" bibinfo.check output |
---|
| 1204 | format.date "year" output.check |
---|
| 1205 | format.doi output |
---|
| 1206 | new.block |
---|
| 1207 | format.note output |
---|
| 1208 | format.eprint output |
---|
| 1209 | format.url output |
---|
| 1210 | fin.entry |
---|
| 1211 | } |
---|
| 1212 | FUNCTION {phdthesis} |
---|
| 1213 | { "%Type = Phdthesis" write$ |
---|
| 1214 | output.bibitem |
---|
| 1215 | format.authors "author" output.check |
---|
| 1216 | author format.key output |
---|
| 1217 | new.block |
---|
| 1218 | format.btitle |
---|
| 1219 | "title" output.check |
---|
| 1220 | new.block |
---|
| 1221 | bbl.phdthesis format.thesis.type output.nonnull |
---|
| 1222 | school "school" bibinfo.warn output |
---|
| 1223 | address "address" bibinfo.check output |
---|
| 1224 | format.date "year" output.check |
---|
| 1225 | format.doi output |
---|
| 1226 | new.block |
---|
| 1227 | format.note output |
---|
| 1228 | format.eprint output |
---|
| 1229 | format.url output |
---|
| 1230 | fin.entry |
---|
| 1231 | } |
---|
| 1232 | |
---|
| 1233 | FUNCTION {proceedings} |
---|
| 1234 | { "%Type = Proceedings" write$ |
---|
| 1235 | output.bibitem |
---|
| 1236 | format.editors output |
---|
| 1237 | editor format.key output |
---|
| 1238 | new.block |
---|
| 1239 | format.btitle "title" output.check |
---|
| 1240 | format.bvolume output |
---|
| 1241 | format.number.series output |
---|
| 1242 | new.sentence |
---|
| 1243 | publisher empty$ |
---|
| 1244 | { format.organization.address output } |
---|
| 1245 | { organization "organization" bibinfo.check output |
---|
| 1246 | format.publisher.address output |
---|
| 1247 | } |
---|
| 1248 | if$ |
---|
| 1249 | format.date "year" output.check |
---|
| 1250 | format.isbn output |
---|
| 1251 | format.doi output |
---|
| 1252 | new.block |
---|
| 1253 | format.note output |
---|
| 1254 | format.eprint output |
---|
| 1255 | format.url output |
---|
| 1256 | fin.entry |
---|
| 1257 | } |
---|
| 1258 | |
---|
| 1259 | FUNCTION {techreport} |
---|
| 1260 | { "%Type = Techreport" write$ |
---|
| 1261 | output.bibitem |
---|
| 1262 | format.authors "author" output.check |
---|
| 1263 | author format.key output |
---|
| 1264 | new.block |
---|
| 1265 | format.title |
---|
| 1266 | "title" output.check |
---|
| 1267 | new.block |
---|
| 1268 | format.tr.number output.nonnull |
---|
| 1269 | institution "institution" bibinfo.warn output |
---|
| 1270 | address "address" bibinfo.check output |
---|
| 1271 | format.date "year" output.check |
---|
| 1272 | format.doi output |
---|
| 1273 | new.block |
---|
| 1274 | format.note output |
---|
| 1275 | format.eprint output |
---|
| 1276 | format.url output |
---|
| 1277 | fin.entry |
---|
| 1278 | } |
---|
| 1279 | |
---|
| 1280 | FUNCTION {unpublished} |
---|
| 1281 | { "%Type = Unpublished" write$ |
---|
| 1282 | output.bibitem |
---|
| 1283 | format.authors "author" output.check |
---|
| 1284 | author format.key output |
---|
| 1285 | new.block |
---|
| 1286 | format.title "title" output.check |
---|
| 1287 | format.date "year" output.check |
---|
| 1288 | format.doi output |
---|
| 1289 | new.block |
---|
| 1290 | format.note "note" output.check |
---|
| 1291 | format.eprint output |
---|
| 1292 | format.url output |
---|
| 1293 | fin.entry |
---|
| 1294 | } |
---|
| 1295 | |
---|
| 1296 | FUNCTION {default.type} { misc } |
---|
| 1297 | READ |
---|
| 1298 | FUNCTION {sortify} |
---|
| 1299 | { purify$ |
---|
| 1300 | "l" change.case$ |
---|
| 1301 | } |
---|
| 1302 | INTEGERS { len } |
---|
| 1303 | FUNCTION {chop.word} |
---|
| 1304 | { 's := |
---|
| 1305 | 'len := |
---|
| 1306 | s #1 len substring$ = |
---|
| 1307 | { s len #1 + global.max$ substring$ } |
---|
| 1308 | 's |
---|
| 1309 | if$ |
---|
| 1310 | } |
---|
| 1311 | FUNCTION {format.lab.names} |
---|
| 1312 | { 's := |
---|
| 1313 | "" 't := |
---|
| 1314 | s #1 "{vv~}{ll}" format.name$ |
---|
| 1315 | s num.names$ duplicate$ |
---|
| 1316 | #2 > |
---|
| 1317 | { pop$ |
---|
| 1318 | " " * bbl.etal * |
---|
| 1319 | } |
---|
| 1320 | { #2 < |
---|
| 1321 | 'skip$ |
---|
| 1322 | { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = |
---|
| 1323 | { |
---|
| 1324 | " " * bbl.etal * |
---|
| 1325 | } |
---|
| 1326 | { bbl.and space.word * s #2 "{vv~}{ll}" format.name$ |
---|
| 1327 | * } |
---|
| 1328 | if$ |
---|
| 1329 | } |
---|
| 1330 | if$ |
---|
| 1331 | } |
---|
| 1332 | if$ |
---|
| 1333 | } |
---|
| 1334 | |
---|
| 1335 | FUNCTION {author.key.label} |
---|
| 1336 | { author empty$ |
---|
| 1337 | { key empty$ |
---|
| 1338 | { cite$ #1 #3 substring$ } |
---|
| 1339 | 'key |
---|
| 1340 | if$ |
---|
| 1341 | } |
---|
| 1342 | { author format.lab.names } |
---|
| 1343 | if$ |
---|
| 1344 | } |
---|
| 1345 | |
---|
| 1346 | FUNCTION {author.editor.key.label} |
---|
| 1347 | { author empty$ |
---|
| 1348 | { editor empty$ |
---|
| 1349 | { key empty$ |
---|
| 1350 | { cite$ #1 #3 substring$ } |
---|
| 1351 | 'key |
---|
| 1352 | if$ |
---|
| 1353 | } |
---|
| 1354 | { editor format.lab.names } |
---|
| 1355 | if$ |
---|
| 1356 | } |
---|
| 1357 | { author format.lab.names } |
---|
| 1358 | if$ |
---|
| 1359 | } |
---|
| 1360 | |
---|
| 1361 | FUNCTION {editor.key.label} |
---|
| 1362 | { editor empty$ |
---|
| 1363 | { key empty$ |
---|
| 1364 | { cite$ #1 #3 substring$ } |
---|
| 1365 | 'key |
---|
| 1366 | if$ |
---|
| 1367 | } |
---|
| 1368 | { editor format.lab.names } |
---|
| 1369 | if$ |
---|
| 1370 | } |
---|
| 1371 | |
---|
| 1372 | FUNCTION {calc.short.authors} |
---|
| 1373 | { type$ "book" = |
---|
| 1374 | type$ "inbook" = |
---|
| 1375 | or |
---|
| 1376 | 'author.editor.key.label |
---|
| 1377 | { type$ "proceedings" = |
---|
| 1378 | 'editor.key.label |
---|
| 1379 | 'author.key.label |
---|
| 1380 | if$ |
---|
| 1381 | } |
---|
| 1382 | if$ |
---|
| 1383 | 'short.list := |
---|
| 1384 | } |
---|
| 1385 | |
---|
| 1386 | FUNCTION {calc.label} |
---|
| 1387 | { calc.short.authors |
---|
| 1388 | short.list |
---|
| 1389 | "(" |
---|
| 1390 | * |
---|
| 1391 | year duplicate$ empty$ |
---|
| 1392 | short.list key field.or.null = or |
---|
| 1393 | { pop$ "" } |
---|
| 1394 | 'skip$ |
---|
| 1395 | if$ |
---|
| 1396 | * |
---|
| 1397 | 'label := |
---|
| 1398 | } |
---|
| 1399 | |
---|
| 1400 | FUNCTION {sort.format.names} |
---|
| 1401 | { 's := |
---|
| 1402 | #1 'nameptr := |
---|
| 1403 | "" |
---|
| 1404 | s num.names$ 'numnames := |
---|
| 1405 | numnames 'namesleft := |
---|
| 1406 | { namesleft #0 > } |
---|
| 1407 | { s nameptr |
---|
| 1408 | "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" |
---|
| 1409 | format.name$ 't := |
---|
| 1410 | nameptr #1 > |
---|
| 1411 | { |
---|
| 1412 | " " * |
---|
| 1413 | namesleft #1 = t "others" = and |
---|
| 1414 | { "zzzzz" * } |
---|
| 1415 | { t sortify * } |
---|
| 1416 | if$ |
---|
| 1417 | } |
---|
| 1418 | { t sortify * } |
---|
| 1419 | if$ |
---|
| 1420 | nameptr #1 + 'nameptr := |
---|
| 1421 | namesleft #1 - 'namesleft := |
---|
| 1422 | } |
---|
| 1423 | while$ |
---|
| 1424 | } |
---|
| 1425 | |
---|
| 1426 | FUNCTION {sort.format.title} |
---|
| 1427 | { 't := |
---|
| 1428 | "A " #2 |
---|
| 1429 | "An " #3 |
---|
| 1430 | "The " #4 t chop.word |
---|
| 1431 | chop.word |
---|
| 1432 | chop.word |
---|
| 1433 | sortify |
---|
| 1434 | #1 global.max$ substring$ |
---|
| 1435 | } |
---|
| 1436 | FUNCTION {author.sort} |
---|
| 1437 | { author empty$ |
---|
| 1438 | { key empty$ |
---|
| 1439 | { "to sort, need author or key in " cite$ * warning$ |
---|
| 1440 | "" |
---|
| 1441 | } |
---|
| 1442 | { key sortify } |
---|
| 1443 | if$ |
---|
| 1444 | } |
---|
| 1445 | { author sort.format.names } |
---|
| 1446 | if$ |
---|
| 1447 | } |
---|
| 1448 | FUNCTION {author.editor.sort} |
---|
| 1449 | { author empty$ |
---|
| 1450 | { editor empty$ |
---|
| 1451 | { key empty$ |
---|
| 1452 | { "to sort, need author, editor, or key in " cite$ * warning$ |
---|
| 1453 | "" |
---|
| 1454 | } |
---|
| 1455 | { key sortify } |
---|
| 1456 | if$ |
---|
| 1457 | } |
---|
| 1458 | { editor sort.format.names } |
---|
| 1459 | if$ |
---|
| 1460 | } |
---|
| 1461 | { author sort.format.names } |
---|
| 1462 | if$ |
---|
| 1463 | } |
---|
| 1464 | FUNCTION {editor.sort} |
---|
| 1465 | { editor empty$ |
---|
| 1466 | { key empty$ |
---|
| 1467 | { "to sort, need editor or key in " cite$ * warning$ |
---|
| 1468 | "" |
---|
| 1469 | } |
---|
| 1470 | { key sortify } |
---|
| 1471 | if$ |
---|
| 1472 | } |
---|
| 1473 | { editor sort.format.names } |
---|
| 1474 | if$ |
---|
| 1475 | } |
---|
| 1476 | INTEGERS { seq.num } |
---|
| 1477 | FUNCTION {init.seq} |
---|
| 1478 | { #0 'seq.num :=} |
---|
| 1479 | EXECUTE {init.seq} |
---|
| 1480 | FUNCTION {int.to.fix} |
---|
| 1481 | { "000000000" swap$ int.to.str$ * |
---|
| 1482 | #-1 #10 substring$ |
---|
| 1483 | } |
---|
| 1484 | FUNCTION {presort} |
---|
| 1485 | { calc.label |
---|
| 1486 | label sortify |
---|
| 1487 | " " |
---|
| 1488 | * |
---|
| 1489 | seq.num #1 + 'seq.num := |
---|
| 1490 | seq.num int.to.fix |
---|
| 1491 | 'sort.label := |
---|
| 1492 | sort.label |
---|
| 1493 | * |
---|
| 1494 | " " |
---|
| 1495 | * |
---|
| 1496 | title field.or.null |
---|
| 1497 | sort.format.title |
---|
| 1498 | * |
---|
| 1499 | #1 entry.max$ substring$ |
---|
| 1500 | 'sort.key$ := |
---|
| 1501 | } |
---|
| 1502 | |
---|
| 1503 | ITERATE {presort} |
---|
| 1504 | SORT |
---|
| 1505 | STRINGS { last.label next.extra } |
---|
| 1506 | INTEGERS { last.extra.num number.label } |
---|
| 1507 | FUNCTION {initialize.extra.label.stuff} |
---|
| 1508 | { #0 int.to.chr$ 'last.label := |
---|
| 1509 | "" 'next.extra := |
---|
| 1510 | #0 'last.extra.num := |
---|
| 1511 | #0 'number.label := |
---|
| 1512 | } |
---|
| 1513 | FUNCTION {forward.pass} |
---|
| 1514 | { last.label label = |
---|
| 1515 | { last.extra.num #1 + 'last.extra.num := |
---|
| 1516 | last.extra.num int.to.chr$ 'extra.label := |
---|
| 1517 | } |
---|
| 1518 | { "a" chr.to.int$ 'last.extra.num := |
---|
| 1519 | "" 'extra.label := |
---|
| 1520 | label 'last.label := |
---|
| 1521 | } |
---|
| 1522 | if$ |
---|
| 1523 | number.label #1 + 'number.label := |
---|
| 1524 | } |
---|
| 1525 | FUNCTION {reverse.pass} |
---|
| 1526 | { next.extra "b" = |
---|
| 1527 | { "a" 'extra.label := } |
---|
| 1528 | 'skip$ |
---|
| 1529 | if$ |
---|
| 1530 | extra.label 'next.extra := |
---|
| 1531 | extra.label |
---|
| 1532 | duplicate$ empty$ |
---|
| 1533 | 'skip$ |
---|
| 1534 | { "{\natexlab{" swap$ * "}}" * } |
---|
| 1535 | if$ |
---|
| 1536 | 'extra.label := |
---|
| 1537 | label extra.label * 'label := |
---|
| 1538 | } |
---|
| 1539 | EXECUTE {initialize.extra.label.stuff} |
---|
| 1540 | ITERATE {forward.pass} |
---|
| 1541 | REVERSE {reverse.pass} |
---|
| 1542 | FUNCTION {bib.sort.order} |
---|
| 1543 | { sort.label |
---|
| 1544 | " " |
---|
| 1545 | * |
---|
| 1546 | year field.or.null sortify |
---|
| 1547 | * |
---|
| 1548 | " " |
---|
| 1549 | * |
---|
| 1550 | title field.or.null |
---|
| 1551 | sort.format.title |
---|
| 1552 | * |
---|
| 1553 | #1 entry.max$ substring$ |
---|
| 1554 | 'sort.key$ := |
---|
| 1555 | } |
---|
| 1556 | ITERATE {bib.sort.order} |
---|
| 1557 | SORT |
---|
| 1558 | FUNCTION {begin.bib} |
---|
| 1559 | { preamble$ empty$ |
---|
| 1560 | 'skip$ |
---|
| 1561 | { preamble$ write$ newline$ } |
---|
| 1562 | if$ |
---|
| 1563 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * |
---|
| 1564 | write$ newline$ |
---|
| 1565 | "\providecommand{\natexlab}[1]{#1}" |
---|
| 1566 | write$ newline$ |
---|
| 1567 | "\providecommand{\url}[1]{\texttt{#1}}" |
---|
| 1568 | write$ newline$ |
---|
| 1569 | "\providecommand{\urlprefix}{URL }" |
---|
| 1570 | write$ newline$ |
---|
| 1571 | "\expandafter\ifx\csname urlstyle\endcsname\relax" |
---|
| 1572 | write$ newline$ |
---|
| 1573 | " \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else" |
---|
| 1574 | write$ newline$ |
---|
| 1575 | " \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi" |
---|
| 1576 | write$ newline$ |
---|
| 1577 | "\providecommand{\eprint}[2][]{\url{#2}}" |
---|
| 1578 | write$ newline$ |
---|
| 1579 | "\providecommand{\bibinfo}[2]{#2}" |
---|
| 1580 | write$ newline$ |
---|
| 1581 | "\ifx\xfnm\undefined \def\xfnm[#1]{\unskip,\space#1}\fi" |
---|
| 1582 | write$ newline$ |
---|
| 1583 | "\makeatletter\def\@biblabel#1{#1.}\makeatother" |
---|
| 1584 | write$ newline$ |
---|
| 1585 | } |
---|
| 1586 | EXECUTE {begin.bib} |
---|
| 1587 | EXECUTE {init.state.consts} |
---|
| 1588 | ITERATE {call.type$} |
---|
| 1589 | FUNCTION {end.bib} |
---|
| 1590 | { newline$ |
---|
| 1591 | "\end{thebibliography}" write$ newline$ |
---|
| 1592 | } |
---|
| 1593 | EXECUTE {end.bib} |
---|
| 1594 | %% End of customized bst file |
---|
| 1595 | %% |
---|
| 1596 | %% End of file `model3a-num-names.bst'. |
---|