1 %% File: `plainnat.bst'
\r
2 %% A modification of `plain.bst' for use with natbib package
\r
4 %% Copyright 1993-1999 Patrick W Daly
\r
5 %% Max-Planck-Institut f\"ur Aeronomie
\r
7 %% D-37191 Katlenburg-Lindau
\r
9 %% E-mail: daly@linmpi.mpg.de
\r
11 %% This program can be redistributed and/or modified under the terms
\r
12 %% of the LaTeX Project Public License Distributed from CTAN
\r
13 %% archives in directory macros/latex/base/lppl.txt; either
\r
14 %% version 1 of the License, or any later version.
\r
16 % Version and source file information:
\r
17 % \ProvidesFile{natbst.mbs}[1999/05/11 1.6 (PWD)]
\r
19 % BibTeX `plainnat' family
\r
20 % version 0.99b for BibTeX versions 0.99a or later,
\r
21 % for LaTeX versions 2.09 and 2e.
\r
23 % For use with the `natbib.sty' package; emulates the corresponding
\r
24 % member of the `plain' family, but with author-year citations.
\r
26 % With version 6.0 of `natbib.sty', it may also be used for numerical
\r
27 % citations, while retaining the commands \citeauthor, \citefullauthor,
\r
28 % and \citeyear to print the corresponding information.
\r
30 % For version 7.0 of `natbib.sty', the KEY field replaces missing
\r
31 % authors/editors, and the date is left blank in \bibitem.
\r
33 % Includes fields ISBN and ISSN.
\r
35 % Includes field URL for Internet addresses (best used with
\r
36 % with the url.sty package of Donald Arseneau
\r
66 { label extra.label sort.label short.list }
\r
68 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
\r
70 FUNCTION {init.state.consts}
\r
73 #2 'after.sentence :=
\r
79 FUNCTION {output.nonnull}
\r
81 output.state mid.sentence =
\r
83 { output.state after.block =
\r
84 { add.period$ write$
\r
88 { output.state before.all =
\r
90 { add.period$ " " * write$ }
\r
94 mid.sentence 'output.state :=
\r
101 { duplicate$ empty$
\r
107 FUNCTION {output.check}
\r
110 { pop$ "empty " t * " in " * cite$ * warning$ }
\r
115 FUNCTION {fin.entry}
\r
121 FUNCTION {new.block}
\r
122 { output.state before.all =
\r
124 { after.block 'output.state := }
\r
128 FUNCTION {new.sentence}
\r
129 { output.state after.block =
\r
131 { output.state before.all =
\r
133 { after.sentence 'output.state := }
\r
157 FUNCTION {new.block.checka}
\r
164 FUNCTION {new.block.checkb}
\r
173 FUNCTION {new.sentence.checka}
\r
180 FUNCTION {new.sentence.checkb}
\r
189 FUNCTION {field.or.null}
\r
190 { duplicate$ empty$
\r
196 FUNCTION {emphasize}
\r
197 { duplicate$ empty$
\r
199 { "{\em " swap$ * "}" * }
\r
203 INTEGERS { nameptr namesleft numnames }
\r
205 FUNCTION {format.names}
\r
208 s num.names$ 'numnames :=
\r
209 numnames 'namesleft :=
\r
211 { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
\r
228 nameptr #1 + 'nameptr :=
\r
229 namesleft #1 - 'namesleft :=
\r
234 FUNCTION {format.key}
\r
236 { key field.or.null }
\r
241 FUNCTION {format.authors}
\r
244 { author format.names }
\r
248 FUNCTION {format.editors}
\r
251 { editor format.names
\r
252 editor num.names$ #1 >
\r
260 FUNCTION {format.isbn}
\r
263 { new.block "ISBN " isbn * }
\r
267 FUNCTION {format.issn}
\r
270 { new.block "ISSN " issn * }
\r
274 FUNCTION {format.url}
\r
277 { new.block "URL \url{" url * "}" * }
\r
281 FUNCTION {format.title}
\r
284 { title "t" change.case$ }
\r
288 FUNCTION {format.full.names}
\r
291 s num.names$ 'numnames :=
\r
292 numnames 'namesleft :=
\r
295 "{vv~}{ll}" format.name$ 't :=
\r
314 nameptr #1 + 'nameptr :=
\r
315 namesleft #1 - 'namesleft :=
\r
320 FUNCTION {author.editor.full}
\r
324 { editor format.full.names }
\r
327 { author format.full.names }
\r
331 FUNCTION {author.full}
\r
334 { author format.full.names }
\r
338 FUNCTION {editor.full}
\r
341 { editor format.full.names }
\r
345 FUNCTION {make.full.names}
\r
349 'author.editor.full
\r
350 { type$ "proceedings" =
\r
358 FUNCTION {output.bibitem}
\r
362 ")" make.full.names duplicate$ short.list =
\r
371 before.all 'output.state :=
\r
374 FUNCTION {n.dashify}
\r
378 { t #1 #1 substring$ "-" =
\r
379 { t #1 #2 substring$ "--" = not
\r
381 t #2 global.max$ substring$ 't :=
\r
383 { { t #1 #1 substring$ "-" = }
\r
385 t #2 global.max$ substring$ 't :=
\r
391 { t #1 #1 substring$ *
\r
392 t #2 global.max$ substring$ 't :=
\r
399 FUNCTION {format.date}
\r
400 { year duplicate$ empty$
\r
401 { "empty year in " cite$ * warning$
\r
414 FUNCTION {format.btitle}
\r
418 FUNCTION {tie.or.space.connect}
\r
419 { duplicate$ text.length$ #3 <
\r
426 FUNCTION {either.or.check}
\r
429 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
\r
433 FUNCTION {format.bvolume}
\r
436 { "volume" volume tie.or.space.connect
\r
439 { " of " * series emphasize * }
\r
441 "volume and number" number either.or.check
\r
446 FUNCTION {format.number.series}
\r
449 { series field.or.null }
\r
450 { output.state mid.sentence =
\r
454 number tie.or.space.connect
\r
456 { "there's a number but no series in " cite$ * warning$ }
\r
457 { " in " * series * }
\r
466 FUNCTION {format.edition}
\r
469 { output.state mid.sentence =
\r
470 { edition "l" change.case$ " edition" * }
\r
471 { edition "t" change.case$ " edition" * }
\r
477 INTEGERS { multiresult }
\r
479 FUNCTION {multi.page.check}
\r
486 { t #1 #1 substring$
\r
488 swap$ duplicate$ "," =
\r
491 { #1 'multiresult := }
\r
492 { t #2 global.max$ substring$ 't := }
\r
499 FUNCTION {format.pages}
\r
502 { pages multi.page.check
\r
503 { "pages" pages n.dashify tie.or.space.connect }
\r
504 { "page" pages tie.or.space.connect }
\r
510 FUNCTION {format.vol.num.pages}
\r
511 { volume field.or.null
\r
514 { "\penalty0 (" number * ")" * *
\r
516 { "there's a number but no volume in " cite$ * warning$ }
\r
523 { duplicate$ empty$
\r
524 { pop$ format.pages }
\r
525 { ":\penalty0 " * pages n.dashify * }
\r
531 FUNCTION {format.chapter.pages}
\r
536 { type "l" change.case$ }
\r
538 chapter tie.or.space.connect
\r
541 { ", " * format.pages * }
\r
547 FUNCTION {format.in.ed.booktitle}
\r
551 { "In " booktitle emphasize * }
\r
552 { "In " format.editors * ", " * booktitle emphasize * }
\r
558 FUNCTION {empty.misc.check}
\r
559 { author empty$ title empty$ howpublished empty$
\r
560 month empty$ year empty$ note empty$
\r
561 and and and and and
\r
563 { "all relevant fields are empty in " cite$ * warning$ }
\r
568 FUNCTION {format.thesis.type}
\r
572 type "t" change.case$
\r
577 FUNCTION {format.tr.number}
\r
579 { "Technical Report" }
\r
583 { "t" change.case$ }
\r
584 { number tie.or.space.connect }
\r
588 FUNCTION {format.article.crossref}
\r
591 { "need key or journal for " cite$ * " to crossref " * crossref *
\r
595 { "In {\em " journal * "\/}" * }
\r
600 " \citep{" * crossref * "}" *
\r
603 FUNCTION {format.book.crossref}
\r
605 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
\r
608 { "Volume" volume tie.or.space.connect
\r
613 editor field.or.null author field.or.null =
\r
617 { "need editor, key, or series for " cite$ * " to crossref " *
\r
618 crossref * warning$
\r
621 { "{\em " * series * "\/}" * }
\r
629 ", \citet{" * crossref * "}" *
\r
632 FUNCTION {format.incoll.inproc.crossref}
\r
634 editor field.or.null author field.or.null =
\r
638 { "need editor, key, or booktitle for " cite$ * " to crossref " *
\r
639 crossref * warning$
\r
642 { "In {\em " booktitle * "\/}" * }
\r
650 " \citet{" * crossref * "}" *
\r
655 format.authors "author" output.check
\r
656 author format.key output
\r
658 format.title "title" output.check
\r
661 { journal emphasize "journal" output.check
\r
662 format.vol.num.pages output
\r
663 format.date "year" output.check
\r
665 { format.article.crossref output.nonnull
\r
666 format.pages output
\r
679 { format.editors "author and editor" output.check
\r
680 editor format.key output
\r
682 { format.authors output.nonnull
\r
684 { "author and editor" editor either.or.check }
\r
690 format.btitle "title" output.check
\r
692 { format.bvolume output
\r
694 format.number.series output
\r
696 publisher "publisher" output.check
\r
700 format.book.crossref output.nonnull
\r
703 format.edition output
\r
704 format.date "year" output.check
\r
714 format.authors output
\r
715 author format.key output
\r
717 format.title "title" output.check
\r
718 howpublished address new.block.checkb
\r
719 howpublished output
\r
732 { format.editors "author and editor" output.check
\r
733 editor format.key output
\r
735 { format.authors output.nonnull
\r
737 { "author and editor" editor either.or.check }
\r
743 format.btitle "title" output.check
\r
745 { format.bvolume output
\r
746 format.chapter.pages "chapter and pages" output.check
\r
748 format.number.series output
\r
750 publisher "publisher" output.check
\r
753 { format.chapter.pages "chapter and pages" output.check
\r
755 format.book.crossref output.nonnull
\r
758 format.edition output
\r
759 format.date "year" output.check
\r
767 FUNCTION {incollection}
\r
769 format.authors "author" output.check
\r
770 author format.key output
\r
772 format.title "title" output.check
\r
775 { format.in.ed.booktitle "booktitle" output.check
\r
776 format.bvolume output
\r
777 format.number.series output
\r
778 format.chapter.pages output
\r
780 publisher "publisher" output.check
\r
782 format.edition output
\r
783 format.date "year" output.check
\r
785 { format.incoll.inproc.crossref output.nonnull
\r
786 format.chapter.pages output
\r
796 FUNCTION {inproceedings}
\r
798 format.authors "author" output.check
\r
799 author format.key output
\r
801 format.title "title" output.check
\r
804 { format.in.ed.booktitle "booktitle" output.check
\r
805 format.bvolume output
\r
806 format.number.series output
\r
807 format.pages output
\r
809 { organization publisher new.sentence.checkb
\r
810 organization output
\r
812 format.date "year" output.check
\r
814 { address output.nonnull
\r
815 format.date "year" output.check
\r
817 organization output
\r
822 { format.incoll.inproc.crossref output.nonnull
\r
823 format.pages output
\r
833 FUNCTION {conference} { inproceedings }
\r
837 format.authors output
\r
838 author format.key output
\r
840 format.btitle "title" output.check
\r
841 organization address new.block.checkb
\r
842 organization output
\r
844 format.edition output
\r
852 FUNCTION {mastersthesis}
\r
854 format.authors "author" output.check
\r
855 author format.key output
\r
857 format.title "title" output.check
\r
859 "Master's thesis" format.thesis.type output.nonnull
\r
860 school "school" output.check
\r
862 format.date "year" output.check
\r
871 format.authors output
\r
872 author format.key output
\r
873 title howpublished new.block.checkb
\r
874 format.title output
\r
875 howpublished new.block.checka
\r
876 howpublished output
\r
886 FUNCTION {phdthesis}
\r
888 format.authors "author" output.check
\r
889 author format.key output
\r
891 format.btitle "title" output.check
\r
893 "PhD thesis" format.thesis.type output.nonnull
\r
894 school "school" output.check
\r
896 format.date "year" output.check
\r
903 FUNCTION {proceedings}
\r
905 format.editors output
\r
906 editor format.key output
\r
908 format.btitle "title" output.check
\r
909 format.bvolume output
\r
910 format.number.series output
\r
912 format.date "year" output.check
\r
914 organization output
\r
923 FUNCTION {techreport}
\r
925 format.authors "author" output.check
\r
926 author format.key output
\r
928 format.title "title" output.check
\r
930 format.tr.number output.nonnull
\r
931 institution "institution" output.check
\r
933 format.date "year" output.check
\r
940 FUNCTION {unpublished}
\r
942 format.authors "author" output.check
\r
943 author format.key output
\r
945 format.title "title" output.check
\r
948 note "note" output.check
\r
953 FUNCTION {default.type} { misc }
\r
956 MACRO {jan} {"January"}
\r
958 MACRO {feb} {"February"}
\r
960 MACRO {mar} {"March"}
\r
962 MACRO {apr} {"April"}
\r
964 MACRO {may} {"May"}
\r
966 MACRO {jun} {"June"}
\r
968 MACRO {jul} {"July"}
\r
970 MACRO {aug} {"August"}
\r
972 MACRO {sep} {"September"}
\r
974 MACRO {oct} {"October"}
\r
976 MACRO {nov} {"November"}
\r
978 MACRO {dec} {"December"}
\r
982 MACRO {acmcs} {"ACM Computing Surveys"}
\r
984 MACRO {acta} {"Acta Informatica"}
\r
986 MACRO {cacm} {"Communications of the ACM"}
\r
988 MACRO {ibmjrd} {"IBM Journal of Research and Development"}
\r
990 MACRO {ibmsj} {"IBM Systems Journal"}
\r
992 MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
\r
994 MACRO {ieeetc} {"IEEE Transactions on Computers"}
\r
997 {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
\r
999 MACRO {ipl} {"Information Processing Letters"}
\r
1001 MACRO {jacm} {"Journal of the ACM"}
\r
1003 MACRO {jcss} {"Journal of Computer and System Sciences"}
\r
1005 MACRO {scp} {"Science of Computer Programming"}
\r
1007 MACRO {sicomp} {"SIAM Journal on Computing"}
\r
1009 MACRO {tocs} {"ACM Transactions on Computer Systems"}
\r
1011 MACRO {tods} {"ACM Transactions on Database Systems"}
\r
1013 MACRO {tog} {"ACM Transactions on Graphics"}
\r
1015 MACRO {toms} {"ACM Transactions on Mathematical Software"}
\r
1017 MACRO {toois} {"ACM Transactions on Office Information Systems"}
\r
1019 MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
\r
1021 MACRO {tcs} {"Theoretical Computer Science"}
\r
1026 FUNCTION {sortify}
\r
1033 FUNCTION {chop.word}
\r
1036 s #1 len substring$ =
\r
1037 { s len #1 + global.max$ substring$ }
\r
1042 FUNCTION {format.lab.names}
\r
1044 s #1 "{vv~}{ll}" format.name$
\r
1045 s num.names$ duplicate$
\r
1047 { pop$ " et~al." * }
\r
1050 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
\r
1052 { " and " * s #2 "{vv~}{ll}" format.name$ * }
\r
1060 FUNCTION {author.key.label}
\r
1063 { cite$ #1 #3 substring$ }
\r
1067 { author format.lab.names }
\r
1071 FUNCTION {author.editor.key.label}
\r
1075 { cite$ #1 #3 substring$ }
\r
1079 { editor format.lab.names }
\r
1082 { author format.lab.names }
\r
1086 FUNCTION {author.key.organization.label}
\r
1089 { organization empty$
\r
1090 { cite$ #1 #3 substring$ }
\r
1091 { "The " #4 organization chop.word #3 text.prefix$ }
\r
1097 { author format.lab.names }
\r
1101 FUNCTION {editor.key.organization.label}
\r
1104 { organization empty$
\r
1105 { cite$ #1 #3 substring$ }
\r
1106 { "The " #4 organization chop.word #3 text.prefix$ }
\r
1112 { editor format.lab.names }
\r
1116 FUNCTION {calc.short.authors}
\r
1120 'author.editor.key.label
\r
1121 { type$ "proceedings" =
\r
1122 'editor.key.organization.label
\r
1123 { type$ "manual" =
\r
1124 'author.key.organization.label
\r
1134 FUNCTION {calc.label}
\r
1135 { calc.short.authors
\r
1139 year duplicate$ empty$
\r
1140 short.list key field.or.null = or
\r
1148 FUNCTION {sort.format.names}
\r
1152 s num.names$ 'numnames :=
\r
1153 numnames 'namesleft :=
\r
1154 { namesleft #0 > }
\r
1159 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
\r
1160 nameptr numnames = t "others" = and
\r
1164 nameptr #1 + 'nameptr :=
\r
1165 namesleft #1 - 'namesleft :=
\r
1170 FUNCTION {sort.format.title}
\r
1174 "The " #4 t chop.word
\r
1178 #1 global.max$ substring$
\r
1181 FUNCTION {author.sort}
\r
1184 { "to sort, need author or key in " cite$ * warning$
\r
1190 { author sort.format.names }
\r
1194 FUNCTION {author.editor.sort}
\r
1198 { "to sort, need author, editor, or key in " cite$ * warning$
\r
1204 { editor sort.format.names }
\r
1207 { author sort.format.names }
\r
1211 FUNCTION {author.organization.sort}
\r
1213 { organization empty$
\r
1215 { "to sort, need author, organization, or key in " cite$ * warning$
\r
1221 { "The " #4 organization chop.word sortify }
\r
1224 { author sort.format.names }
\r
1228 FUNCTION {editor.organization.sort}
\r
1230 { organization empty$
\r
1232 { "to sort, need editor, organization, or key in " cite$ * warning$
\r
1238 { "The " #4 organization chop.word sortify }
\r
1241 { editor sort.format.names }
\r
1245 FUNCTION {presort}
\r
1253 'author.editor.sort
\r
1254 { type$ "proceedings" =
\r
1255 'editor.organization.sort
\r
1256 { type$ "manual" =
\r
1257 'author.organization.sort
\r
1266 year field.or.null sortify
\r
1270 title field.or.null
\r
1273 #1 entry.max$ substring$
\r
1276 #1 entry.max$ substring$
\r
1284 STRINGS { longest.label last.label next.extra }
\r
1286 INTEGERS { longest.label.width last.extra.num number.label }
\r
1288 FUNCTION {initialize.longest.label}
\r
1289 { "" 'longest.label :=
\r
1290 #0 int.to.chr$ 'last.label :=
\r
1292 #0 'longest.label.width :=
\r
1293 #0 'last.extra.num :=
\r
1294 #0 'number.label :=
\r
1297 FUNCTION {forward.pass}
\r
1298 { last.label label =
\r
1299 { last.extra.num #1 + 'last.extra.num :=
\r
1300 last.extra.num int.to.chr$ 'extra.label :=
\r
1302 { "a" chr.to.int$ 'last.extra.num :=
\r
1303 "" 'extra.label :=
\r
1304 label 'last.label :=
\r
1307 number.label #1 + 'number.label :=
\r
1310 FUNCTION {reverse.pass}
\r
1311 { next.extra "b" =
\r
1312 { "a" 'extra.label := }
\r
1315 extra.label 'next.extra :=
\r
1319 { "{\natexlab{" swap$ * "}}" * }
\r
1322 label extra.label * 'label :=
\r
1325 EXECUTE {initialize.longest.label}
\r
1327 ITERATE {forward.pass}
\r
1329 REVERSE {reverse.pass}
\r
1331 FUNCTION {bib.sort.order}
\r
1332 { sort.label 'sort.key$ :=
\r
1335 ITERATE {bib.sort.order}
\r
1339 FUNCTION {begin.bib}
\r
1340 { preamble$ empty$
\r
1342 { preamble$ write$ newline$ }
\r
1344 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
\r
1346 "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
\r
1348 %% "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
\r
1349 %% " \def\url#1{{\tt #1}}\fi" write$ newline$
\r
1352 EXECUTE {begin.bib}
\r
1354 EXECUTE {init.state.consts}
\r
1356 ITERATE {call.type$}
\r
1358 FUNCTION {end.bib}
\r
1360 "\end{thebibliography}" write$ newline$
\r