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