1 % BibTeX standard bibliography style `kluwer' (one of the harvard family)
2 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
3 % Copyright (C) 1991, 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, abbrv.bst, agsm.bst,
8 % dcu.bst or kluwer.bst.
9 % This restriction helps ensure that all standard styles are identical.
10 % The file harvard.tex has the documentation for this style.
13 % This document is a modified version of alpha.bst to which it owes much of
17 % Peter Williams, Key Centre for Design Quality, Sydney University
18 % e-mail: peterw@archsci.arch.su.oz.au
45 { field.used etal.allowed etal.required }
46 { extra.label sort.label list.year }
48 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
50 FUNCTION {init.state.consts}
59 FUNCTION {output.nonnull}
61 output.state mid.sentence =
63 { output.state after.block =
68 { output.state before.all =
70 { add.period$ " " * write$ }
74 mid.sentence 'output.state :=
87 FUNCTION {output.check}
90 { pop$ "empty " t * " in " * cite$ * warning$ }
98 { "empty " t * " in " * cite$ * warning$ }
110 { output.state before.all =
112 { after.block 'output.state := }
134 FUNCTION {field.or.null}
144 { "{\em " swap$ * "}" * }
151 { "{\bf " swap$ * "}" * }
158 { "`" swap$ * "'" * }
165 { "\newline\harvardurl{" URL * "}" * write$ newline$ }
169 INTEGERS { nameptr namesleft numnames }
171 FUNCTION {format.names}
175 s num.names$ 'numnames :=
176 numnames 'namesleft :=
178 { s nameptr f format.name$ 't :=
191 nameptr #1 + 'nameptr :=
192 namesleft #1 - 'namesleft :=
197 FUNCTION {format.authors}
200 { "{vv~}{ll}{, jj}{, f.}" author format.names }
204 FUNCTION {format.editors}
207 { "{vv~}{ll}{, jj}{, f.}" editor format.names
208 editor num.names$ #1 >
216 FUNCTION {format.editors.reverse}
219 { "{f.~}{vv~}{ll}{, jj}" editor format.names
220 editor num.names$ #1 >
228 FUNCTION {format.title}
231 { title "t" change.case$ }
239 { t #1 #1 substring$ "-" =
240 { t #1 #2 substring$ "--" = not
242 t #2 global.max$ substring$ 't :=
244 { { t #1 #1 substring$ "-" = }
246 t #2 global.max$ substring$ 't :=
252 { t #1 #1 substring$ *
253 t #2 global.max$ substring$ 't :=
260 FUNCTION {format.btitle}
264 FUNCTION {tie.or.space.connect}
265 { duplicate$ text.length$ #3 <
272 FUNCTION {either.or.check}
275 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
279 FUNCTION {format.bvolume}
282 { "Vol." volume tie.or.space.connect
285 { " of " * series emphasize * }
287 "volume and number" number either.or.check
292 FUNCTION {format.number.series}
295 { series field.or.null }
296 { output.state mid.sentence =
300 number tie.or.space.connect
302 { "there's a number but no series in " cite$ * warning$ }
303 { " in " * series emphasize * }
312 FUNCTION {format.edition}
315 { output.state mid.sentence =
316 { edition "l" change.case$ " edn" * }
317 { edition "t" change.case$ " edn" * }
323 INTEGERS { multiresult }
325 FUNCTION {multi.page.check}
334 swap$ duplicate$ "," =
337 { #1 'multiresult := }
338 { t #2 global.max$ substring$ 't := }
345 FUNCTION {format.pages}
348 { pages multi.page.check
349 { "pp.~" pages n.dashify * }
356 FUNCTION {format.vol.num.pages}
357 { volume embolden field.or.null
360 { "(" number * ")" * *
362 { "there's a number but no volume in " cite$ * warning$ }
370 { pop$ format.pages }
371 { ",~" * pages n.dashify * }
377 FUNCTION {format.chapter.pages}
382 { type "l" change.case$ }
384 chapter tie.or.space.connect
387 { ", " * format.pages * }
393 FUNCTION {format.in.ed.booktitle}
397 { booktitle emphasize }
398 { "{\em in} " format.editors.reverse * ", " * booktitle emphasize * }
404 FUNCTION {empty.misc.check}
405 { author empty$ title empty$ howpublished empty$
406 month empty$ year empty$ note empty$
409 { "all relevant fields are empty in " cite$ * warning$ }
414 FUNCTION {format.thesis.type}
418 type "t" change.case$
423 FUNCTION {format.tr.number}
425 { "Technical Report" }
430 { number tie.or.space.connect }
434 FUNCTION {format.article.crossref}
437 { "need key or journal for " cite$ * " to crossref " * crossref *
441 { "in {\em " journal * "\/}" * " \cite{" * crossref * "}" *
445 { " {\em in} \citeasnoun{" crossref * "}" * }
449 FUNCTION {format.book.crossref}
451 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
454 { "Vol." volume tie.or.space.connect
459 editor field.or.null author field.or.null =
463 { "need editor, key, or series for " cite$ * " to crossref " *
467 { "{\em " * series * "\/}" * " \cite{" * crossref * "}" *}
470 { " \citeasnoun{" * crossref * "}" * }
473 { " \citeasnoun{" * crossref * "}" * }
477 FUNCTION {format.incoll.inproc.crossref}
479 editor field.or.null author field.or.null =
484 { "need editor, key, or booktitle for " cite$ * " to crossref " *
488 { "in {\em " booktitle * "\/}" * " \cite{" * crossref * "}" *}
491 { " {\em in} \citeasnoun{" crossref * "}" * }
494 { " {\em in} \citeasnoun{" crossref * "}" * }
504 s #1 len substring$ =
505 { s len #1 + global.max$ substring$ }
510 INTEGERS { ind tsslen }
512 STRINGS { tss ret rss istr }
514 FUNCTION {replace.substring}{
519 tss text.length$ 'tsslen :=
521 { istr ind tsslen substring$ "" = not }
522 { istr ind tsslen substring$ tss =
526 { ret istr ind #1 substring$ * 'ret :=
535 FUNCTION {format.lab.names.abbr}
537 s num.names$ 'numnames :=
540 { s #1 "{vv~}{ll}" format.name$ " et~al." * }
541 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
542 { s #1 "{vv~}{ll}" format.name$ " et~al." * }
543 { s #1 "{vv~}{ll}" format.name$ " and " *
544 s #2 "{vv~}{ll}" format.name$ *
550 { s #1 "{vv~}{ll}" format.name$ }
554 FUNCTION {format.lab.names.full}
557 s num.names$ 'numnames :=
558 numnames 'namesleft :=
560 { s nameptr "{vv~}{ll}" format.name$ 't :=
573 nameptr #1 + 'nameptr :=
574 namesleft #1 - 'namesleft :=
579 INTEGERS { author.field editor.field organization.field title.field key.field }
581 FUNCTION {init.field.constants}
582 { #0 'author.field :=
584 #2 'organization.field :=
589 FUNCTION {make.list.label}
590 { author.field field.used =
592 { editor.field field.used =
594 { organization.field field.used =
595 { "The " #4 organization chop.word #3 text.prefix$ }
596 { title.field field.used =
598 { key.field field.used =
599 { key #3 text.prefix$ }
600 { "Internal error :001 on " cite$ * " label" * warning$ }
612 FUNCTION {make.full.label}
613 { author.field field.used =
614 { author format.lab.names.full }
615 { editor.field field.used =
616 { editor format.lab.names.full }
617 { organization.field field.used =
618 { "The " #4 organization chop.word #3 text.prefix$ }
619 { title.field field.used =
621 { key.field field.used =
622 { key #3 text.prefix$ }
623 { "Internal error :001 on " cite$ * " label" * warning$ }
635 FUNCTION {make.abbr.label}
637 { author.field field.used =
638 { author format.lab.names.abbr }
639 { editor.field field.used =
640 { editor format.lab.names.abbr }
641 { organization.field field.used =
642 { "The " #4 organization chop.word #3 text.prefix$ }
643 { title.field field.used =
645 { key.field field.used =
646 { key #3 text.prefix$ }
647 {"Internal error :001 on " cite$ * " label" * warning$ }
662 FUNCTION {output.bibitem}
664 etal.allowed %%%XXX change
668 "\vspace{-0.1\baselineskip}\harvarditem[" write$
669 make.abbr.label write$
673 "\vspace{-0.1\baselineskip}\harvarditem{" write$
676 make.full.label write$
684 before.all 'output.state :=
688 FUNCTION {list.label.output}
689 { make.list.label write$
695 ": " list.year * output.nonnull
696 author "author" item.check
697 title.field field.used =
699 { format.title "title" output.check }
702 { journal emphasize "journal" duplicate$ item.check
703 " " * format.vol.num.pages * output
705 { format.article.crossref output.nonnull
718 ": " list.year * output.nonnull
720 { editor "author and editor" item.check }
722 { "author and editor" editor either.or.check }
727 title.field field.used =
729 { format.btitle "title" output.check }
732 { format.bvolume output
733 format.number.series output
734 format.edition output
735 publisher "publisher" output.check
738 { format.book.crossref output.nonnull
739 format.edition output
751 ": " list.year * output.nonnull
752 title.field field.used =
754 { format.title "title" output.check }
767 ": " list.year * output.nonnull
769 { editor "author and editor" item.check }
771 { "author and editor" editor either.or.check }
776 title.field field.used =
778 { format.btitle "title" output.check }
781 { format.bvolume output
782 format.number.series output
783 format.edition output
784 publisher "publisher" output.check
787 { format.book.crossref output.nonnull
788 format.edition output
791 format.chapter.pages "chapter and pages" output.check
798 FUNCTION {incollection}
801 ": " list.year * output.nonnull
802 title.field field.used =
804 { format.title "title" output.check }
806 author "author" item.check
808 { format.in.ed.booktitle "booktitle" output.check
809 format.edition output
810 format.bvolume output
811 format.number.series output
812 publisher "publisher" output.check
815 { format.incoll.inproc.crossref output.nonnull
818 format.chapter.pages output
825 FUNCTION {inproceedings}
828 ": " list.year * output.nonnull
829 title.field field.used =
831 { format.title "title" output.check }
833 author "author" item.check
835 { format.in.ed.booktitle "booktitle" output.check
836 format.bvolume output
837 format.number.series output
839 { organization output
842 { organization output
844 address output.nonnull
848 { format.incoll.inproc.crossref output.nonnull
858 FUNCTION {conference} { inproceedings }
863 ": " list.year * output.nonnull
864 title.field field.used =
866 { format.btitle "title" output.check }
868 format.edition output
870 { organization empty$
876 { organization output
886 FUNCTION {mastersthesis}
889 ": " list.year * output.nonnull
890 author "author" item.check
891 title.field field.used =
893 { format.title emphasize "title" output.check }
895 "Master's thesis" format.thesis.type output.nonnull
896 school "school" output.check
907 ": " list.year * output.nonnull
908 title.field field.used =
910 { format.title output }
923 ": " list.year * output.nonnull
924 author "author" item.check
925 title.field field.used =
927 { format.btitle "title" output.check }
929 "PhD thesis" format.thesis.type output.nonnull
930 school "school" output.check
938 FUNCTION {proceedings}
941 ": " list.year * output.nonnull
942 title.field field.used =
944 { format.btitle "title" output.check }
946 format.bvolume output
947 format.number.series output
951 { organization output
958 { organization output }
961 address output.nonnull
970 FUNCTION {techreport}
973 ": " list.year * output.nonnull
974 author "author" item.check
975 title.field field.used =
977 { format.title "title" output.check }
979 format.tr.number emphasize output.nonnull
980 institution "institution" output.check
988 FUNCTION {unpublished}
991 ": " list.year * output.nonnull
992 author "author" item.check
993 title.field field.used =
995 { format.title "title" output.check }
998 note "note" output.check
1003 FUNCTION {default.type} { misc }
1005 MACRO {jan} {"January"}
1007 MACRO {feb} {"February"}
1009 MACRO {mar} {"March"}
1011 MACRO {apr} {"April"}
1015 MACRO {jun} {"June"}
1017 MACRO {jul} {"July"}
1019 MACRO {aug} {"August"}
1021 MACRO {sep} {"September"}
1023 MACRO {oct} {"October"}
1025 MACRO {nov} {"November"}
1027 MACRO {dec} {"December"}
1029 MACRO {acmcs} {"ACM Computing Surveys"}
1031 MACRO {acta} {"Acta Informatica"}
1033 MACRO {cacm} {"Communications of the ACM"}
1035 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1037 MACRO {ibmsj} {"IBM Systems Journal"}
1039 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1041 MACRO {ieeetc} {"IEEE Transactions on Computers"}
1044 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1046 MACRO {ipl} {"Information Processing Letters"}
1048 MACRO {jacm} {"Journal of the ACM"}
1050 MACRO {jcss} {"Journal of Computer and System Sciences"}
1052 MACRO {scp} {"Science of Computer Programming"}
1054 MACRO {sicomp} {"SIAM Journal on Computing"}
1056 MACRO {tocs} {"ACM Transactions on Computer Systems"}
1058 MACRO {tods} {"ACM Transactions on Database Systems"}
1060 MACRO {tog} {"ACM Transactions on Graphics"}
1062 MACRO {toms} {"ACM Transactions on Mathematical Software"}
1064 MACRO {toois} {"ACM Transactions on Office Information Systems"}
1066 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1068 MACRO {tcs} {"Theoretical Computer Science"}
1072 EXECUTE {init.field.constants}
1079 FUNCTION {sortify.names}
1080 { " and " " " replace.substring
1081 " et~al." " zzz" replace.substring
1085 FUNCTION {author.key.label}
1088 { title.field 'field.used := }
1089 { key.field 'field.used := }
1092 { author.field 'field.used := }
1096 FUNCTION {author.editor.key.label}
1100 { title.field 'field.used := }
1101 { key.field 'field.used := }
1104 { editor.field 'field.used := }
1107 { author.field 'field.used := }
1111 FUNCTION {author.key.organization.label}
1114 { organization empty$
1115 { title.field 'field.used := }
1116 { organization.field 'field.used := }
1119 { key.field 'field.used := }
1122 { author.field 'field.used := }
1126 FUNCTION {editor.key.organization.label}
1129 { organization empty$
1130 { title.field 'field.used := }
1131 { organization.field 'field.used := }
1134 { key.field 'field.used := }
1137 { editor.field 'field.used := }
1141 FUNCTION {sort.format.title}
1145 "The " #4 t chop.word
1149 #1 global.max$ substring$
1152 FUNCTION {calc.label}
1154 title.field field.used =
1155 { sort.format.title }
1158 year field.or.null purify$ #-1 #4 substring$ sortify
1163 FUNCTION {preliminaries} %%%XXX change
1167 'author.editor.key.label
1168 { type$ "proceedings" =
1169 'editor.key.organization.label
1171 'author.key.organization.label
1178 author.field field.used = %%%XXX change
1180 author num.names$ #2 >
1187 editor.field field.used =
1189 editor num.names$ #2 >
1202 FUNCTION {first.presort}
1205 title.field field.used =
1209 make.list.label sortify.names
1218 #1 entry.max$ substring$
1222 ITERATE {preliminaries}
1224 ITERATE {first.presort}
1228 STRINGS { last.sort.label next.extra last.full.label }
1230 INTEGERS { last.extra.num last.etal.allowed }
1232 FUNCTION {initialize.confusion}
1233 { #0 int.to.chr$ 'last.sort.label :=
1234 #0 int.to.chr$ 'last.full.label :=
1235 #1 'last.etal.allowed :=
1238 FUNCTION {confusion.pass}
1239 { last.sort.label sort.label =
1241 { last.full.label make.full.label sortify.names =
1243 { #0 'etal.allowed :=
1244 #0 'last.etal.allowed :=
1248 { #0 'etal.allowed := }
1251 { sort.label 'last.sort.label :=
1252 make.full.label sortify.names 'last.full.label :=
1253 #1 'last.etal.allowed :=
1258 EXECUTE {initialize.confusion}
1260 ITERATE {confusion.pass}
1262 EXECUTE {initialize.confusion}
1264 REVERSE {confusion.pass}
1266 FUNCTION {initialize.last.extra.num}
1267 { #0 int.to.chr$ 'last.sort.label :=
1269 #0 'last.extra.num :=
1272 FUNCTION {forward.pass}
1273 { last.sort.label sort.label =
1274 { last.extra.num #1 + 'last.extra.num :=
1275 last.extra.num int.to.chr$ 'extra.label :=
1277 { "a" chr.to.int$ 'last.extra.num :=
1279 sort.label 'last.sort.label :=
1284 FUNCTION {reverse.pass}
1286 { "a" 'extra.label := }
1290 { "n.d." extra.label * 'list.year := }
1291 { year extra.label * 'list.year := }
1293 extra.label 'next.extra :=
1296 ITERATE {first.presort}
1300 EXECUTE {initialize.last.extra.num}
1302 ITERATE {forward.pass}
1304 REVERSE {reverse.pass}
1306 FUNCTION {second.presort}
1308 title.field field.used =
1309 { sort.format.title }
1314 list.year field.or.null sortify
1318 title.field field.used =
1320 { title field.or.null
1325 #1 entry.max$ substring$
1329 ITERATE {second.presort}
1333 FUNCTION {begin.bib}
1336 { "\harvardpreambledefs{%" write$ newline$
1337 preamble$ write$ "}" write$ newline$
1338 "\harvardpreambletext{%" write$ newline$
1339 preamble$ write$ "}" write$ newline$ }
1341 "\begin{thebibliography}{xx}" write$ newline$
1346 EXECUTE {init.state.consts}
1348 ITERATE {call.type$}
1352 "\end{thebibliography}" write$ newline$