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