1 %jaumsa.bst with line rather than repeated author
2 % BibTeX standard bibliography style `plain'
3 % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
4 % Copyright (C) 1985, all rights reserved.
5 % Copying of this file is authorized only if either
6 % (1) you make absolutely no changes to your copy, including name, or
7 % (2) if you do make changes, you name it something other than
8 % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
9 % This restriction helps ensure that all standard styles are identical.
10 % 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 :=
72 { before.all 'output.state :=
76 { mid.sentence 'output.state :=
86 FUNCTION {output.check}
89 { pop$ "empty " t * " in " * cite$ * warning$ }
94 FUNCTION {output.bibitem}
101 before.all 'output.state :=
111 { output.state before.all =
113 { after.block 'output.state := }
117 FUNCTION {new.sentence}
118 { output.state after.block =
120 { output.state before.all =
122 { after.sentence 'output.state := }
146 FUNCTION {new.block.checka}
153 FUNCTION {new.block.checkb}
162 FUNCTION {new.sentence.checka}
169 FUNCTION {new.sentence.checkb}
178 FUNCTION {field.or.null}
188 { "{\em " swap$ * "}" * }
195 { "{\bf " swap$ * "}" * }
199 INTEGERS { nameptr namesleft numnames }
201 FUNCTION {format.names}
204 s num.names$ 'numnames :=
205 numnames 'namesleft :=
207 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
216 { "\ et~al." emphasize * }
224 nameptr #1 + 'nameptr :=
225 namesleft #1 - 'namesleft :=
230 STRINGS { last.authors }
232 FUNCTION {init.last.authors}
233 { "" 'last.authors :=
236 FUNCTION {format.authors}
238 { "" 'last.authors :=
241 { author last.authors =
242 { "\leavevmode\vrule height 2pt depth -1.6pt width 23pt" }
243 { author format.names }
245 author 'last.authors :=
251 %FUNCTION {format.authors}
254 % { author format.names }
259 FUNCTION {format.editors}
262 { editor num.names$ #1 >
263 { " (eds. " editor format.names * ")" * }
264 { " (ed. " editor format.names * ")" * }
271 FUNCTION {format.lead.editors}
274 { editor num.names$ #1 >
275 { editor format.names " (eds.)" * }
276 { editor format.names " (ed.)" * }
282 FUNCTION {format.title}
285 { "`" title "t" change.case$ * "'" * }
293 { t #1 #1 substring$ "-" =
294 { t #1 #2 substring$ "--" = not
296 t #2 global.max$ substring$ 't :=
298 { { t #1 #1 substring$ "-" = }
300 t #2 global.max$ substring$ 't :=
306 { t #1 #1 substring$ *
307 t #2 global.max$ substring$ 't :=
314 FUNCTION {format.date}
318 { "there's a month but no year in " cite$ * warning$
325 { month " " * year * }
331 FUNCTION {format.btitle}
335 FUNCTION {tie.or.space.connect}
336 { duplicate$ text.length$ #3 <
343 FUNCTION {either.or.check}
346 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
350 FUNCTION {format.bvolume}
353 { "volume" volume tie.or.space.connect
356 { " of " * series emphasize * }
358 "volume and number" number either.or.check
363 FUNCTION {format.series.volume}
365 "volume and number" number either.or.check
368 { "there's a volume but no series in " cite$ * warning$ }
374 { " " * volume bold *}
380 FUNCTION {format.series.volumeornumber}
382 "volume and number" number either.or.check
386 { "there's a number but no series in " cite$ * warning$ }
389 { "there's a volume but no series in " cite$ * warning$ }
396 { " " * "No. " * number * }
400 { " " * volume bold *}
407 %% note that this is a very ugly hack
408 FUNCTION {format.romanseries.volumeornumber}
410 "volume and number" number either.or.check
414 { "there's a number but no series in " cite$ * warning$ }
417 { "there's a volume but no series in " cite$ * warning$ }
424 { " " * "No. " * number * }
428 { " " * volume bold *}
434 FUNCTION {format.number.series}
437 { series field.or.null }
438 { output.state mid.sentence =
442 number tie.or.space.connect
444 { "there's a number but no series in " cite$ * warning$ }
445 { " in: " * series * }
454 FUNCTION {format.edition}
457 { output.state mid.sentence =
458 { edition "l" change.case$ " edition" * }
459 { edition "t" change.case$ " edition" * }
465 INTEGERS { multiresult }
467 FUNCTION {multi.page.check}
476 swap$ duplicate$ "," =
479 { #1 'multiresult := }
480 { t #2 global.max$ substring$ 't := }
488 FUNCTION {format.pages}
491 { pages multi.page.check
500 FUNCTION {format.in.pages}
503 { pages multi.page.check
504 { " pp.\ " pages n.dashify *}
512 FUNCTION {format.journal.num.vol.date}
514 { "there's no journal in " cite$ * warning$ }
515 { journal emphasize " " * }
518 { "there's no volume in " cite$ * warning$ }
520 { volume bold * " " * }
521 { "(" * number * ") " * volume bold * %*
527 { "empty year in " cite$ * warning$ }
528 { " (" * format.date * ")" * }
532 FUNCTION {format.chapter.pages}
537 { type "l" change.case$ }
539 chapter tie.or.space.connect
542 { ", " * format.in.pages * }
548 FUNCTION {format.in.booktitle.ed}
552 { " in: " booktitle emphasize * }
553 { " in: " booktitle emphasize * " " * format.editors * }
559 FUNCTION {format.publisher.address.date}
563 { "there's an address but no publisher in " cite$ * warning$}
567 { " (" publisher * ", " * }
568 { " (" publisher * ", " * address * ", " * }
573 { "empty year in " cite$ * warning$ }
574 { format.date * ")" *}
578 FUNCTION {empty.misc.check}
579 { author empty$ title empty$ howpublished empty$
580 month empty$ year empty$ note empty$
583 { "all relevant fields are empty in " cite$ * warning$ }
588 FUNCTION {format.thesis.type}
592 type "t" change.case$ *
597 FUNCTION {format.school.address.date}
599 { "empty school in " cite$ * warning$ }
607 { "empty year in " cite$ * warning$ }
608 { format.date * ")" *}
612 FUNCTION {format.instit.address.date}
614 { "empty institution in " cite$ * warning$ }
615 { "(" institution * ", " * }
622 { "empty year in " cite$ * warning$ }
623 { format.date * ")" *}
627 FUNCTION {format.organ.address.date}
628 { organization empty$
629 { "empty organization in " cite$ * warning$ }
630 { "(" organization * ", " * }
637 { "empty year in " cite$ * warning$ }
638 { format.date * ")" *}
643 FUNCTION {format.tr.number}
645 { "Technical Report" }
650 { number tie.or.space.connect }
654 FUNCTION {format.article.crossref}
657 { "need key or journal for " cite$ * " to crossref " * crossref *
661 { "In {\em " journal * "\/}" * }
666 " \cite{" * crossref * "}" *
669 FUNCTION {format.crossref.editor}
670 { editor #1 "{vv~}{ll}" format.name$
671 editor num.names$ duplicate$
676 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
678 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
686 FUNCTION {format.book.crossref}
688 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
691 { "Volume" volume tie.or.space.connect
696 editor field.or.null author field.or.null =
700 { "need editor, key, or series for " cite$ * " to crossref " *
704 { "{\em " * series * "\/}" * }
710 { format.crossref.editor * }
712 " \cite{" * crossref * "}" *
715 FUNCTION {format.incoll.inproc.crossref}
717 editor field.or.null author field.or.null =
721 { "need editor, key, or booktitle for " cite$ * " to crossref " *
725 { "In {\em " booktitle * "\/}" * }
731 { "In " format.crossref.editor * }
733 " \cite{" * crossref * "}" *
738 format.authors "author" output.check
739 format.title "title" output.check
741 { format.journal.num.vol.date output
744 { format.article.crossref output.nonnull
761 { format.lead.editors "author and editor" output.check }
762 { format.authors output.nonnull
764 { "author and editor" editor either.or.check }
769 format.btitle "title" output.check
771 { format.bvolume output
772 format.number.series output
773 format.edition output
776 format.publisher.address.date "publisher" output.check
779 format.book.crossref output.nonnull
788 format.authors output
789 format.title "title" output.check
790 howpublished address new.block.checkb
802 { format.lead.editors "author and editor" output.check }
803 { format.authors output.nonnull
805 { "author and editor" editor either.or.check }
810 format.btitle "title" output.check
815 format.romanseries.volumeornumber output
816 format.edition output
818 format.publisher.address.date "publisher" output.check
820 format.in.pages output
822 { format.chapter.pages "chapter and pages" output.check
824 format.book.crossref output.nonnull
830 FUNCTION {incollection}
832 format.authors "author" output.check
833 format.title "title" output.check
835 { format.in.booktitle.ed "booktitle" output.check
836 format.series.volumeornumber output
837 format.edition output
839 format.publisher.address.date "publisher" output.check
841 format.chapter.pages output
843 { format.incoll.inproc.crossref output.nonnull
844 format.chapter.pages output
852 FUNCTION {inproceedings}
854 format.authors "author" output.check
855 format.title "title" output.check
857 { format.in.booktitle.ed "booktitle" output.check
858 format.bvolume output
859 format.number.series output
862 format.publisher.address.date output
865 format.in.pages output
867 { format.incoll.inproc.crossref output.nonnull
874 FUNCTION {conference} { inproceedings }
879 { organization empty$
881 { organization output.nonnull
886 { format.authors output.nonnull }
888 format.btitle "title" output.check
889 format.edition output
891 { organization empty$
892 { address new.block.checka
898 { format.organ.address.date output
905 FUNCTION {mastersthesis}
907 format.authors "author" output.check
908 format.btitle "title" output.check
910 " (Master's Thesis" format.thesis.type output.nonnull
911 format.school.address.date output
918 format.authors output
919 title howpublished new.block.checkb
922 note emphasize output
931 format.authors "author" output.check
932 format.btitle "title" output.check
934 " (Ph.D. Thesis" format.thesis.type output.nonnull
935 format.school.address.date output
940 FUNCTION {dissertation}
942 format.authors "author" output.check
943 format.btitle "title" output.check
945 " (Dissertation" format.thesis.type output.nonnull
946 format.school.address.date output
951 FUNCTION {honoursthesis}
953 format.authors "author" output.check
954 format.btitle "title" output.check
956 " (Honours Thesis" format.thesis.type output.nonnull
957 format.school.address.date output
964 format.authors "author" output.check
965 format.btitle "title" output.check
967 " (Lecture notes" format.thesis.type output.nonnull
968 format.school.address.date output
973 FUNCTION {proceedings}
976 { organization output }
977 { format.editors output.nonnull }
979 format.btitle "title" output.check
980 format.bvolume output
981 format.number.series output
984 format.publisher.address.date output
988 FUNCTION {techreport}
990 format.authors "author" output.check
991 format.title "title" output.check
992 format.tr.number output.nonnull
993 format.instit.address.date "year" output.check
998 FUNCTION {unpublished}
1000 format.authors "author" output.check
1001 format.title "title" output.check
1002 note "note" output.check
1007 FUNCTION {default.type} { misc }
1009 MACRO {jan} {"January"}
1011 MACRO {feb} {"February"}
1013 MACRO {mar} {"March"}
1015 MACRO {apr} {"April"}
1019 MACRO {jun} {"June"}
1021 MACRO {jul} {"July"}
1023 MACRO {aug} {"August"}
1025 MACRO {sep} {"September"}
1027 MACRO {oct} {"October"}
1029 MACRO {nov} {"November"}
1031 MACRO {dec} {"December"}
1033 MACRO {acmcs} {"ACM Computing Surveys"}
1035 MACRO {acta} {"Acta Informatica"}
1037 MACRO {cacm} {"Communications of the ACM"}
1039 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1041 MACRO {ibmsj} {"IBM Systems Journal"}
1043 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1045 MACRO {ieeetc} {"IEEE Transactions on Computers"}
1048 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1050 MACRO {ipl} {"Information Processing Letters"}
1052 MACRO {jacm} {"Journal of the ACM"}
1054 MACRO {jcss} {"Journal of Computer and System Sciences"}
1056 MACRO {scp} {"Science of Computer Programming"}
1058 MACRO {sicomp} {"SIAM Journal on Computing"}
1060 MACRO {tocs} {"ACM Transactions on Computer Systems"}
1062 MACRO {tods} {"ACM Transactions on Database Systems"}
1064 MACRO {tog} {"ACM Transactions on Graphics"}
1066 MACRO {toms} {"ACM Transactions on Mathematical Software"}
1068 MACRO {toois} {"ACM Transactions on Office Information Systems"}
1070 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1072 MACRO {tcs} {"Theoretical Computer Science"}
1083 FUNCTION {chop.word}
1086 s #1 len substring$ =
1087 { s len #1 + global.max$ substring$ }
1092 FUNCTION {sort.format.names}
1096 s num.names$ 'numnames :=
1097 numnames 'namesleft :=
1103 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1104 nameptr numnames = t "others" = and
1108 nameptr #1 + 'nameptr :=
1109 namesleft #1 - 'namesleft :=
1114 FUNCTION {sort.format.title}
1118 "The " #4 t chop.word
1122 #1 global.max$ substring$
1125 FUNCTION {author.sort}
1128 { "to sort, need author or key in " cite$ * warning$
1134 { author sort.format.names }
1138 FUNCTION {author.editor.sort}
1142 { "to sort, need author, editor, or key in " cite$ * warning$
1148 { editor sort.format.names }
1151 { author sort.format.names }
1155 FUNCTION {author.organization.sort}
1157 { organization empty$
1159 { "to sort, need author, organization, or key in " cite$ * warning$
1165 { "The " #4 organization chop.word sortify }
1168 { author sort.format.names }
1172 FUNCTION {editor.organization.sort}
1174 { organization empty$
1176 { "to sort, need editor, organization, or key in " cite$ * warning$
1182 { "The " #4 organization chop.word sortify }
1185 { editor sort.format.names }
1194 { type$ "proceedings" =
1195 'editor.organization.sort
1197 'author.organization.sort
1206 year field.or.null sortify
1213 #1 entry.max$ substring$
1221 STRINGS { longest.label }
1223 INTEGERS { number.label longest.label.width }
1225 FUNCTION {initialize.longest.label}
1226 { "" 'longest.label :=
1228 #0 'longest.label.width :=
1231 FUNCTION {longest.label.pass}
1232 { number.label int.to.str$ 'label :=
1233 number.label #1 + 'number.label :=
1234 label width$ longest.label.width >
1235 { label 'longest.label :=
1236 label width$ 'longest.label.width :=
1242 EXECUTE {initialize.longest.label}
1244 ITERATE {longest.label.pass}
1246 FUNCTION {begin.bib}
1249 { preamble$ write$ newline$ }
1251 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1256 EXECUTE {init.state.consts}
1258 ITERATE {call.type$}
1262 "\end{thebibliography}" write$ newline$