Debian Codegraph @

texmf-dist/doc/latex/unamth-template/Latex/Classes/PhDbiblio-case.bst

raw
1 % BibTeX standard bibliography style `plain'
2 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
3 % Copyright (C) 1985, 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, and abbrv.bst.
8 % This restriction helps ensure that all standard styles are identical.
9 % The file btxbst.doc has the documentation for this style.
10
11 ENTRY
12 { address
13 author
14 booktitle
15 chapter
16 edition
17 editor
18 howpublished
19 institution
20 journal
21 key
22 month
23 note
24 number
25 organization
26 pages
27 publisher
28 school
29 series
30 title
31 type
32 volume
33 year
34 }
35 {}
36 { label }
37
38 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
39
40 FUNCTION {init.state.consts}
41 { #0 'before.all :=
42 #1 'mid.sentence :=
43 #2 'after.sentence :=
44 #3 'after.block :=
45 }
46
47 STRINGS { s t }
48
49 FUNCTION {output.nonnull}
50 { 's :=
51 output.state mid.sentence =
52 { ", " * write$ }
53 { output.state after.block =
54 { add.period$ write$
55 newline$
56 "\newblock " write$
57 }
58 { output.state before.all =
59 'write$
60 { add.period$ " " * write$ }
61 if$
62 }
63 if$
64 mid.sentence 'output.state :=
65 }
66 if$
67 s
68 }
69
70 FUNCTION {output}
71 { duplicate$ empty$
72 'pop$
73 'output.nonnull
74 if$
75 }
76
77 FUNCTION {output.check}
78 { 't :=
79 duplicate$ empty$
80 { pop$ "empty " t * " in " * cite$ * warning$ }
81 'output.nonnull
82 if$
83 }
84
85 FUNCTION {output.bibitem}
86 { newline$
87 "\bibitem{" write$
88 cite$ write$
89 "}" write$
90 newline$
91 ""
92 before.all 'output.state :=
93 }
94
95 FUNCTION {fin.entry}
96 { add.period$
97 write$
98 newline$
99 }
100
101 FUNCTION {new.block}
102 { output.state before.all =
103 'skip$
104 { after.block 'output.state := }
105 if$
106 }
107
108 FUNCTION {new.sentence}
109 { output.state after.block =
110 'skip$
111 { output.state before.all =
112 'skip$
113 { after.sentence 'output.state := }
114 if$
115 }
116 if$
117 }
118
119 FUNCTION {not}
120 { { #0 }
121 { #1 }
122 if$
123 }
124
125 FUNCTION {and}
126 { 'skip$
127 { pop$ #0 }
128 if$
129 }
130
131 FUNCTION {or}
132 { { pop$ #1 }
133 'skip$
134 if$
135 }
136
137 FUNCTION {new.block.checka}
138 { empty$
139 'skip$
140 'new.block
141 if$
142 }
143
144 FUNCTION {new.block.checkb}
145 { empty$
146 swap$ empty$
147 and
148 'skip$
149 'new.block
150 if$
151 }
152
153 FUNCTION {new.sentence.checka}
154 { empty$
155 'skip$
156 'new.sentence
157 if$
158 }
159
160 FUNCTION {new.sentence.checkb}
161 { empty$
162 swap$ empty$
163 and
164 'skip$
165 'new.sentence
166 if$
167 }
168
169 FUNCTION {field.or.null}
170 { duplicate$ empty$
171 { pop$ "" }
172 'skip$
173 if$
174 }
175
176 FUNCTION {emphasize}
177 { duplicate$ empty$
178 { pop$ "" }
179 { "{\em " swap$ * "}" * }
180 if$
181 }
182
183 FUNCTION {scapify}
184 { duplicate$ empty$
185 { pop$ "" }
186 { "{\sc " swap$ * "}" * }
187 if$
188 }
189
190 FUNCTION {boldify}
191 { duplicate$ empty$
192 { pop$ "" }
193 { "{\bf " swap$ * "}" * }
194 if$
195 }
196
197 INTEGERS { nameptr namesleft numnames }
198
199 FUNCTION {format.names}
200 { 's :=
201 #1 'nameptr :=
202 s num.names$ 'numnames :=
203 numnames 'namesleft :=
204 { namesleft #0 > }
205 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
206 nameptr #1 >
207 { namesleft #1 >
208 { ", " * t * }
209 { numnames #2 >
210 { "," * }
211 'skip$
212 if$
213 t "others" =
214 { " et~al." * }
215 { " and " * t * }
216 if$
217 }
218 if$
219 }
220 't
221 if$
222 nameptr #1 + 'nameptr :=
223 namesleft #1 - 'namesleft :=
224 }
225 while$
226 }
227
228 FUNCTION {format.authors}
229 { author empty$
230 { "" }
231 { author format.names scapify }
232 if$
233 }
234
235 FUNCTION {format.editors}
236 { editor empty$
237 { "" }
238 { editor format.names scapify
239 editor num.names$ #1 >
240 { ", editors" * }
241 { ", editor" * }
242 if$
243 }
244 if$
245 }
246
247 FUNCTION {format.title}
248 { title empty$
249 { "" }
250 { title "t" change.case$ }
251 if$
252 }
253
254 FUNCTION {n.dashify}
255 { 't :=
256 ""
257 { t empty$ not }
258 { t #1 #1 substring$ "-" =
259 { t #1 #2 substring$ "--" = not
260 { "--" *
261 t #2 global.max$ substring$ 't :=
262 }
263 { { t #1 #1 substring$ "-" = }
264 { "-" *
265 t #2 global.max$ substring$ 't :=
266 }
267 while$
268 }
269 if$
270 }
271 { t #1 #1 substring$ *
272 t #2 global.max$ substring$ 't :=
273 }
274 if$
275 }
276 while$
277 }
278
279 FUNCTION {format.date}
280 { year empty$
281 { month empty$
282 { "" }
283 { "there's a month but no year in " cite$ * warning$
284 month
285 }
286 if$
287 }
288 { month empty$
289 'year
290 { month " " * year * }
291 if$
292 }
293 if$
294 }
295
296 FUNCTION {format.btitle}
297 { title emphasize
298 }
299
300 FUNCTION {tie.or.space.connect}
301 { duplicate$ text.length$ #3 <
302 { "~" }
303 { " " }
304 if$
305 swap$ * *
306 }
307
308 FUNCTION {either.or.check}
309 { empty$
310 'pop$
311 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
312 if$
313 }
314
315 FUNCTION {format.bvolume}
316 { volume empty$
317 { "" }
318 { "" volume boldify tie.or.space.connect
319 series empty$
320 'skip$
321 { " of " * series emphasize * }
322 if$
323 "volume and number" number either.or.check
324 }
325 if$
326 }
327
328 FUNCTION {format.number.series}
329 { volume empty$
330 { number empty$
331 { series field.or.null }
332 { output.state mid.sentence =
333 { "number" }
334 { "Number" }
335 if$
336 number tie.or.space.connect
337 series empty$
338 { "there's a number but no series in " cite$ * warning$ }
339 { " in " * series * }
340 if$
341 }
342 if$
343 }
344 { "" }
345 if$
346 }
347
348 FUNCTION {format.edition}
349 { edition empty$
350 { "" }
351 { output.state mid.sentence =
352 { edition "l" change.case$ " edition" * }
353 { edition "t" change.case$ " edition" * }
354 if$
355 }
356 if$
357 }
358
359 INTEGERS { multiresult }
360
361 FUNCTION {multi.page.check}
362 { 't :=
363 #0 'multiresult :=
364 { multiresult not
365 t empty$ not
366 and
367 }
368 { t #1 #1 substring$
369 duplicate$ "-" =
370 swap$ duplicate$ "," =
371 swap$ "+" =
372 or or
373 { #1 'multiresult := }
374 { t #2 global.max$ substring$ 't := }
375 if$
376 }
377 while$
378 multiresult
379 }
380
381 FUNCTION {format.pages}
382 { pages empty$
383 { "" }
384 { pages multi.page.check
385 { "pages" pages n.dashify tie.or.space.connect }
386 { "page" pages tie.or.space.connect }
387 if$
388 }
389 if$
390 }
391
392 FUNCTION {format.vol.num.pages}
393 { volume field.or.null boldify
394 number empty$
395 'skip$
396 { "(" number * ")" * *
397 volume empty$
398 { "there's a number but no volume in " cite$ * warning$ }
399 'skip$
400 if$
401 }
402 if$
403 pages empty$
404 'skip$
405 { duplicate$ empty$
406 { pop$ format.pages }
407 { ":" * pages n.dashify * }
408 if$
409 }
410 if$
411 }
412
413 FUNCTION {format.chapter.pages}
414 { chapter empty$
415 'format.pages
416 { type empty$
417 { "chapter" }
418 { type "l" change.case$ }
419 if$
420 chapter tie.or.space.connect
421 pages empty$
422 'skip$
423 { ", " * format.pages * }
424 if$
425 }
426 if$
427 }
428
429 FUNCTION {format.in.ed.booktitle}
430 { booktitle empty$
431 { "" }
432 { editor empty$
433 { "In " booktitle emphasize * }
434 { "In " format.editors * ", " * booktitle emphasize * }
435 if$
436 }
437 if$
438 }
439
440 FUNCTION {empty.misc.check}
441 { author empty$ title empty$ howpublished empty$
442 month empty$ year empty$ note empty$
443 and and and and and
444 key empty$ not and
445 { "all relevant fields are empty in " cite$ * warning$ }
446 'skip$
447 if$
448 }
449
450 FUNCTION {format.thesis.type}
451 { type empty$
452 'skip$
453 { pop$
454 type "t" change.case$
455 }
456 if$
457 }
458
459 FUNCTION {format.tr.number}
460 { type empty$
461 { "Technical Report" }
462 'type
463 if$
464 number empty$
465 { "t" change.case$ }
466 { number tie.or.space.connect }
467 if$
468 }
469
470 FUNCTION {format.article.crossref}
471 { key empty$
472 { journal empty$
473 { "need key or journal for " cite$ * " to crossref " * crossref *
474 warning$
475 ""
476 }
477 { "In {\em " journal * "\/}" * }
478 if$
479 }
480 { "In " key * }
481 if$
482 " \cite{" * crossref * "}" *
483 }
484
485 FUNCTION {format.crossref.editor}
486 { editor #1 "{vv~}{ll}" format.name$
487 editor num.names$ duplicate$
488 #2 >
489 { pop$ " et~al." * }
490 { #2 <
491 'skip$
492 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
493 { " et~al." * }
494 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
495 if$
496 }
497 if$
498 }
499 if$
500 }
501
502 FUNCTION {format.book.crossref}
503 { volume empty$
504 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
505 "In "
506 }
507 { "Volume" volume tie.or.space.connect
508 " of " *
509 }
510 if$
511 editor empty$
512 editor field.or.null author field.or.null =
513 or
514 { key empty$
515 { series empty$
516 { "need editor, key, or series for " cite$ * " to crossref " *
517 crossref * warning$
518 "" *
519 }
520 { "{\em " * series * "\/}" * }
521 if$
522 }
523 { key * }
524 if$
525 }
526 { format.crossref.editor * }
527 if$
528 " \cite{" * crossref * "}" *
529 }
530
531 FUNCTION {format.incoll.inproc.crossref}
532 { editor empty$
533 editor field.or.null author field.or.null =
534 or
535 { key empty$
536 { booktitle empty$
537 { "need editor, key, or booktitle for " cite$ * " to crossref " *
538 crossref * warning$
539 ""
540 }
541 { "In {\em " booktitle * "\/}" * }
542 if$
543 }
544 { "In " key * }
545 if$
546 }
547 { "In " format.crossref.editor * }
548 if$
549 " \cite{" * crossref * "}" *
550 }
551
552 % --------------------------------------------------------------
553 % --------------------------------------------------------------
554
555 FUNCTION {article}
556 { output.bibitem
557 format.authors "author" output.check
558 new.block
559 format.title "title" output.check
560 new.block
561 crossref missing$
562 { journal emphasize "journal" output.check
563 format.vol.num.pages output
564 format.date "year" output.check
565 }
566 { format.article.crossref output.nonnull
567 format.pages output
568 }
569 if$
570 new.block
571 note output
572 fin.entry
573 }
574
575 FUNCTION {book}
576 { output.bibitem
577 author empty$
578 { format.editors "author and editor" output.check }
579 { format.authors output.nonnull
580 crossref missing$
581 { "author and editor" editor either.or.check }
582 'skip$
583 if$
584 }
585 if$
586 new.block
587 format.btitle "title" output.check
588 crossref missing$
589 { format.bvolume output
590 new.block
591 format.number.series output
592 new.sentence
593 publisher "publisher" output.check
594 address output
595 }
596 { new.block
597 format.book.crossref output.nonnull
598 }
599 if$
600 format.edition output
601 format.date "year" output.check
602 new.block
603 note output
604 fin.entry
605 }
606
607 FUNCTION {booklet}
608 { output.bibitem
609 format.authors output
610 new.block
611 format.title "title" output.check
612 howpublished address new.block.checkb
613 howpublished output
614 address output
615 format.date output
616 new.block
617 note output
618 fin.entry
619 }
620
621 FUNCTION {inbook}
622 { output.bibitem
623 author empty$
624 { format.editors "author and editor" output.check }
625 { format.authors output.nonnull
626 crossref missing$
627 { "author and editor" editor either.or.check }
628 'skip$
629 if$
630 }
631 if$
632 new.block
633 format.btitle "title" output.check
634 crossref missing$
635 { format.bvolume output
636 format.chapter.pages "chapter and pages" output.check
637 new.block
638 format.number.series output
639 new.sentence
640 publisher "publisher" output.check
641 address output
642 }
643 { format.chapter.pages "chapter and pages" output.check
644 new.block
645 format.book.crossref output.nonnull
646 }
647 if$
648 format.edition output
649 format.date "year" output.check
650 new.block
651 note output
652 fin.entry
653 }
654
655 FUNCTION {incollection}
656 { output.bibitem
657 format.authors "author" output.check
658 new.block
659 format.title "title" output.check
660 new.block
661 crossref missing$
662 { format.in.ed.booktitle "booktitle" output.check
663 format.bvolume output
664 format.number.series output
665 format.chapter.pages output
666 new.sentence
667 publisher "publisher" output.check
668 address output
669 format.edition output
670 format.date "year" output.check
671 }
672 { format.incoll.inproc.crossref output.nonnull
673 format.chapter.pages output
674 }
675 if$
676 new.block
677 note output
678 fin.entry
679 }
680
681 FUNCTION {inproceedings}
682 { output.bibitem
683 format.authors "author" output.check
684 new.block
685 format.title "title" output.check
686 new.block
687 crossref missing$
688 { format.in.ed.booktitle "booktitle" output.check
689 format.bvolume output
690 format.number.series output
691 format.pages output
692 address empty$
693 { organization publisher new.sentence.checkb
694 organization output
695 publisher output
696 format.date "year" output.check
697 }
698 { address output.nonnull
699 format.date "year" output.check
700 new.sentence
701 organization output
702 publisher output
703 }
704 if$
705 }
706 { format.incoll.inproc.crossref output.nonnull
707 format.pages output
708 }
709 if$
710 new.block
711 note output
712 fin.entry
713 }
714
715 FUNCTION {conference} { inproceedings }
716
717 FUNCTION {manual}
718 { output.bibitem
719 author empty$
720 { organization empty$
721 'skip$
722 { organization output.nonnull
723 address output
724 }
725 if$
726 }
727 { format.authors output.nonnull }
728 if$
729 new.block
730 format.btitle "title" output.check
731 author empty$
732 { organization empty$
733 { address new.block.checka
734 address output
735 }
736 'skip$
737 if$
738 }
739 { organization address new.block.checkb
740 organization output
741 address output
742 }
743 if$
744 format.edition output
745 format.date output
746 new.block
747 note output
748 fin.entry
749 }
750
751 FUNCTION {mastersthesis}
752 { output.bibitem
753 format.authors "author" output.check
754 new.block
755 format.btitle "title" output.check
756 new.block
757 "Master's thesis" format.thesis.type output.nonnull
758 school "school" output.check
759 address output
760 format.date "year" output.check
761 new.block
762 note output
763 fin.entry
764 }
765
766 FUNCTION {misc}
767 { output.bibitem
768 format.authors output
769 title howpublished new.block.checkb
770 format.title output
771 howpublished new.block.checka
772 howpublished output
773 format.date output
774 new.block
775 note output
776 fin.entry
777 empty.misc.check
778 }
779
780 FUNCTION {phdthesis}
781 { output.bibitem
782 format.authors "author" output.check
783 new.block
784 format.btitle "title" output.check
785 new.block
786 "PhD thesis" format.thesis.type output.nonnull
787 school "school" output.check
788 address output
789 format.date "year" output.check
790 new.block
791 note output
792 fin.entry
793 }
794
795 FUNCTION {dphilthesis}
796 { output.bibitem
797 format.authors "author" output.check
798 new.block
799 format.btitle "title" output.check
800 new.block
801 "DPhil thesis" format.thesis.type output.nonnull
802 school "school" output.check
803 address output
804 format.date "year" output.check
805 new.block
806 note output
807 fin.entry
808 }
809
810 FUNCTION {proceedings}
811 { output.bibitem
812 editor empty$
813 { organization output }
814 { format.editors output.nonnull }
815 if$
816 new.block
817 format.btitle "title" output.check
818 format.bvolume output
819 format.number.series output
820 address empty$
821 { editor empty$
822 { publisher new.sentence.checka }
823 { organization publisher new.sentence.checkb
824 organization output
825 }
826 if$
827 publisher output
828 format.date "year" output.check
829 }
830 { address output.nonnull
831 format.date "year" output.check
832 new.sentence
833 editor empty$
834 'skip$
835 { organization output }
836 if$
837 publisher output
838 }
839 if$
840 new.block
841 note output
842 fin.entry
843 }
844
845 FUNCTION {techreport}
846 { output.bibitem
847 format.authors "author" output.check
848 new.block
849 format.title "title" output.check
850 new.block
851 format.tr.number output.nonnull
852 institution "institution" output.check
853 address output
854 format.date "year" output.check
855 new.block
856 note output
857 fin.entry
858 }
859
860 FUNCTION {unpublished}
861 { output.bibitem
862 format.authors "author" output.check
863 new.block
864 format.title "title" output.check
865 new.block
866 note "note" output.check
867 format.date output
868 fin.entry
869 }
870
871 % --------------------------------------------------------------
872 % --------------------------------------------------------------
873
874 FUNCTION {default.type} { misc }
875
876 MACRO {jan} {"January"}
877
878 MACRO {feb} {"February"}
879
880 MACRO {mar} {"March"}
881
882 MACRO {apr} {"April"}
883
884 MACRO {may} {"May"}
885
886 MACRO {jun} {"June"}
887
888 MACRO {jul} {"July"}
889
890 MACRO {aug} {"August"}
891
892 MACRO {sep} {"September"}
893
894 MACRO {oct} {"October"}
895
896 MACRO {nov} {"November"}
897
898 MACRO {dec} {"December"}
899
900 MACRO {acmcs} {"ACM Computing Surveys"}
901
902 MACRO {acta} {"Acta Informatica"}
903
904 MACRO {cacm} {"Communications of the ACM"}
905
906 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
907
908 MACRO {ibmsj} {"IBM Systems Journal"}
909
910 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
911
912 MACRO {ieeetc} {"IEEE Transactions on Computers"}
913
914 MACRO {ieeetcad}
915 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
916
917 MACRO {ipl} {"Information Processing Letters"}
918
919 MACRO {jacm} {"Journal of the ACM"}
920
921 MACRO {jcss} {"Journal of Computer and System Sciences"}
922
923 MACRO {scp} {"Science of Computer Programming"}
924
925 MACRO {sicomp} {"SIAM Journal on Computing"}
926
927 MACRO {tocs} {"ACM Transactions on Computer Systems"}
928
929 MACRO {tods} {"ACM Transactions on Database Systems"}
930
931 MACRO {tog} {"ACM Transactions on Graphics"}
932
933 MACRO {toms} {"ACM Transactions on Mathematical Software"}
934
935 MACRO {toois} {"ACM Transactions on Office Information Systems"}
936
937 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
938
939 MACRO {tcs} {"Theoretical Computer Science"}
940
941 READ
942
943 FUNCTION {sortify}
944 { purify$
945 "l" change.case$
946 }
947
948 INTEGERS { len }
949
950 FUNCTION {chop.word}
951 { 's :=
952 'len :=
953 s #1 len substring$ =
954 { s len #1 + global.max$ substring$ }
955 's
956 if$
957 }
958
959 FUNCTION {sort.format.names}
960 { 's :=
961 #1 'nameptr :=
962 ""
963 s num.names$ 'numnames :=
964 numnames 'namesleft :=
965 { namesleft #0 > }
966 { nameptr #1 >
967 { " " * }
968 'skip$
969 if$
970 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
971 nameptr numnames = t "others" = and
972 { "et al" * }
973 { t sortify * }
974 if$
975 nameptr #1 + 'nameptr :=
976 namesleft #1 - 'namesleft :=
977 }
978 while$
979 }
980
981 FUNCTION {sort.format.title}
982 { 't :=
983 "A " #2
984 "An " #3
985 "The " #4 t chop.word
986 chop.word
987 chop.word
988 sortify
989 #1 global.max$ substring$
990 }
991
992 FUNCTION {author.sort}
993 { author empty$
994 { key empty$
995 { "to sort, need author or key in " cite$ * warning$
996 ""
997 }
998 { key sortify }
999 if$
1000 }
1001 { author sort.format.names }
1002 if$
1003 }
1004
1005 FUNCTION {author.editor.sort}
1006 { author empty$
1007 { editor empty$
1008 { key empty$
1009 { "to sort, need author, editor, or key in " cite$ * warning$
1010 ""
1011 }
1012 { key sortify }
1013 if$
1014 }
1015 { editor sort.format.names }
1016 if$
1017 }
1018 { author sort.format.names }
1019 if$
1020 }
1021
1022 FUNCTION {author.organization.sort}
1023 { author empty$
1024 { organization empty$
1025 { key empty$
1026 { "to sort, need author, organization, or key in " cite$ * warning$
1027 ""
1028 }
1029 { key sortify }
1030 if$
1031 }
1032 { "The " #4 organization chop.word sortify }
1033 if$
1034 }
1035 { author sort.format.names }
1036 if$
1037 }
1038
1039 FUNCTION {editor.organization.sort}
1040 { editor empty$
1041 { organization empty$
1042 { key empty$
1043 { "to sort, need editor, organization, or key in " cite$ * warning$
1044 ""
1045 }
1046 { key sortify }
1047 if$
1048 }
1049 { "The " #4 organization chop.word sortify }
1050 if$
1051 }
1052 { editor sort.format.names }
1053 if$
1054 }
1055
1056 FUNCTION {presort}
1057 { type$ "book" =
1058 type$ "inbook" =
1059 or
1060 'author.editor.sort
1061 { type$ "proceedings" =
1062 'editor.organization.sort
1063 { type$ "manual" =
1064 'author.organization.sort
1065 'author.sort
1066 if$
1067 }
1068 if$
1069 }
1070 if$
1071 " "
1072 *
1073 year field.or.null sortify
1074 *
1075 " "
1076 *
1077 title field.or.null
1078 sort.format.title
1079 *
1080 #1 entry.max$ substring$
1081 'sort.key$ :=
1082 }
1083
1084 ITERATE {presort}
1085
1086 SORT
1087
1088 STRINGS { longest.label }
1089
1090 INTEGERS { number.label longest.label.width }
1091
1092 FUNCTION {initialize.longest.label}
1093 { "" 'longest.label :=
1094 #1 'number.label :=
1095 #0 'longest.label.width :=
1096 }
1097
1098 FUNCTION {longest.label.pass}
1099 { number.label int.to.str$ 'label :=
1100 number.label #1 + 'number.label :=
1101 label width$ longest.label.width >
1102 { label 'longest.label :=
1103 label width$ 'longest.label.width :=
1104 }
1105 'skip$
1106 if$
1107 }
1108
1109 EXECUTE {initialize.longest.label}
1110
1111 ITERATE {longest.label.pass}
1112
1113 FUNCTION {begin.bib}
1114 { preamble$ empty$
1115 'skip$
1116 { preamble$ write$ newline$ }
1117 if$
1118 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1119 }
1120
1121 EXECUTE {begin.bib}
1122
1123 EXECUTE {init.state.consts}
1124
1125 ITERATE {call.type$}
1126
1127 FUNCTION {end.bib}
1128 { newline$
1129 "\end{thebibliography}" write$ newline$
1130 }
1131
1132 EXECUTE {end.bib}