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