1 % BibTeX `acl' style file for BibTeX version 0.99c, LaTeX version 2.09
2 % This version was made by modifying `aaai-named' format based on the master
3 % file by Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU)
5 % Copyright (C) 1985, all rights reserved.
6 % Modifications Copyright 1988, Peter F. Patel-Schneider
7 % Further modifictions by Stuart Shieber, 1991, and Fernando Pereira, 1992.
8 % Copying of this file is authorized only if either
9 % (1) you make absolutely no changes to your copy, including name, or
10 % (2) if you do make changes, you name it something other than
11 % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
12 % This restriction helps ensure that all standard styles are identical.
14 % There are undoubtably bugs in this style. If you make bug fixes,
15 % improvements, etc. please let me know. My e-mail address is:
18 % Citation format: [author-last-name, year]
19 % [author-last-name and author-last-name, year]
20 % [author-last-name {\em et al.}, year]
22 % Reference list ordering: alphabetical by author or whatever passes
23 % for author in the absence of one.
25 % This BibTeX style has support for short (year only) citations. This
26 % is done by having the citations actually look like
27 % \citename{name-info, }year
28 % The LaTeX style has to have the following
29 % \let\@internalcite\cite
30 % \def\cite{\def\citename##1{##1}\@internalcite}
31 % \def\shortcite{\def\citename##1{}\@internalcite}
32 % \def\@biblabel#1{\def\citename##1{##1}[#1]\hfill}
33 % which makes \shortcite the macro for short citations.
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36 % Changes made by SMS for thesis style
37 % no emphasis on "et al."
38 % "Ph.D." includes periods (not "PhD")
39 % moved year to immediately after author's name
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 { label extra.label sort.label }
68 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
70 FUNCTION {init.state.consts}
79 FUNCTION {output.nonnull}
81 output.state mid.sentence =
83 { output.state after.block =
88 { output.state before.all =
90 { add.period$ " " * write$ }
94 mid.sentence 'output.state :=
107 FUNCTION {output.check}
110 { pop$ "empty " t * " in " * cite$ * warning$ }
115 FUNCTION {output.bibitem}
126 before.all 'output.state :=
136 { output.state before.all =
138 { after.block 'output.state := }
142 FUNCTION {new.sentence}
143 { output.state after.block =
145 { output.state before.all =
147 { after.sentence 'output.state := }
171 FUNCTION {new.block.checka}
178 FUNCTION {new.block.checkb}
187 FUNCTION {new.sentence.checka}
194 FUNCTION {new.sentence.checkb}
203 FUNCTION {field.or.null}
213 { "{\em " swap$ * "}" * }
217 INTEGERS { nameptr namesleft numnames }
219 FUNCTION {format.names}
222 s num.names$ 'numnames :=
223 numnames 'namesleft :=
226 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
244 nameptr #1 + 'nameptr :=
245 namesleft #1 - 'namesleft :=
250 FUNCTION {format.authors}
253 { author format.names }
257 FUNCTION {format.editors}
260 { editor format.names
261 editor num.names$ #1 >
269 FUNCTION {format.title}
273 { title "t" change.case$ }
282 { t #1 #1 substring$ "-" =
283 { t #1 #2 substring$ "--" = not
285 t #2 global.max$ substring$ 't :=
287 { { t #1 #1 substring$ "-" = }
289 t #2 global.max$ substring$ 't :=
295 { t #1 #1 substring$ *
296 t #2 global.max$ substring$ 't :=
303 FUNCTION {format.date}
307 { "there's a month but no year in " cite$ * warning$
320 FUNCTION {format.btitle}
324 FUNCTION {tie.or.space.connect}
325 { duplicate$ text.length$ #3 <
332 FUNCTION {either.or.check}
335 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
339 FUNCTION {format.bvolume}
342 { "volume" volume tie.or.space.connect
345 { " of " * series emphasize * }
347 "volume and number" number either.or.check
352 FUNCTION {format.number.series}
355 { series field.or.null }
356 { output.state mid.sentence =
360 number tie.or.space.connect
362 { "there's a number but no series in " cite$ * warning$ }
363 { " in " * series * }
372 FUNCTION {format.edition}
375 { output.state mid.sentence =
376 { edition "l" change.case$ " edition" * }
377 { edition "t" change.case$ " edition" * }
383 INTEGERS { multiresult }
385 FUNCTION {multi.page.check}
394 swap$ duplicate$ "," =
397 { #1 'multiresult := }
398 { t #2 global.max$ substring$ 't := }
405 FUNCTION {format.pages}
408 { pages multi.page.check
409 { "pages" pages n.dashify tie.or.space.connect }
410 { "page" pages tie.or.space.connect }
416 FUNCTION {format.year.label}
420 FUNCTION {format.vol.num.pages}
421 { volume field.or.null
424 { "(" number * ")" * *
426 { "there's a number but no volume in " cite$ * warning$ }
434 { pop$ format.pages }
435 { ":" * pages n.dashify * }
441 FUNCTION {format.chapter.pages}
446 { type "l" change.case$ }
448 chapter tie.or.space.connect
451 { ", " * format.pages * }
457 FUNCTION {format.in.ed.booktitle}
461 { "In " booktitle emphasize * }
462 { "In " format.editors * ", " * booktitle emphasize * }
468 FUNCTION {empty.misc.check}
469 { author empty$ title empty$ howpublished empty$
470 month empty$ year empty$ note empty$
475 { "all relevant fields are empty in " cite$ * warning$ }
480 FUNCTION {format.thesis.type}
484 type "t" change.case$
489 FUNCTION {format.tr.number}
491 { "Technical Report" }
496 { number tie.or.space.connect }
500 FUNCTION {format.article.crossref}
503 { "need key or journal for " cite$ * " to crossref " * crossref *
507 { "In {\em " journal * "\/}" * }
512 " \cite{" * crossref * "}" *
515 FUNCTION {format.crossref.editor}
516 { editor #1 "{vv~}{ll}" format.name$
517 editor num.names$ duplicate$
522 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
524 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
532 FUNCTION {format.book.crossref}
534 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
537 { "Volume" volume tie.or.space.connect
542 editor field.or.null author field.or.null =
546 { "need editor, key, or series for " cite$ * " to crossref " *
550 { "{\em " * series * "\/}" * }
556 { format.crossref.editor * }
558 " \cite{" * crossref * "}" *
561 FUNCTION {format.incoll.inproc.crossref}
563 editor field.or.null author field.or.null =
567 { "need editor, key, or booktitle for " cite$ * " to crossref " *
571 { "In {\em " booktitle * "\/}" * }
577 { "In " format.crossref.editor * }
579 " \cite{" * crossref * "}" *
584 format.authors "author" output.check
586 format.year.label "year" output.check
588 format.title "title" output.check
591 { journal emphasize "journal" output.check
592 format.vol.num.pages output
595 { format.article.crossref output.nonnull
607 { format.editors "author and editor" output.check }
608 { format.authors output.nonnull
610 { "author and editor" editor either.or.check }
616 format.year.label "year" output.check
618 format.btitle "title" output.check
620 { format.bvolume output
622 format.number.series output
624 publisher "publisher" output.check
628 format.book.crossref output.nonnull
631 format.edition output
640 format.authors output
642 format.year.label "year" output.check
644 format.title "title" output.check
645 howpublished address new.block.checkb
657 { format.editors "author and editor" output.check }
658 { format.authors output.nonnull
660 { "author and editor" editor either.or.check }
665 format.year.label "year" output.check
668 format.btitle "title" output.check
670 { format.bvolume output
671 format.chapter.pages "chapter and pages" output.check
673 format.number.series output
675 publisher "publisher" output.check
678 { format.chapter.pages "chapter and pages" output.check
680 format.book.crossref output.nonnull
683 format.edition output
690 FUNCTION {incollection}
692 format.authors "author" output.check
694 format.year.label "year" output.check
696 format.title "title" output.check
699 { format.in.ed.booktitle "booktitle" output.check
700 format.bvolume output
701 format.number.series output
702 format.chapter.pages output
704 publisher "publisher" output.check
706 format.edition output
709 { format.incoll.inproc.crossref output.nonnull
710 format.chapter.pages output
718 FUNCTION {inproceedings}
720 format.authors "author" output.check
722 format.year.label "year" output.check
724 format.title "title" output.check
727 { format.in.ed.booktitle "booktitle" output.check
728 format.bvolume output
729 format.number.series output
732 { organization publisher new.sentence.checkb
737 { address output.nonnull
745 { format.incoll.inproc.crossref output.nonnull
754 FUNCTION {conference} { inproceedings }
759 { organization empty$
761 { organization output.nonnull
766 { format.authors output.nonnull }
768 format.year.label "year" output.check
771 format.btitle "title" output.check
773 { organization empty$
774 { address new.block.checka
780 { organization address new.block.checkb
785 format.edition output
792 FUNCTION {mastersthesis}
794 format.authors "author" output.check
796 format.year.label "year" output.check
798 format.title "title" output.check
800 "Master's thesis" format.thesis.type output.nonnull
801 school "school" output.check
811 format.authors output
813 format.year.label output
815 title howpublished new.block.checkb
817 howpublished new.block.checka
828 format.authors "author" output.check
830 format.year.label "year" output.check
832 format.btitle "title" output.check
834 "{Ph.D.} thesis" format.thesis.type output.nonnull
835 school "school" output.check
843 FUNCTION {proceedings}
846 { organization output }
847 { format.editors output.nonnull }
850 format.year.label "year" output.check
852 format.btitle "title" output.check
853 format.bvolume output
854 format.number.series output
857 { publisher new.sentence.checka }
858 { organization publisher new.sentence.checkb
865 { address output.nonnull
870 { organization output }
880 FUNCTION {techreport}
882 format.authors "author" output.check
884 format.year.label "year" output.check
886 format.title "title" output.check
888 format.tr.number output.nonnull
889 institution "institution" output.check
897 FUNCTION {unpublished}
899 format.authors "author" output.check
901 format.year.label "year" output.check
903 format.title "title" output.check
905 note "note" output.check
910 FUNCTION {default.type} { misc }
912 MACRO {jan} {"January"}
914 MACRO {feb} {"February"}
916 MACRO {mar} {"March"}
918 MACRO {apr} {"April"}
926 MACRO {aug} {"August"}
928 MACRO {sep} {"September"}
930 MACRO {oct} {"October"}
932 MACRO {nov} {"November"}
934 MACRO {dec} {"December"}
936 MACRO {acmcs} {"ACM Computing Surveys"}
938 MACRO {acta} {"Acta Informatica"}
940 MACRO {cacm} {"Communications of the ACM"}
942 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
944 MACRO {ibmsj} {"IBM Systems Journal"}
946 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
948 MACRO {ieeetc} {"IEEE Transactions on Computers"}
951 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
953 MACRO {ipl} {"Information Processing Letters"}
955 MACRO {jacm} {"Journal of the ACM"}
957 MACRO {jcss} {"Journal of Computer and System Sciences"}
959 MACRO {scp} {"Science of Computer Programming"}
961 MACRO {sicomp} {"SIAM Journal on Computing"}
963 MACRO {tocs} {"ACM Transactions on Computer Systems"}
965 MACRO {tods} {"ACM Transactions on Database Systems"}
967 MACRO {tog} {"ACM Transactions on Graphics"}
969 MACRO {toms} {"ACM Transactions on Mathematical Software"}
971 MACRO {toois} {"ACM Transactions on Office Information Systems"}
973 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
975 MACRO {tcs} {"Theoretical Computer Science"}
989 s #1 len substring$ =
990 { s len #1 + global.max$ substring$ }
995 INTEGERS { et.al.char.used }
997 FUNCTION {initialize.et.al.char.used}
998 { #0 'et.al.char.used :=
1001 EXECUTE {initialize.et.al.char.used}
1003 FUNCTION {format.lab.names}
1005 s num.names$ 'numnames :=
1008 { s #1 "{vv }{ll}" format.name$ }
1010 { s #1 "{vv }{ll }and " format.name$ s #2 "{vv }{ll}" format.name$ *
1012 { s #1 "{vv }{ll }\bgroup et al.\egroup " format.name$ }
1019 FUNCTION {author.key.label}
1023 { cite$ #1 #3 substring$ }
1025 { key #3 text.prefix$ }
1028 { author format.lab.names }
1032 FUNCTION {author.editor.key.label}
1037 { cite$ #1 #3 substring$ }
1039 { key #3 text.prefix$ }
1042 { editor format.lab.names }
1045 { author format.lab.names }
1049 FUNCTION {author.key.organization.label}
1052 { organization empty$
1054 { cite$ #1 #3 substring$ }
1056 { "The " #4 organization chop.word #3 text.prefix$ }
1059 { key #3 text.prefix$ }
1062 { author format.lab.names }
1066 FUNCTION {editor.key.organization.label}
1069 { organization empty$
1071 { cite$ #1 #3 substring$ }
1073 { "The " #4 organization chop.word #3 text.prefix$ }
1076 { key #3 text.prefix$ }
1079 { editor format.lab.names }
1083 FUNCTION {calc.label}
1087 'author.editor.key.label
1088 { type$ "proceedings" =
1089 'editor.key.organization.label
1091 'author.key.organization.label
1100 "\protect\citename{" swap$ * "}" *
1101 year field.or.null purify$ *
1103 year field.or.null purify$ *
1105 sortify 'sort.label :=
1108 FUNCTION {sort.format.names}
1112 s num.names$ 'numnames :=
1113 numnames 'namesleft :=
1120 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1122 nameptr numnames = t "others" = and
1126 nameptr #1 + 'nameptr :=
1127 namesleft #1 - 'namesleft :=
1132 FUNCTION {sort.format.title}
1136 "The " #4 t chop.word
1140 #1 global.max$ substring$
1143 FUNCTION {author.sort}
1146 { "to sort, need author or key in " cite$ * warning$
1152 { author sort.format.names }
1156 FUNCTION {author.editor.sort}
1160 { "to sort, need author, editor, or key in " cite$ * warning$
1166 { editor sort.format.names }
1169 { author sort.format.names }
1173 FUNCTION {author.organization.sort}
1175 { organization empty$
1177 { "to sort, need author, organization, or key in " cite$ * warning$
1183 { "The " #4 organization chop.word sortify }
1186 { author sort.format.names }
1190 FUNCTION {editor.organization.sort}
1192 { organization empty$
1194 { "to sort, need editor, organization, or key in " cite$ * warning$
1200 { "The " #4 organization chop.word sortify }
1203 { editor sort.format.names }
1218 { type$ "proceedings" =
1219 'editor.organization.sort
1221 'author.organization.sort
1233 year field.or.null sortify
1240 #1 entry.max$ substring$
1248 STRINGS { longest.label last.sort.label next.extra }
1250 INTEGERS { longest.label.width last.extra.num }
1252 FUNCTION {initialize.longest.label}
1253 { "" 'longest.label :=
1254 #0 int.to.chr$ 'last.sort.label :=
1256 #0 'longest.label.width :=
1257 #0 'last.extra.num :=
1260 FUNCTION {forward.pass}
1261 { last.sort.label sort.label =
1262 { last.extra.num #1 + 'last.extra.num :=
1263 last.extra.num int.to.chr$ 'extra.label :=
1265 { "a" chr.to.int$ 'last.extra.num :=
1267 sort.label 'last.sort.label :=
1272 FUNCTION {reverse.pass}
1274 { "a" 'extra.label := }
1277 label extra.label * 'label :=
1278 label width$ longest.label.width >
1279 { label 'longest.label :=
1280 label width$ 'longest.label.width :=
1284 extra.label 'next.extra :=
1287 EXECUTE {initialize.longest.label}
1289 ITERATE {forward.pass}
1291 REVERSE {reverse.pass}
1293 FUNCTION {begin.bib}
1296 { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
1302 { preamble$ write$ newline$ }
1305 "\begin{thebibliography}{" "}" * write$ newline$
1311 EXECUTE {init.state.consts}
1313 ITERATE {call.type$}
1317 "\end{thebibliography}" write$ newline$