1 %% File: `abbrvnat.bst'
2 %% A modification of `abbrv.bst' for use with natbib package
4 %% Copyright 1993-2007 Patrick W Daly
5 %% Max-Planck-Institut f\"ur Sonnensystemforschung
7 %% D-37191 Katlenburg-Lindau
9 %% E-mail: daly@mps.mpg.de
11 %% This program can be redistributed and/or modified under the terms
12 %% of the LaTeX Project Public License Distributed from CTAN
13 %% archives in directory macros/latex/base/lppl.txt; either
14 %% version 1 of the License, or any later version.
16 % Version and source file information:
17 % \ProvidesFile{natbst.mbs}[2007/11/26 1.93 (PWD)]
19 % BibTeX `plainnat' family
20 % version 0.99b for BibTeX versions 0.99a or later,
21 % for LaTeX versions 2.09 and 2e.
23 % For use with the `natbib.sty' package; emulates the corresponding
24 % member of the `plain' family, but with author-year citations.
26 % With version 6.0 of `natbib.sty', it may also be used for numerical
27 % citations, while retaining the commands \citeauthor, \citefullauthor,
28 % and \citeyear to print the corresponding information.
30 % For version 7.0 of `natbib.sty', the KEY field replaces missing
31 % authors/editors, and the date is left blank in \bibitem.
33 % Includes field EID for the sequence/citation number of electronic journals
34 % which is used instead of page numbers.
36 % Includes fields ISBN and ISSN.
38 % Includes field URL for Internet addresses.
40 % Includes field DOI for Digital Object Idenfifiers.
42 % Works best with the url.sty package of Donald Arseneau.
44 % Works with identical authors and year are further sorted by
45 % citation key, to preserve any natural sequence.
78 { label extra.label sort.label short.list }
80 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
82 FUNCTION {init.state.consts}
91 FUNCTION {output.nonnull}
93 output.state mid.sentence =
95 { output.state after.block =
100 { output.state before.all =
102 { add.period$ " " * write$ }
106 mid.sentence 'output.state :=
119 FUNCTION {output.check}
122 { pop$ "empty " t * " in " * cite$ * warning$ }
134 { output.state before.all =
136 { after.block 'output.state := }
140 FUNCTION {new.sentence}
141 { output.state after.block =
143 { output.state before.all =
145 { after.sentence 'output.state := }
169 FUNCTION {new.block.checka}
176 FUNCTION {new.block.checkb}
185 FUNCTION {new.sentence.checka}
192 FUNCTION {new.sentence.checkb}
201 FUNCTION {field.or.null}
211 { "\emph{" swap$ * "}" * }
215 INTEGERS { nameptr namesleft numnames }
217 FUNCTION {format.names}
220 s num.names$ 'numnames :=
221 numnames 'namesleft :=
223 { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
240 nameptr #1 + 'nameptr :=
241 namesleft #1 - 'namesleft :=
246 FUNCTION {format.key}
248 { key field.or.null }
253 FUNCTION {format.authors}
256 { author format.names }
260 FUNCTION {format.editors}
263 { editor format.names
264 editor num.names$ #1 >
272 FUNCTION {format.isbn}
275 { new.block "ISBN " isbn * }
279 FUNCTION {format.issn}
282 { new.block "ISSN " issn * }
286 FUNCTION {format.url}
289 { new.block "URL \url{" url * "}" * }
292 FUNCTION {format.urldate}
295 {new.block "accessed-on: " urldate * }
299 FUNCTION {format.doi}
302 { new.block "\doi{" doi * "}" * }
306 FUNCTION {format.title}
309 { title "t" change.case$ }
313 FUNCTION {format.full.names}
316 s num.names$ 'numnames :=
317 numnames 'namesleft :=
320 "{vv~}{ll}" format.name$ 't :=
339 nameptr #1 + 'nameptr :=
340 namesleft #1 - 'namesleft :=
345 FUNCTION {author.editor.full}
349 { editor format.full.names }
352 { author format.full.names }
356 FUNCTION {author.full}
359 { author format.full.names }
363 FUNCTION {editor.full}
366 { editor format.full.names }
370 FUNCTION {make.full.names}
375 { type$ "proceedings" =
383 FUNCTION {output.bibitem}
387 ")" make.full.names duplicate$ short.list =
396 before.all 'output.state :=
403 { t #1 #1 substring$ "-" =
404 { t #1 #2 substring$ "--" = not
406 t #2 global.max$ substring$ 't :=
408 { { t #1 #1 substring$ "-" = }
410 t #2 global.max$ substring$ 't :=
416 { t #1 #1 substring$ *
417 t #2 global.max$ substring$ 't :=
424 FUNCTION {format.date}
425 { year duplicate$ empty$
426 { "empty year in " cite$ * warning$
439 FUNCTION {format.btitle}
443 FUNCTION {tie.or.space.connect}
444 { duplicate$ text.length$ #3 <
451 FUNCTION {either.or.check}
454 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
458 FUNCTION {format.bvolume}
461 { "volume" volume tie.or.space.connect
464 { " of " * series emphasize * }
466 "volume and number" number either.or.check
471 FUNCTION {format.number.series}
474 { series field.or.null }
475 { output.state mid.sentence =
479 number tie.or.space.connect
481 { "there's a number but no series in " cite$ * warning$ }
482 { " in " * series * }
491 FUNCTION {format.edition}
494 { output.state mid.sentence =
495 { edition "l" change.case$ " edition" * }
496 { edition "t" change.case$ " edition" * }
502 INTEGERS { multiresult }
504 FUNCTION {multi.page.check}
513 swap$ duplicate$ "," =
516 { #1 'multiresult := }
517 { t #2 global.max$ substring$ 't := }
524 FUNCTION {format.pages}
527 { pages multi.page.check
528 { "pages" pages n.dashify tie.or.space.connect }
529 { "page" pages tie.or.space.connect }
535 FUNCTION {format.eid}
538 { "art." eid tie.or.space.connect }
542 FUNCTION {format.vol.num.pages}
543 { volume field.or.null
546 { "\penalty0 (" number * ")" * *
548 { "there's a number but no volume in " cite$ * warning$ }
556 { pop$ format.pages }
557 { ":\penalty0 " * pages n.dashify * }
563 FUNCTION {format.vol.num.eid}
564 { volume field.or.null
567 { "\penalty0 (" number * ")" * *
569 { "there's a number but no volume in " cite$ * warning$ }
578 { ":\penalty0 " * eid * }
584 FUNCTION {format.chapter.pages}
589 { type "l" change.case$ }
591 chapter tie.or.space.connect
594 { ", " * format.pages * }
600 FUNCTION {format.in.ed.booktitle}
604 { "In " booktitle emphasize * }
605 { "In " format.editors * ", " * booktitle emphasize * }
611 FUNCTION {empty.misc.check}
612 { author empty$ title empty$ howpublished empty$
613 month empty$ year empty$ note empty$
616 { "all relevant fields are empty in " cite$ * warning$ }
621 FUNCTION {format.thesis.type}
625 type "t" change.case$
630 FUNCTION {format.tr.number}
632 { "Technical Report" }
637 { number tie.or.space.connect }
641 FUNCTION {format.article.crossref}
644 { "need key or journal for " cite$ * " to crossref " * crossref *
648 { "In \emph{" journal * "}" * }
653 " \citet{" * crossref * "}" *
656 FUNCTION {format.book.crossref}
658 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
661 { "Volume" volume tie.or.space.connect
666 editor field.or.null author field.or.null =
670 { "need editor, key, or series for " cite$ * " to crossref " *
674 { "\emph{" * series * "}" * }
682 " \citet{" * crossref * "}" *
685 FUNCTION {format.incoll.inproc.crossref}
687 editor field.or.null author field.or.null =
691 { "need editor, key, or booktitle for " cite$ * " to crossref " *
695 { "In \emph{" booktitle * "}" * }
703 " \citet{" * crossref * "}" *
708 format.authors "author" output.check
709 author format.key output
711 format.title "title" output.check
714 { journal emphasize "journal" output.check
716 { format.vol.num.pages output }
717 { format.vol.num.eid output }
719 format.date "year" output.check
721 { format.article.crossref output.nonnull
723 { format.pages output }
724 { format.eid output }
739 { format.editors "author and editor" output.check
740 editor format.key output
742 { format.authors output.nonnull
744 { "author and editor" editor either.or.check }
750 format.btitle "title" output.check
752 { format.bvolume output
754 format.number.series output
756 publisher "publisher" output.check
760 format.book.crossref output.nonnull
763 format.edition output
764 format.date "year" output.check
775 format.authors output
776 author format.key output
778 format.title "title" output.check
779 howpublished address new.block.checkb
794 { format.editors "author and editor" output.check
795 editor format.key output
797 { format.authors output.nonnull
799 { "author and editor" editor either.or.check }
805 format.btitle "title" output.check
807 { format.bvolume output
808 format.chapter.pages "chapter and pages" output.check
810 format.number.series output
812 publisher "publisher" output.check
815 { format.chapter.pages "chapter and pages" output.check
817 format.book.crossref output.nonnull
820 format.edition output
821 format.date "year" output.check
830 FUNCTION {incollection}
832 format.authors "author" output.check
833 author format.key output
835 format.title "title" output.check
838 { format.in.ed.booktitle "booktitle" output.check
839 format.bvolume output
840 format.number.series output
841 format.chapter.pages output
843 publisher "publisher" output.check
845 format.edition output
846 format.date "year" output.check
848 { format.incoll.inproc.crossref output.nonnull
849 format.chapter.pages output
860 FUNCTION {inproceedings}
862 format.authors "author" output.check
863 author format.key output
865 format.title "title" output.check
868 { format.in.ed.booktitle "booktitle" output.check
869 format.bvolume output
870 format.number.series output
873 { organization publisher new.sentence.checkb
876 format.date "year" output.check
878 { address output.nonnull
879 format.date "year" output.check
886 { format.incoll.inproc.crossref output.nonnull
898 FUNCTION {conference} { inproceedings }
902 format.authors output
903 author format.key output
905 format.btitle "title" output.check
906 organization address new.block.checkb
909 format.edition output
917 FUNCTION {mastersthesis}
919 format.authors "author" output.check
920 author format.key output
922 format.title "title" output.check
924 "Master's thesis" format.thesis.type output.nonnull
925 school "school" output.check
927 format.date "year" output.check
936 format.authors output
937 author format.key output
938 title howpublished new.block.checkb
940 howpublished new.block.checka
947 format.urldate output
954 format.authors "author" output.check
955 author format.key output
957 format.btitle "title" output.check
959 "PhD thesis" format.thesis.type output.nonnull
960 school "school" output.check
962 format.date "year" output.check
969 FUNCTION {proceedings}
971 format.editors output
972 editor format.key output
974 format.btitle "title" output.check
975 format.bvolume output
976 format.number.series output
978 format.date "year" output.check
990 FUNCTION {techreport}
992 format.authors "author" output.check
993 author format.key output
995 format.title "title" output.check
997 format.tr.number output.nonnull
998 institution "institution" output.check
1000 format.date "year" output.check
1007 FUNCTION {unpublished}
1009 format.authors "author" output.check
1010 author format.key output
1012 format.title "title" output.check
1014 note "note" output.check
1020 FUNCTION {default.type} { misc }
1023 MACRO {jan} {"Jan."}
1025 MACRO {feb} {"Feb."}
1027 MACRO {mar} {"Mar."}
1029 MACRO {apr} {"Apr."}
1033 MACRO {jun} {"June"}
1035 MACRO {jul} {"July"}
1037 MACRO {aug} {"Aug."}
1039 MACRO {sep} {"Sept."}
1041 MACRO {oct} {"Oct."}
1043 MACRO {nov} {"Nov."}
1045 MACRO {dec} {"Dec."}
1049 MACRO {acmcs} {"ACM Comput. Surv."}
1051 MACRO {acta} {"Acta Inf."}
1053 MACRO {cacm} {"Commun. ACM"}
1055 MACRO {ibmjrd} {"IBM J. Res. Dev."}
1057 MACRO {ibmsj} {"IBM Syst.~J."}
1059 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
1061 MACRO {ieeetc} {"IEEE Trans. Comput."}
1064 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
1066 MACRO {ipl} {"Inf. Process. Lett."}
1068 MACRO {jacm} {"J.~ACM"}
1070 MACRO {jcss} {"J.~Comput. Syst. Sci."}
1072 MACRO {scp} {"Sci. Comput. Programming"}
1074 MACRO {sicomp} {"SIAM J. Comput."}
1076 MACRO {tocs} {"ACM Trans. Comput. Syst."}
1078 MACRO {tods} {"ACM Trans. Database Syst."}
1080 MACRO {tog} {"ACM Trans. Gr."}
1082 MACRO {toms} {"ACM Trans. Math. Softw."}
1084 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
1086 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
1088 MACRO {tcs} {"Theoretical Comput. Sci."}
1100 FUNCTION {chop.word}
1103 s #1 len substring$ =
1104 { s len #1 + global.max$ substring$ }
1109 FUNCTION {format.lab.names}
1111 s #1 "{vv~}{ll}" format.name$
1112 s num.names$ duplicate$
1114 { pop$ " et~al." * }
1117 { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1119 { " and " * s #2 "{vv~}{ll}" format.name$ * }
1127 FUNCTION {author.key.label}
1130 { cite$ #1 #3 substring$ }
1134 { author format.lab.names }
1138 FUNCTION {author.editor.key.label}
1142 { cite$ #1 #3 substring$ }
1146 { editor format.lab.names }
1149 { author format.lab.names }
1153 FUNCTION {author.key.organization.label}
1156 { organization empty$
1157 { cite$ #1 #3 substring$ }
1158 { "The " #4 organization chop.word #3 text.prefix$ }
1164 { author format.lab.names }
1168 FUNCTION {editor.key.organization.label}
1171 { organization empty$
1172 { cite$ #1 #3 substring$ }
1173 { "The " #4 organization chop.word #3 text.prefix$ }
1179 { editor format.lab.names }
1183 FUNCTION {calc.short.authors}
1187 'author.editor.key.label
1188 { type$ "proceedings" =
1189 'editor.key.organization.label
1191 'author.key.organization.label
1201 FUNCTION {calc.label}
1202 { calc.short.authors
1206 year duplicate$ empty$
1207 short.list key field.or.null = or
1215 FUNCTION {sort.format.names}
1219 s num.names$ 'numnames :=
1220 numnames 'namesleft :=
1223 s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
1227 namesleft #1 = t "others" = and
1229 { numnames #2 > nameptr #2 = and
1230 { "zz" * year field.or.null * " " * }
1239 nameptr #1 + 'nameptr :=
1240 namesleft #1 - 'namesleft :=
1245 FUNCTION {sort.format.title}
1249 "The " #4 t chop.word
1253 #1 global.max$ substring$
1256 FUNCTION {author.sort}
1259 { "to sort, need author or key in " cite$ * warning$
1265 { author sort.format.names }
1269 FUNCTION {author.editor.sort}
1273 { "to sort, need author, editor, or key in " cite$ * warning$
1279 { editor sort.format.names }
1282 { author sort.format.names }
1286 FUNCTION {author.organization.sort}
1288 { organization empty$
1290 { "to sort, need author, organization, or key in " cite$ * warning$
1296 { "The " #4 organization chop.word sortify }
1299 { author sort.format.names }
1303 FUNCTION {editor.organization.sort}
1305 { organization empty$
1307 { "to sort, need editor, organization, or key in " cite$ * warning$
1313 { "The " #4 organization chop.word sortify }
1316 { editor sort.format.names }
1330 { type$ "proceedings" =
1331 'editor.organization.sort
1333 'author.organization.sort
1342 year field.or.null sortify
1348 #1 entry.max$ substring$
1351 #1 entry.max$ substring$
1359 STRINGS { longest.label last.label next.extra }
1361 INTEGERS { longest.label.width last.extra.num number.label }
1363 FUNCTION {initialize.longest.label}
1364 { "" 'longest.label :=
1365 #0 int.to.chr$ 'last.label :=
1367 #0 'longest.label.width :=
1368 #0 'last.extra.num :=
1372 FUNCTION {forward.pass}
1373 { last.label label =
1374 { last.extra.num #1 + 'last.extra.num :=
1375 last.extra.num int.to.chr$ 'extra.label :=
1377 { "a" chr.to.int$ 'last.extra.num :=
1379 label 'last.label :=
1382 number.label #1 + 'number.label :=
1385 FUNCTION {reverse.pass}
1387 { "a" 'extra.label := }
1390 extra.label 'next.extra :=
1394 { "{\natexlab{" swap$ * "}}" * }
1397 label extra.label * 'label :=
1400 EXECUTE {initialize.longest.label}
1402 ITERATE {forward.pass}
1404 REVERSE {reverse.pass}
1406 FUNCTION {bib.sort.order}
1407 { sort.label 'sort.key$ :=
1410 ITERATE {bib.sort.order}
1414 FUNCTION {begin.bib}
1417 { preamble$ write$ newline$ }
1419 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1421 "\providecommand{\natexlab}[1]{#1}"
1423 "\providecommand{\url}[1]{\texttt{#1}}"
1425 "\expandafter\ifx\csname urlstyle\endcsname\relax"
1427 " \providecommand{\doi}[1]{doi: #1}\else"
1429 " \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi"
1435 EXECUTE {init.state.consts}
1437 ITERATE {call.type$}
1441 "\end{thebibliography}" write$ newline$