1 % BibTeX standard bibliography style `abbrv'
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.
39 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
41 FUNCTION {init.state.consts}
50 FUNCTION {output.nonnull}
52 output.state mid.sentence =
54 { output.state after.block =
59 { output.state before.all =
61 { add.period$ " " * write$ }
65 mid.sentence 'output.state :=
78 FUNCTION {output.check}
81 { pop$ "empty " t * " in " * cite$ * warning$ }
86 FUNCTION {output.bibitem}
93 before.all 'output.state :=
103 { output.state before.all =
105 { after.block 'output.state := }
109 FUNCTION {new.sentence}
110 { output.state after.block =
112 { output.state before.all =
114 { after.sentence 'output.state := }
138 FUNCTION {new.block.checka}
145 FUNCTION {new.block.checkb}
154 FUNCTION {new.sentence.checka}
161 FUNCTION {new.sentence.checkb}
170 FUNCTION {field.or.null}
180 { "{\em " swap$ * "}" * }
184 INTEGERS { nameptr namesleft numnames }
186 FUNCTION {format.names}
189 s num.names$ 'numnames :=
190 numnames 'namesleft :=
192 { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
209 nameptr #1 + 'nameptr :=
210 namesleft #1 - 'namesleft :=
215 FUNCTION {format.authors}
218 { author format.names }
222 FUNCTION {format.editors}
225 { editor format.names
226 editor num.names$ #1 >
234 FUNCTION {format.title}
237 { title "t" change.case$ }
245 { t #1 #1 substring$ "-" =
246 { t #1 #2 substring$ "--" = not
248 t #2 global.max$ substring$ 't :=
250 { { t #1 #1 substring$ "-" = }
252 t #2 global.max$ substring$ 't :=
258 { t #1 #1 substring$ *
259 t #2 global.max$ substring$ 't :=
266 FUNCTION {format.date}
270 { "there's a month but no year in " cite$ * warning$
277 { month " " * year * }
283 FUNCTION {format.btitle}
287 FUNCTION {tie.or.space.connect}
288 { duplicate$ text.length$ #3 <
295 FUNCTION {either.or.check}
298 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
302 FUNCTION {format.bvolume}
305 { "volume" volume tie.or.space.connect
308 { " of " * series emphasize * }
310 "volume and number" number either.or.check
315 FUNCTION {format.number.series}
318 { series field.or.null }
319 { output.state mid.sentence =
323 number tie.or.space.connect
325 { "there's a number but no series in " cite$ * warning$ }
326 { " in " * series * }
335 FUNCTION {format.edition}
338 { output.state mid.sentence =
339 { edition "l" change.case$ " edition" * }
340 { edition "t" change.case$ " edition" * }
346 INTEGERS { multiresult }
348 FUNCTION {multi.page.check}
357 swap$ duplicate$ "," =
360 { #1 'multiresult := }
361 { t #2 global.max$ substring$ 't := }
368 FUNCTION {format.pages}
371 { pages multi.page.check
372 { "pages" pages n.dashify tie.or.space.connect }
373 { "page" pages tie.or.space.connect }
379 FUNCTION {format.vol.num.pages}
380 { volume field.or.null
383 { "(" number * ")" * *
385 { "there's a number but no volume in " cite$ * warning$ }
393 { pop$ format.pages }
394 { ":" * pages n.dashify * }
400 FUNCTION {format.chapter.pages}
405 { type "l" change.case$ }
407 chapter tie.or.space.connect
410 { ", " * format.pages * }
416 FUNCTION {format.in.ed.booktitle}
420 { "In " booktitle emphasize * }
421 { "In " format.editors * ", " * booktitle emphasize * }
427 FUNCTION {empty.misc.check}
428 { author empty$ title empty$ howpublished empty$
429 month empty$ year empty$ note empty$
432 { "all relevant fields are empty in " cite$ * warning$ }
437 FUNCTION {format.thesis.type}
441 type "t" change.case$
446 FUNCTION {format.tr.number}
448 { "Technical Report" }
453 { number tie.or.space.connect }
457 FUNCTION {format.article.crossref}
460 { "need key or journal for " cite$ * " to crossref " * crossref *
464 { "In {\em " journal * "\/}" * }
469 " \cite{" * crossref * "}" *
472 FUNCTION {format.crossref.editor}
473 { editor #1 "{vv~}{ll}" format.name$
474 editor num.names$ duplicate$
479 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
481 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
489 FUNCTION {format.book.crossref}
491 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
494 { "Volume" volume tie.or.space.connect
499 editor field.or.null author field.or.null =
503 { "need editor, key, or series for " cite$ * " to crossref " *
507 { "{\em " * series * "\/}" * }
513 { format.crossref.editor * }
515 " \cite{" * crossref * "}" *
518 FUNCTION {format.incoll.inproc.crossref}
520 editor field.or.null author field.or.null =
524 { "need editor, key, or booktitle for " cite$ * " to crossref " *
528 { "In {\em " booktitle * "\/}" * }
534 { "In " format.crossref.editor * }
536 " \cite{" * crossref * "}" *
541 format.authors "author" output.check
543 format.title "title" output.check
546 { journal emphasize "journal" output.check
547 format.vol.num.pages output
548 format.date "year" output.check
550 { format.article.crossref output.nonnull
562 { format.editors "author and editor" output.check }
563 { format.authors output.nonnull
565 { "author and editor" editor either.or.check }
571 format.btitle "title" output.check
573 { format.bvolume output
575 format.number.series output
577 publisher "publisher" output.check
581 format.book.crossref output.nonnull
584 format.edition output
585 format.date "year" output.check
593 format.authors output
595 format.title "title" output.check
596 howpublished address new.block.checkb
608 { format.editors "author and editor" output.check }
609 { format.authors output.nonnull
611 { "author and editor" editor either.or.check }
617 format.btitle "title" output.check
619 { format.bvolume output
620 format.chapter.pages "chapter and pages" output.check
622 format.number.series output
624 publisher "publisher" output.check
627 { format.chapter.pages "chapter and pages" output.check
629 format.book.crossref output.nonnull
632 format.edition output
633 format.date "year" output.check
639 FUNCTION {incollection}
641 format.authors "author" output.check
643 format.title "title" output.check
646 { format.in.ed.booktitle "booktitle" output.check
647 format.bvolume output
648 format.number.series output
649 format.chapter.pages output
651 publisher "publisher" output.check
653 format.edition output
654 format.date "year" output.check
656 { format.incoll.inproc.crossref output.nonnull
657 format.chapter.pages output
665 FUNCTION {inproceedings}
667 format.authors "author" output.check
669 format.title "title" output.check
672 { format.in.ed.booktitle "booktitle" output.check
673 format.bvolume output
674 format.number.series output
677 { organization publisher new.sentence.checkb
680 format.date "year" output.check
682 { address output.nonnull
683 format.date "year" output.check
690 { format.incoll.inproc.crossref output.nonnull
699 FUNCTION {conference} { inproceedings }
704 { organization empty$
706 { organization output.nonnull
711 { format.authors output.nonnull }
714 format.btitle "title" output.check
716 { organization empty$
717 { address new.block.checka
723 { organization address new.block.checkb
728 format.edition output
735 FUNCTION {mastersthesis}
737 format.authors "author" output.check
739 format.title "title" output.check
741 "Master's thesis" format.thesis.type output.nonnull
742 school "school" output.check
744 format.date "year" output.check
752 format.authors output
753 title howpublished new.block.checkb
755 howpublished new.block.checka
766 format.authors "author" output.check
768 format.btitle "title" output.check
770 "PhD thesis" format.thesis.type output.nonnull
771 school "school" output.check
773 format.date "year" output.check
779 FUNCTION {proceedings}
782 { organization output }
783 { format.editors output.nonnull }
786 format.btitle "title" output.check
787 format.bvolume output
788 format.number.series output
791 { publisher new.sentence.checka }
792 { organization publisher new.sentence.checkb
797 format.date "year" output.check
799 { address output.nonnull
800 format.date "year" output.check
804 { organization output }
814 FUNCTION {techreport}
816 format.authors "author" output.check
818 format.title "title" output.check
820 format.tr.number output.nonnull
821 institution "institution" output.check
823 format.date "year" output.check
829 FUNCTION {unpublished}
831 format.authors "author" output.check
833 format.title "title" output.check
835 note "note" output.check
840 FUNCTION {default.type} { misc }
858 MACRO {sep} {"Sept."}
866 MACRO {acmcs} {"ACM Comput. Surv."}
868 MACRO {acta} {"Acta Inf."}
870 MACRO {cacm} {"Commun. ACM"}
872 MACRO {ibmjrd} {"IBM J. Res. Dev."}
874 MACRO {ibmsj} {"IBM Syst.~J."}
876 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
878 MACRO {ieeetc} {"IEEE Trans. Comput."}
881 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
883 MACRO {ipl} {"Inf. Process. Lett."}
885 MACRO {jacm} {"J.~ACM"}
887 MACRO {jcss} {"J.~Comput. Syst. Sci."}
889 MACRO {scp} {"Sci. Comput. Programming"}
891 MACRO {sicomp} {"SIAM J. Comput."}
893 MACRO {tocs} {"ACM Trans. Comput. Syst."}
895 MACRO {tods} {"ACM Trans. Database Syst."}
897 MACRO {tog} {"ACM Trans. Gr."}
899 MACRO {toms} {"ACM Trans. Math. Softw."}
901 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
903 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
905 MACRO {tcs} {"Theoretical Comput. Sci."}
919 s #1 len substring$ =
920 { s len #1 + global.max$ substring$ }
925 FUNCTION {sort.format.names}
929 s num.names$ 'numnames :=
930 numnames 'namesleft :=
936 s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
937 nameptr numnames = t "others" = and
941 nameptr #1 + 'nameptr :=
942 namesleft #1 - 'namesleft :=
947 FUNCTION {sort.format.title}
951 "The " #4 t chop.word
955 #1 global.max$ substring$
958 FUNCTION {author.sort}
961 { "to sort, need author or key in " cite$ * warning$
967 { author sort.format.names }
971 FUNCTION {author.editor.sort}
975 { "to sort, need author, editor, or key in " cite$ * warning$
981 { editor sort.format.names }
984 { author sort.format.names }
988 FUNCTION {author.organization.sort}
990 { organization empty$
992 { "to sort, need author, organization, or key in " cite$ * warning$
998 { "The " #4 organization chop.word sortify }
1001 { author sort.format.names }
1005 FUNCTION {editor.organization.sort}
1007 { organization empty$
1009 { "to sort, need editor, organization, or key in " cite$ * warning$
1015 { "The " #4 organization chop.word sortify }
1018 { editor sort.format.names }
1027 { type$ "proceedings" =
1028 'editor.organization.sort
1030 'author.organization.sort
1039 year field.or.null sortify
1046 #1 entry.max$ substring$
1054 STRINGS { longest.label }
1056 INTEGERS { number.label longest.label.width }
1058 FUNCTION {initialize.longest.label}
1059 { "" 'longest.label :=
1061 #0 'longest.label.width :=
1064 FUNCTION {longest.label.pass}
1065 { number.label int.to.str$ 'label :=
1066 number.label #1 + 'number.label :=
1067 label width$ longest.label.width >
1068 { label 'longest.label :=
1069 label width$ 'longest.label.width :=
1075 EXECUTE {initialize.longest.label}
1077 ITERATE {longest.label.pass}
1079 FUNCTION {begin.bib}
1082 { preamble$ write$ newline$ }
1084 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1089 EXECUTE {init.state.consts}
1091 ITERATE {call.type$}
1095 "\end{thebibliography}" write$ newline$