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