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