1 " % $Id: html-btxbst.doc 1.5 2010/12/08 19:02:34 dds Exp $\n"
3 " % This file is either \"html-btxbst.doc\" or was derived from\n"
4 " % \"html-btxbst.doc\" using cpp. \"html-btxbst.doc\" itself was edited\n"
5 " % from \"btxbst.doc\" and \"named.bst\".\n"
6 " % The following copyright information is from btxbst.doc:\n"
7 " % version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.\n"
8 " % Copyright (C) 1985, all rights reserved.\n"
9 " % Copying of this file is authorized only if either\n"
10 " % (1) you make absolutely no changes to your copy, including name, or\n"
11 " % (2) if you do make changes, you name it something other than\n"
12 " % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.\n"
13 " % This restriction helps ensure that all standard styles are identical.\n"
14 " % The file btxbst.doc has the documentation for this style.\n"
15 " % \"named\" style (sorted keys of the form [name, year])\n"
16 " % Some code for this was taken from \"named.bst\".\n"
51 " { label extra.label sort.label }\n"
53 "INTEGERS { output.state before.all mid.sentence after.sentence after.block }\n"
55 "FUNCTION {init.state.consts}\n"
56 "{ #0 'before.all :=\n"
57 " #1 'mid.sentence :=\n"
58 " #2 'after.sentence :=\n"
59 " #3 'after.block :=\n"
64 "FUNCTION {output.nonnull}\n"
66 " output.state mid.sentence =\n"
67 " { \", \" * write$ }\n"
68 " { output.state after.block =\n"
69 " { add.period$ write$\n"
72 " { output.state before.all =\n"
74 " { add.period$ \" \" * write$ }\n"
78 " mid.sentence 'output.state :=\n"
85 "{ duplicate$ empty$\n"
91 "FUNCTION {output.check}\n"
93 " duplicate$ empty$\n"
94 " { pop$ \"empty \" t * \" in \" * cite$ * warning$ }\n"
99 "FUNCTION {output.bibitem}\n"
103 " { organization empty$\n"
105 " { \"<!-- Authors: \" organization purify$ * \" -->\" * write$ newline$ }\n"
108 " { \"<!-- Authors: \" editor purify$ * \" -->\" * write$ newline$ }\n"
111 " { \"<!-- Authors: \" author purify$ * \" -->\" * write$ newline$ }\n"
115 " { \"<!-- Keywords: \" keywords * \" -->\" * write$ newline$ }\n"
117 " \"<dt><a name=\" quote$ * \"CITEREF_\" * cite$ * quote$ * \">[\" * label * \"]</a></dt><dd>\" * write$\n"
119 " before.all 'output.state :=\n"
122 "FUNCTION {fin.entry}\n"
125 " postscript empty$\n"
127 " { newline$ \"<!-- PostScript: \" postscript * \" -->\" * write$ }\n"
131 " { newline$ \"<!-- PDF: \" pdf * \" -->\" * write$ }\n"
135 " { newline$ \"<!-- DVI: \" dvi * \" -->\" * write$ }\n"
139 " { newline$ \"<!-- DOI: \" doi * \" -->\" * write$ }\n"
141 " \"</dd>\" write$\n"
146 "FUNCTION {new.block}\n"
147 "{ output.state before.all =\n"
149 " { after.block 'output.state := }\n"
153 "FUNCTION {new.sentence}\n"
154 "{ output.state after.block =\n"
156 " { output.state before.all =\n"
158 " { after.sentence 'output.state := }\n"
182 "FUNCTION {str.to.int}\n"
186 " { s empty$ not }\n"
187 " { % Multiply the number on the top of the stack by 10 = 1010 binary\n"
188 " duplicate$ + % x2\n"
189 " duplicate$ % x2 x2\n"
190 " duplicate$ + duplicate$ + % x2 x8\n"
192 " s #1 #1 substring$ chr.to.int$ #48 - + % #48 is ascii for '0'\n"
193 " s #2 global.max$ substring$ 's :=\n"
198 "FUNCTION {new.block.checka}\n"
205 "FUNCTION {new.block.checkb}\n"
214 "FUNCTION {new.sentence.checka}\n"
221 "FUNCTION {new.sentence.checkb}\n"
230 "FUNCTION {field.or.null}\n"
231 "{ duplicate$ empty$\n"
237 "FUNCTION {emphasize}\n"
238 "{ duplicate$ empty$\n"
240 " { \"<em>\" swap$ * \"</em>\" * }\n"
244 "FUNCTION {add.link} % title\n"
252 " { \"<a href=\" quote$ * html * quote$ * \">\" * t * \"</a>\" * }\n"
254 " { \"<a href=\" quote$ * url * quote$ * \">\" * t * \"</a>\" * }\n"
260 "FUNCTION {add.mailto} % authors\n"
267 " { \"<a href=\" quote$ * \"mailto:\" * mailto * quote$ * \">\" * t * \"</a>\" * }\n"
273 "INTEGERS { nameptr namesleft numnames }\n"
275 "FUNCTION {format.names}\n"
278 " s num.names$ 'numnames :=\n"
279 " numnames 'namesleft :=\n"
280 " { namesleft #0 > }\n"
281 " { s nameptr \"{ff~}{vv~}{ll}{, jj}\" format.name$ 't :=\n"
282 " \"\\bibxhtmlname{\" t * \"}\" * 't :=\n"
284 " { namesleft #1 >\n"
285 " { \", \" * t * }\n"
291 " { \" et~al.\" * }\n"
292 " { \" and \" * t * }\n"
299 " nameptr #1 + 'nameptr :=\n"
300 " namesleft #1 - 'namesleft :=\n"
305 "FUNCTION {format.authors}\n"
308 " { author format.names }\n"
313 "FUNCTION {format.editors}\n"
316 " { editor format.names\n"
317 " editor num.names$ #1 >\n"
318 " { \", editors\" * }\n"
319 " { \", editor\" * }\n"
325 "FUNCTION {format.title}\n"
328 " { title \"t\" change.case$ }\n"
333 "FUNCTION {n.dashify}\n"
336 " { t empty$ not }\n"
337 " { t #1 #1 substring$ \"-\" =\n"
338 " { t #1 #2 substring$ \"--\" = not\n"
340 " t #2 global.max$ substring$ 't :=\n"
342 " { { t #1 #1 substring$ \"-\" = }\n"
344 " t #2 global.max$ substring$ 't :=\n"
350 " { t #1 #1 substring$ *\n"
351 " t #2 global.max$ substring$ 't :=\n"
358 "FUNCTION {format.date}\n"
362 " { \"there's a month but no year in \" cite$ * warning$\n"
369 " { month \" \" * year * }\n"
375 "FUNCTION {format.btitle}\n"
376 "{ title emphasize\n"
380 "FUNCTION {tie.or.space.connect}\n"
381 "{ duplicate$ text.length$ #3 <\n"
388 "FUNCTION {either.or.check}\n"
391 " { \"can't use both \" swap$ * \" fields in \" * cite$ * warning$ }\n"
395 "FUNCTION {format.bvolume}\n"
398 " { \"volume\" volume tie.or.space.connect\n"
401 " { \" of \" * series emphasize * }\n"
403 " \"volume and number\" number either.or.check\n"
408 "FUNCTION {format.number.series}\n"
411 " { series field.or.null }\n"
412 " { output.state mid.sentence =\n"
416 " number tie.or.space.connect\n"
418 " { \"there's a number but no series in \" cite$ * warning$ }\n"
419 " { \" in \" * series * }\n"
428 "FUNCTION {format.edition}\n"
431 " { output.state mid.sentence =\n"
432 " { edition \"l\" change.case$ \" edition\" * }\n"
433 " { edition \"t\" change.case$ \" edition\" * }\n"
439 "INTEGERS { multiresult }\n"
441 "FUNCTION {multi.page.check}\n"
443 " #0 'multiresult :=\n"
444 " { multiresult not\n"
448 " { t #1 #1 substring$\n"
449 " duplicate$ \"-\" =\n"
450 " swap$ duplicate$ \",\" =\n"
453 " { #1 'multiresult := }\n"
454 " { t #2 global.max$ substring$ 't := }\n"
461 "FUNCTION {format.pages}\n"
464 " { pages multi.page.check\n"
465 " { \"pages\" pages n.dashify tie.or.space.connect }\n"
466 " { \"page\" pages tie.or.space.connect }\n"
472 "FUNCTION {format.vol.num.pages}\n"
473 "{ volume field.or.null\n"
476 " { \"(\" number * \")\" * *\n"
478 " { \"there's a number but no volume in \" cite$ * warning$ }\n"
485 " { duplicate$ empty$\n"
486 " { pop$ format.pages }\n"
487 " { \":\" * pages n.dashify * }\n"
493 "FUNCTION {format.chapter.pages}\n"
498 " { type \"l\" change.case$ }\n"
500 " chapter tie.or.space.connect\n"
503 " { \", \" * format.pages * }\n"
509 "FUNCTION {format.in.ed.booktitle}\n"
510 "{ booktitle empty$\n"
513 " { \"In \" booktitle emphasize * }\n"
514 " { \"In \" format.editors * \", \" * booktitle emphasize * }\n"
520 "FUNCTION {empty.misc.check}\n"
521 "{ author empty$ title empty$ howpublished empty$\n"
522 " month empty$ year empty$ note empty$\n"
523 " and and and and and\n"
524 " key empty$ not and\n"
525 " { \"all relevant fields are empty in \" cite$ * warning$ }\n"
530 "FUNCTION {format.thesis.type}\n"
534 " type \"t\" change.case$\n"
539 "FUNCTION {format.tr.number}\n"
541 " { \"Technical Report\" }\n"
545 " { \"t\" change.case$ }\n"
546 " { number tie.or.space.connect }\n"
550 "FUNCTION {format.article.crossref}\n"
552 " \"In <a href=\" quote$ * \"#\" * crossref * quote$ * \">\" *\n"
554 " { journal empty$\n"
555 " { \"need key or journal for \" cite$ * \" to crossref \" * crossref *\n"
559 " { \"<cite>\" * journal * \"</cite>\" * }\n"
564 " \"</a> \\citelabel{\" * crossref * \"}\" *\n"
567 "FUNCTION {format.crossref.editor}\n"
568 "{ editor #1 \"{vv~}{ll}\" format.name$\n"
569 " editor num.names$ duplicate$\n"
571 " { pop$ \" et~al.\" * }\n"
574 " { editor #2 \"{ff }{vv }{ll}{ jj}\" format.name$ \"others\" =\n"
575 " { \" et~al.\" * }\n"
576 " { \" and \" * editor #2 \"{vv~}{ll}\" format.name$ * }\n"
584 "FUNCTION {format.book.crossref}\n"
586 " { \"empty volume in \" cite$ * \"'s crossref of \" * crossref * warning$\n"
589 " { \"Volume\" volume tie.or.space.connect\n"
593 " \"<a href=\" * quote$ * \"#\" * crossref * quote$ * \">\" *\n"
595 " editor field.or.null author field.or.null =\n"
599 " { \"need editor, key, or series for \" cite$ * \" to crossref \" *\n"
600 " crossref * warning$\n"
603 " { \"<cite>\" * series * \"</cite>\" * }\n"
609 " { format.crossref.editor * }\n"
611 " \"</a> \\citelabel{\" * crossref * \"}\" *\n"
614 "FUNCTION {format.incoll.inproc.crossref}\n"
616 " \"In <a href=\" quote$ * \"#\" * crossref * quote$ * \">\" *\n"
618 " editor field.or.null author field.or.null =\n"
621 " { booktitle empty$\n"
622 " { \"need editor, key, or booktitle for \" cite$ * \" to crossref \" *\n"
623 " crossref * warning$\n"
626 " { \"<cite>\" * booktitle * \"</cite>\" * }\n"
632 " { format.crossref.editor * }\n"
634 " \"</a> \\citelabel{\" * crossref * \"}\" *\n"
637 "FUNCTION {article}\n"
639 " format.authors \"author\" output.check\n"
641 " format.title \"title\" output.check\n"
643 " crossref missing$\n"
644 " { journal emphasize \"journal\" output.check\n"
645 " format.vol.num.pages output\n"
646 " format.date \"year\" output.check\n"
648 " { format.article.crossref output.nonnull\n"
649 " format.pages output\n"
660 " { format.editors \"author and editor\" output.check }\n"
661 " { format.authors output.nonnull\n"
662 " crossref missing$\n"
663 " { \"author and editor\" editor either.or.check }\n"
669 " format.btitle \"title\" output.check\n"
670 " crossref missing$\n"
671 " { format.bvolume output\n"
673 " format.number.series output\n"
675 " publisher \"publisher\" output.check\n"
679 " format.book.crossref output.nonnull\n"
682 " format.edition output\n"
683 " format.date \"year\" output.check\n"
689 "FUNCTION {booklet}\n"
691 " format.authors output\n"
693 " format.title \"title\" output.check\n"
694 " howpublished address new.block.checkb\n"
695 " howpublished output\n"
697 " format.date output\n"
703 "FUNCTION {inbook}\n"
706 " { format.editors \"author and editor\" output.check }\n"
707 " { format.authors output.nonnull\n"
708 " crossref missing$\n"
709 " { \"author and editor\" editor either.or.check }\n"
715 " format.btitle \"title\" output.check\n"
716 " crossref missing$\n"
717 " { format.bvolume output\n"
718 " format.chapter.pages \"chapter and pages\" output.check\n"
720 " format.number.series output\n"
722 " publisher \"publisher\" output.check\n"
725 " { format.chapter.pages \"chapter and pages\" output.check\n"
727 " format.book.crossref output.nonnull\n"
730 " format.edition output\n"
731 " format.date \"year\" output.check\n"
737 "FUNCTION {incollection}\n"
739 " format.authors \"author\" output.check\n"
741 " format.title \"title\" output.check\n"
743 " crossref missing$\n"
744 " { format.in.ed.booktitle \"booktitle\" output.check\n"
745 " format.bvolume output\n"
746 " format.number.series output\n"
747 " format.chapter.pages output\n"
749 " publisher \"publisher\" output.check\n"
751 " format.edition output\n"
752 " format.date \"year\" output.check\n"
754 " { format.incoll.inproc.crossref output.nonnull\n"
755 " format.chapter.pages output\n"
763 "FUNCTION {inproceedings}\n"
765 " format.authors \"author\" output.check\n"
767 " format.title \"title\" output.check\n"
769 " crossref missing$\n"
770 " { format.in.ed.booktitle \"booktitle\" output.check\n"
771 " format.bvolume output\n"
772 " format.number.series output\n"
773 " format.pages output\n"
775 " { organization publisher new.sentence.checkb\n"
776 " organization output\n"
777 " publisher output\n"
778 " format.date \"year\" output.check\n"
780 " { address output.nonnull\n"
781 " format.date \"year\" output.check\n"
783 " organization output\n"
784 " publisher output\n"
788 " { format.incoll.inproc.crossref output.nonnull\n"
789 " format.pages output\n"
797 "FUNCTION {conference} { inproceedings }\n"
799 "FUNCTION {manual}\n"
802 " { organization empty$\n"
804 " { organization output.nonnull\n"
809 " { format.authors output.nonnull }\n"
812 " format.btitle \"title\" output.check\n"
814 " { organization empty$\n"
815 " { address new.block.checka\n"
821 " { organization address new.block.checkb\n"
822 " organization output\n"
826 " format.edition output\n"
827 " format.date output\n"
833 "FUNCTION {mastersthesis}\n"
835 " format.authors \"author\" output.check\n"
837 " format.title \"title\" output.check\n"
839 " \"Master's thesis\" format.thesis.type output.nonnull\n"
840 " school \"school\" output.check\n"
842 " format.date \"year\" output.check\n"
850 " format.authors output\n"
851 " title howpublished new.block.checkb\n"
852 " format.title output\n"
853 " howpublished new.block.checka\n"
854 " howpublished output\n"
855 " format.date output\n"
859 " empty.misc.check\n"
862 "FUNCTION {phdthesis}\n"
864 " format.authors \"author\" output.check\n"
866 " format.btitle \"title\" output.check\n"
868 " \"PhD thesis\" format.thesis.type output.nonnull\n"
869 " school \"school\" output.check\n"
871 " format.date \"year\" output.check\n"
877 "FUNCTION {proceedings}\n"
880 " { organization output }\n"
881 " { format.editors output.nonnull }\n"
884 " format.btitle \"title\" output.check\n"
885 " format.bvolume output\n"
886 " format.number.series output\n"
889 " { publisher new.sentence.checka }\n"
890 " { organization publisher new.sentence.checkb\n"
891 " organization output\n"
894 " publisher output\n"
895 " format.date \"year\" output.check\n"
897 " { address output.nonnull\n"
898 " format.date \"year\" output.check\n"
902 " { organization output }\n"
904 " publisher output\n"
912 "FUNCTION {techreport}\n"
914 " format.authors \"author\" output.check\n"
916 " format.title \"title\" output.check\n"
918 " format.tr.number output.nonnull\n"
919 " institution \"institution\" output.check\n"
921 " format.date \"year\" output.check\n"
927 "FUNCTION {unpublished}\n"
929 " format.authors \"author\" output.check\n"
931 " format.title \"title\" output.check\n"
933 " note \"note\" output.check\n"
934 " format.date output\n"
938 "FUNCTION {default.type} { misc }\n"
940 "MACRO {jan} {\"January\"}\n"
942 "MACRO {feb} {\"February\"}\n"
944 "MACRO {mar} {\"March\"}\n"
946 "MACRO {apr} {\"April\"}\n"
948 "MACRO {may} {\"May\"}\n"
950 "MACRO {jun} {\"June\"}\n"
952 "MACRO {jul} {\"July\"}\n"
954 "MACRO {aug} {\"August\"}\n"
956 "MACRO {sep} {\"September\"}\n"
958 "MACRO {oct} {\"October\"}\n"
960 "MACRO {nov} {\"November\"}\n"
962 "MACRO {dec} {\"December\"}\n"
964 "MACRO {acmcs} {\"ACM Computing Surveys\"}\n"
966 "MACRO {acta} {\"Acta Informatica\"}\n"
968 "MACRO {cacm} {\"Communications of the ACM\"}\n"
970 "MACRO {ibmjrd} {\"IBM Journal of Research and Development\"}\n"
972 "MACRO {ibmsj} {\"IBM Systems Journal\"}\n"
974 "MACRO {ieeese} {\"IEEE Transactions on Software Engineering\"}\n"
976 "MACRO {ieeetc} {\"IEEE Transactions on Computers\"}\n"
979 " {\"IEEE Transactions on Computer-Aided Design of Integrated Circuits\"}\n"
981 "MACRO {ipl} {\"Information Processing Letters\"}\n"
983 "MACRO {jacm} {\"Journal of the ACM\"}\n"
985 "MACRO {jcss} {\"Journal of Computer and System Sciences\"}\n"
987 "MACRO {scp} {\"Science of Computer Programming\"}\n"
989 "MACRO {sicomp} {\"SIAM Journal on Computing\"}\n"
991 "MACRO {tocs} {\"ACM Transactions on Computer Systems\"}\n"
993 "MACRO {tods} {\"ACM Transactions on Database Systems\"}\n"
995 "MACRO {tog} {\"ACM Transactions on Graphics\"}\n"
997 "MACRO {toms} {\"ACM Transactions on Mathematical Software\"}\n"
999 "MACRO {toois} {\"ACM Transactions on Office Information Systems\"}\n"
1001 "MACRO {toplas} {\"ACM Transactions on Programming Languages and Systems\"}\n"
1003 "MACRO {tcs} {\"Theoretical Computer Science\"}\n"
1007 "FUNCTION {sortify}\n"
1009 " \"l\" change.case$\n"
1012 "INTEGERS { len }\n"
1014 "FUNCTION {chop.word}\n"
1017 " s #1 len substring$ =\n"
1018 " { s len #1 + global.max$ substring$ }\n"
1024 "FUNCTION {format.lab.names}\n"
1026 " s num.names$ 'numnames :=\n"
1028 " { s #1 \"{vv }{ll}\" format.name$ }\n"
1029 " { numnames #2 =\n"
1030 " { s #1 \"{vv }{ll }and \" format.name$ s #2 \"{vv }{ll}\" format.name$ * }\n"
1031 " { s #1 \"{vv }{ll }\" format.name$ \"et~al.\" * }\n"
1037 "FUNCTION {author.key.label}\n"
1040 " { cite$ #1 #3 substring$ }\n"
1044 " { author format.lab.names }\n"
1048 "FUNCTION {author.editor.key.label}\n"
1050 " { editor empty$\n"
1052 " { cite$ #1 #3 substring$ }\n"
1056 " { editor format.lab.names }\n"
1059 " { author format.lab.names }\n"
1063 "FUNCTION {author.key.organization.label}\n"
1066 " { organization empty$\n"
1067 " { cite$ #1 #3 substring$ }\n"
1068 " { \"The \" #4 organization chop.word #3 text.prefix$ }\n"
1074 " { author format.lab.names }\n"
1078 "FUNCTION {editor.key.organization.label}\n"
1081 " { organization empty$\n"
1082 " { cite$ #1 #3 substring$ }\n"
1083 " { \"The \" #4 organization chop.word #3 text.prefix$ }\n"
1089 " { editor format.lab.names }\n"
1093 "FUNCTION {month.to.int}\n"
1095 " \"l\" change.case$ #3 text.prefix$\n"
1097 " s \"jan\" = { #1 } {\n"
1098 " s \"feb\" = { #2 } {\n"
1099 " s \"mar\" = { #3 } {\n"
1100 " s \"apr\" = { #4 } {\n"
1101 " s \"may\" = { #5 } {\n"
1102 " s \"jun\" = { #6 } {\n"
1103 " s \"jul\" = { #7 } {\n"
1104 " s \"aug\" = { #8 } {\n"
1105 " s \"sep\" = { #9 } {\n"
1106 " s \"oct\" = { #10 } {\n"
1107 " s \"nov\" = { #11 } {\n"
1108 " s \"dec\" = { #12 } { #13 } % 13 if nothing matches\n"
1109 " if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$}if$\n"
1112 "INTEGERS { done c } \n"
1113 "FUNCTION { get.day }\n"
1114 "{ month field.or.null 's :=\n"
1116 " % Strip out month name\n"
1118 " { s \"\" = not done not and }\n"
1119 " { s #1 #1 substring$ \" \" = 'done :=\n"
1120 " s #2 global.max$ substring$ 's :=\n"
1124 " % Build up first number in t\n"
1127 " { s \"\" = not done not and }\n"
1128 " { s #1 #1 substring$ chr.to.int$ 'c :=\n"
1129 " c #47 > c #58 < and\n"
1130 " { t c int.to.chr$ * 't := }\n"
1131 " { #1 'done := }\n"
1133 " s #2 global.max$ substring$ 's :=\n"
1140 "FUNCTION { sortify.fourdigit }\n"
1149 "FUNCTION { sortify.twodigit }\n"
1154 " str.to.int #10 + int.to.str$\n"
1159 "FUNCTION {calc.label}\n"
1160 "{ type$ \"book\" =\n"
1161 " type$ \"inbook\" =\n"
1163 " 'author.editor.key.label\n"
1164 " { type$ \"proceedings\" =\n"
1165 " 'editor.key.organization.label\n"
1166 " { type$ \"manual\" =\n"
1167 " 'author.key.organization.label\n"
1168 " 'author.key.label\n"
1180 " year field.or.null purify$ * % CHANGED - pfps - 15 Feb 1989\n"
1183 " year field.or.null purify$\n"
1184 " #-1 #4 substring$ \n"
1185 " sortify.fourdigit \n"
1187 " month field.or.null month.to.int int.to.str$ sortify.twodigit *\n"
1189 " get.day int.to.str$ sortify.twodigit *\n"
1191 " * sortify 'sort.label :=\n"
1194 "FUNCTION {sort.format.names}\n"
1198 " s num.names$ 'numnames :=\n"
1199 " numnames 'namesleft :=\n"
1200 " { namesleft #0 > }\n"
1205 " s nameptr \"{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}\" format.name$ 't :=\n"
1206 " nameptr numnames = t \"others\" = and\n"
1207 " { \"et al.\" * }\n"
1208 " { t sortify * }\n"
1210 " nameptr #1 + 'nameptr :=\n"
1211 " namesleft #1 - 'namesleft :=\n"
1216 "FUNCTION {sort.format.title}\n"
1220 " \"The \" #4 t chop.word\n"
1224 " #1 global.max$ substring$\n"
1227 "FUNCTION {author.sort}\n"
1230 " { \"to sort, need author or key in \" cite$ * warning$\n"
1233 " { key sortify }\n"
1236 " { author sort.format.names }\n"
1240 "FUNCTION {author.editor.sort}\n"
1242 " { editor empty$\n"
1244 " { \"to sort, need author, editor, or key in \" cite$ * warning$\n"
1247 " { key sortify }\n"
1250 " { editor sort.format.names }\n"
1253 " { author sort.format.names }\n"
1257 "FUNCTION {author.organization.sort}\n"
1259 " { organization empty$\n"
1261 " { \"to sort, need author, organization, or key in \" cite$ * warning$\n"
1264 " { key sortify }\n"
1267 " { \"The \" #4 organization chop.word sortify }\n"
1270 " { author sort.format.names }\n"
1274 "FUNCTION {editor.organization.sort}\n"
1276 " { organization empty$\n"
1278 " { \"to sort, need editor, organization, or key in \" cite$ * warning$\n"
1281 " { key sortify }\n"
1284 " { \"The \" #4 organization chop.word sortify }\n"
1287 " { editor sort.format.names }\n"
1291 "FUNCTION {presort}\n"
1296 " type$ \"book\" =\n"
1297 " type$ \"inbook\" =\n"
1299 " 'author.editor.sort\n"
1300 " { type$ \"proceedings\" =\n"
1301 " 'editor.organization.sort\n"
1302 " { type$ \"manual\" =\n"
1303 " 'author.organization.sort\n"
1313 " year field.or.null sortify\n"
1317 " title field.or.null\n"
1318 " sort.format.title\n"
1320 " #1 entry.max$ substring$\n"
1324 "ITERATE {presort}\n"
1328 "STRINGS { longest.label last.sort.label next.extra }\n"
1330 "INTEGERS { longest.label.width last.extra.num }\n"
1332 "FUNCTION {initialize.longest.label}\n"
1333 "{ \"\" 'longest.label :=\n"
1334 " #0 int.to.chr$ 'last.sort.label :=\n"
1335 " \"\" 'next.extra :=\n"
1336 " #0 'longest.label.width :=\n"
1337 " #0 'last.extra.num :=\n"
1340 "FUNCTION {forward.pass}\n"
1341 "{ last.sort.label sort.label =\n"
1342 " { last.extra.num #1 + 'last.extra.num :=\n"
1343 " last.extra.num int.to.chr$ 'extra.label :=\n"
1345 " { \"a\" chr.to.int$ 'last.extra.num :=\n"
1346 " \"\" 'extra.label :=\n"
1347 " sort.label 'last.sort.label :=\n"
1352 "FUNCTION {reverse.pass}\n"
1353 "{ next.extra \"b\" =\n"
1354 " { \"a\" 'extra.label := }\n"
1357 " label extra.label * 'label :=\n"
1358 " label width$ longest.label.width >\n"
1359 " { label 'longest.label :=\n"
1360 " label width$ 'longest.label.width :=\n"
1364 " extra.label 'next.extra :=\n"
1367 "EXECUTE {initialize.longest.label}\n"
1369 "ITERATE {forward.pass}\n"
1371 "REVERSE {reverse.pass}\n"
1373 "FUNCTION {begin.bib}\n"
1375 " \"# label-style: default\" write$ newline$\n"
1378 "EXECUTE {begin.bib}\n"
1380 "EXECUTE {init.state.consts}\n"
1382 "ITERATE {call.type$}\n"
1384 "FUNCTION {end.bib}\n"
1388 "EXECUTE {end.bib}\n"