Debian Codegraph @

texmf-dist/bibtex/bst/abstyles/aplain.bst

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