1 % BibTeX-Style for physical bibliographies
2 % Mixture of report.bst and alpha.bst
4 % Defines the fields various, collaboration, eprint and report.
5 % If eprint is set a \href special is created in the .bbl file
6 % which causes xdvi to generate a link to
7 % "http://arXiv.org/abs/eprint" where eprint is the hep number of
8 % the document. You have to \usepackage{hyperref} in your LaTeX source.
9 % The collaboration field is added to the author field in brackets and
10 % the collaboration name is used as the citation (be careful with too
11 % long collaboration names).
12 % Various is used for comments, report for non-hep reports.
15 % On bugs, further improvements and suggestions contact
49 { label extra.label sort.label }
51 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
53 FUNCTION {init.state.consts}
62 FUNCTION {output.nonnull}
64 output.state mid.sentence =
66 { output.state after.block =
71 { output.state before.all =
73 { add.period$ " " * write$ }
77 mid.sentence 'output.state :=
90 FUNCTION {output.check}
93 { pop$ "empty " t * " in " * cite$ * warning$ }
99 FUNCTION {output.bibitem}
108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110 %%% uncomment this for printing
111 %%% labels in the bibliography
117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
120 before.all 'output.state :=
130 { output.state before.all =
132 { after.block 'output.state := }
136 FUNCTION {new.sentence}
158 FUNCTION {new.block.checka}
165 FUNCTION {new.block.checkb}
174 FUNCTION {new.sentence.checka}
181 FUNCTION {new.sentence.checkb}
190 FUNCTION {field.or.null}
200 { "\textsl{ " swap$ * "}" * }
207 { "\textbf{ " swap$ * "}" * }
214 { "(" swap$ * ")" * }
218 FUNCTION {format.collaboration}
219 { collaboration empty$
221 { collaboration num.names$ #1 >
222 {" (" collaboration * " Collaborations)" * }
223 {" (" collaboration * " Collaboration)" * }
229 INTEGERS { nameptr namesleft numnames }
231 FUNCTION {format.names}
234 s num.names$ 'numnames :=
235 numnames 'namesleft :=
237 { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
254 nameptr #1 + 'nameptr :=
255 namesleft #1 - 'namesleft :=
258 format.collaboration *
261 FUNCTION {format.authors}
264 { author format.names }
269 FUNCTION {format.meeting}
276 FUNCTION {format.various}
283 FUNCTION {format.editors}
286 { editor format.names
287 editor num.names$ #1 >
295 FUNCTION {format.edited}
298 { "edited by " editor format.names * }
302 FUNCTION {format.title}
309 FUNCTION {format.eprint}
320 { t #1 #1 substring$ "-" =
321 { t #1 #2 substring$ "--" = not
323 t #2 global.max$ substring$ 't :=
325 { { t #1 #1 substring$ "-" = }
327 t #2 global.max$ substring$ 't :=
333 { t #1 #1 substring$ *
334 t #2 global.max$ substring$ 't :=
341 FUNCTION {format.date}
345 { "there's a month but no year in " cite$ * warning$
352 { month " " * year * }
358 FUNCTION {format.btitle}
366 { "\texttt{ " swap$ * "}" * }
370 FUNCTION {format.ttreport}
377 { duplicate$ "\href{http://arXiv.org/abs/" swap$ *
378 "}{\texttt{" * swap$ * "}}" * }
382 FUNCTION {format.tteprint}
386 FUNCTION {tie.or.space.connect}
387 { duplicate$ text.length$ #3 <
394 FUNCTION {either.or.check}
397 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
401 FUNCTION {format.bvolume}
404 { "volume" volume tie.or.space.connect
407 { " of " * series emphasize * }
409 "volume and number" number either.or.check
414 FUNCTION {format.number.series}
417 { series field.or.null }
418 { output.state mid.sentence =
422 number tie.or.space.connect
424 { "there's a number but no series in " cite$ * warning$ }
425 { " in " * series * }
434 FUNCTION {format.edition}
437 { output.state mid.sentence =
438 { edition "l" change.case$ " edition" * }
439 { edition "t" change.case$ " edition" * }
445 INTEGERS { multiresult }
447 FUNCTION {multi.page.check}
456 swap$ duplicate$ "," =
459 { #1 'multiresult := }
460 { t #2 global.max$ substring$ 't := }
467 FUNCTION {format.pages}
470 { pages multi.page.check
471 { "pages" pages n.dashify tie.or.space.connect }
472 { "page" pages tie.or.space.connect }
478 FUNCTION {format.vol.num.pages}
479 { volume field.or.null embolden
483 { "(" number * ")" * *
485 { "there's a number but no volume in " cite$ * warning$ }
493 { pop$ format.pages }
494 { ", " * pages n.dashify * }
500 FUNCTION {format.chapter.pages}
505 { type "l" change.case$ }
507 chapter tie.or.space.connect
510 { ", " * format.pages * }
516 FUNCTION {format.in.ed.booktitle}
520 { "in " booktitle emphasize * }
521 { "in " booktitle emphasize * ", " * format.edited * }
527 FUNCTION {empty.misc.check}
528 { author empty$ title empty$ howpublished empty$
529 month empty$ year empty$ note empty$
531 { "all relevant fields are empty in " cite$ * warning$ }
536 FUNCTION {format.thesis.type}
540 type "t" change.case$
545 FUNCTION {format.tr.number}
547 { "Technical Report" }
552 { number tie.or.space.connect }
556 FUNCTION {format.article.crossref}
559 { "need key or journal for " cite$ * " to crossref " * crossref *
568 " \cite{" * crossref * "}" *
571 FUNCTION {format.crossref.editor}
572 { editor #1 "{vv~}{ll}" format.name$
573 editor num.names$ duplicate$
578 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
580 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
588 FUNCTION {format.book.crossref}
590 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
593 { "Volume" volume tie.or.space.connect
598 editor field.or.null author field.or.null =
602 { "need editor, key, or series for " cite$ * " to crossref " *
606 { "{\em " * series * "\/}" * }
612 { format.crossref.editor * }
614 " \cite{" * crossref * "}" *
617 FUNCTION {format.incoll.inproc.crossref}
619 editor field.or.null author field.or.null =
623 { "need editor, key, or booktitle for " cite$ * " to crossref " *
627 { "In {\em " booktitle * "\/}" * }
633 { "In " format.crossref.editor * }
635 " \cite{" * crossref * "}" *
640 format.authors "author" output.check
641 format.btitle "title" output.check
644 { journal field.or.null
649 { pop$ format.date paren }
650 { " " * format.date paren * }
656 { format.article.crossref output.nonnull
660 format.tteprint output
662 format.ttreport output
664 format.meeting output
666 format.various output
675 { format.editors "author and editor" output.check }
676 { format.authors output.nonnull
678 { "author and editor" editor either.or.check }
684 format.btitle "title" output.check
686 { format.bvolume output
688 format.number.series output
690 publisher "publisher" output.check
694 format.book.crossref output.nonnull
697 format.edition output
698 format.date "year" output.check
706 format.authors output
708 format.title "title" output.check
709 howpublished address new.block.checkb
721 { format.editors "author and editor" output.check }
722 { format.authors output.nonnull
724 { "author and editor" editor either.or.check }
730 format.btitle "title" output.check
732 { format.bvolume output
733 format.chapter.pages "chapter and pages" output.check
735 format.number.series output
737 publisher "publisher" output.check
740 { format.chapter.pages "chapter and pages" output.check
742 format.book.crossref output.nonnull
745 format.edition output
746 format.date "year" output.check
752 FUNCTION {incollection}
754 format.authors "author" output.check
756 format.title "title" output.check
759 { format.in.ed.booktitle "booktitle" output.check
760 format.bvolume output
761 format.number.series output
762 format.chapter.pages output
764 publisher "publisher" output.check
766 format.edition output
767 format.date "year" output.check
769 { format.incoll.inproc.crossref output.nonnull
770 format.chapter.pages output
778 FUNCTION {inproceedings}
780 format.authors "author" output.check
782 format.title "title" output.check
785 { format.in.ed.booktitle "booktitle" output.check
786 format.bvolume output
787 format.number.series output
790 { organization publisher new.sentence.checkb
793 format.date "year" output.check
795 { address output.nonnull
796 format.date "year" output.check
803 { format.incoll.inproc.crossref output.nonnull
812 FUNCTION {conference} { inproceedings }
817 { organization empty$
819 { organization output.nonnull
824 { format.authors output.nonnull }
827 format.btitle "title" output.check
829 { organization empty$
830 { address new.block.checka
836 { organization address new.block.checkb
841 format.edition output
848 FUNCTION {mastersthesis}
850 format.authors "author" output.check
852 format.title "title" output.check
854 "Master's thesis" format.thesis.type output.nonnull
855 school "school" output.check
857 format.date "year" output.check
865 format.authors output
866 title howpublished new.block.checkb
868 howpublished new.block.checka
879 format.authors "author" output.check
881 format.btitle "title" output.check
883 "PhD thesis" format.thesis.type output.nonnull
884 school "school" output.check
886 format.date "year" output.check
892 FUNCTION {proceedings}
895 { organization output }
896 { format.editors output.nonnull }
899 format.btitle "title" output.check
900 format.bvolume output
901 format.number.series output
904 { publisher new.sentence.checka }
905 { organization publisher new.sentence.checkb
910 format.date "year" output.check
912 { address output.nonnull
913 format.date "year" output.check
917 { organization output }
927 FUNCTION {techreport}
929 format.authors "author" output.check
931 format.title "title" output.check
933 format.tr.number output.nonnull
934 institution "institution" output.check
936 format.date "year" output.check
942 FUNCTION {unpublished}
944 format.authors "author" output.check
946 format.title "title" output.check
948 note "note" output.check
953 FUNCTION {default.type} { misc }
955 MACRO {jan} {"January"}
957 MACRO {feb} {"February"}
959 MACRO {mar} {"March"}
961 MACRO {apr} {"April"}
969 MACRO {aug} {"August"}
971 MACRO {sep} {"September"}
973 MACRO {oct} {"October"}
975 MACRO {nov} {"November"}
977 MACRO {dec} {"December"}
979 MACRO {acmcs} {"ACM Comput. Surv."}
980 MACRO {acta} {"Acta Inf."}
981 MACRO {cacm} {"Commun. ACM"}
982 MACRO {ibmjrd} {"IBM J. Res. Dev."}
983 MACRO {ibmsj} {"IBM Syst.~J."}
984 MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
985 MACRO {ieeetc} {"IEEE Trans. Comput."}
987 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
988 MACRO {ipl} {"Inf. Process. Lett."}
989 MACRO {jacm} {"J.~ACM"}
990 MACRO {jcss} {"J.~Comput. Syst. Sci."}
991 MACRO {scp} {"Sci. Comput. Programming"}
992 MACRO {sicomp} {"SIAM J. Comput."}
993 MACRO {tocs} {"ACM Trans. Comput. Syst."}
994 MACRO {tods} {"ACM Trans. Database Syst."}
995 MACRO {tog} {"ACM Trans. Gr."}
996 MACRO {toms} {"ACM Trans. Math. Softw."}
997 MACRO {toois} {"ACM Trans. Office Inf. Syst."}
998 MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
999 MACRO {tcs} {"Theoretical Comput. Sci."}
1001 MACRO {advp} {"Adv. Phys."}
1002 MACRO {ajp} {"Am. J. Phys."}
1003 MACRO {ao} {"Appl. Opt."}
1004 MACRO {apl} {"Appl. Phys. Lett."}
1005 MACRO {apj} {"Astrophys. J."}
1006 MACRO {baps} {"Bull. Am. Phys. Soc."}
1007 MACRO {cpc} {"Computer Phys. Comm."}
1008 MACRO {cppcf} {"Comments Plasma Phys. Controlled Fusion"}
1009 MACRO {fed} {"Fusion Eng. Design"}
1010 MACRO {ft} {"Fusion Tech."}
1011 MACRO {ieeens} {"IEEE Trans. Nucl. Sci."}
1012 MACRO {ieeeps} {"IEEE Trans. Plasma Sci."}
1013 MACRO {ijimw} {"Int. J. Infrared Millimeter Waves"}
1014 MACRO {ip} {"Infrared Phys."}
1015 MACRO {jap} {"J. Appl. Phys."}
1016 MACRO {jcm} {"J. Chem. Phys."}
1017 MACRO {jcp} {"J. Comput. Phys."}
1018 MACRO {jetp} {"Sov. Phys.-JETP"}
1019 MACRO {jfe} {"J. Fusion Energy"}
1020 MACRO {jfm} {"J. Fluid Mech."}
1021 MACRO {jgr} {"J. Geophys. Res."}
1022 MACRO {jmp} {"J. Math. Phys."}
1023 MACRO {jne} {"J. Nucl. Energy"}
1024 MACRO {jnec} {"J. Nucl. Energy, Part C"}
1025 MACRO {jnm} {"J. Nucl. Mater."}
1026 MACRO {josa} {"J. Opt. Soc. Am."}
1027 MACRO {jpp} {"J. Plasma Phys."}
1028 MACRO {jpsj} {"J. Phys. Soc. Jpn"}
1029 MACRO {jvst} {"J. Vac. Sci. Technol."}
1030 MACRO {nedf} {"Nucl. Eng. Design/Fusion"}
1031 MACRO {nf} {"Nucl. Fusion"}
1032 MACRO {npb} {"Nucl. Phys. \textbf{B}"}
1033 MACRO {nim} {"Nucl. Instrum. Methods"}
1034 MACRO {nimpr} {"Nucl. Instrum. Methods Phys. Research"}
1035 MACRO {nt/f} {"Nucl. Tech./Fusion"}
1036 MACRO {pf} {"Phys. Fluids"}
1037 MACRO {pfa} {"Phys. Fluids \textbf{A}"}
1038 MACRO {pfb} {"Phys. Fluids \textbf{B}"}
1039 MACRO {pl} {"Phys. Lett."}
1040 MACRO {pla} {"Phys. Lett. \textbf{A}"}
1041 MACRO {plb} {"Phys. Lett. \textbf{B}"}
1042 MACRO {pnas} {"Proc. Nat. Acad. Sci. USA"}
1043 MACRO {pp} {"Plasma Phys."}
1044 MACRO {ppcf} {"Plasma Phys. Controlled Fusion"}
1045 MACRO {prep} {"Phys. Rep."}
1046 MACRO {prl} {"Phys. Rev. Lett."}
1047 MACRO {pr} {"Phys. Rev."}
1048 MACRO {pra} {"Phys. Rev. \textbf{A}"}
1049 MACRO {prb} {"Phys. Rev. \textbf{B}"}
1050 MACRO {prc} {"Phys. Rev. \textbf{C}"}
1051 MACRO {prd} {"Phys. Rev. \textbf{D}"}
1052 MACRO {ps} {"Physica Scripta"}
1053 MACRO {rmp} {"Rev. Mod. Phys."}
1054 MACRO {rsi} {"Rev. Sci. Instrum."}
1055 MACRO {sjpp} {"Sov. J. Plasma Phys."}
1056 MACRO {spd} {"Sov. Phys.-Dokl."}
1057 MACRO {sptp} {"Sov. Phys.-Tech. Phys."}
1058 MACRO {spu} {"Sov. Phys.-Usp."}
1069 FUNCTION {chop.word}
1072 s #1 len substring$ =
1073 { s len #1 + global.max$ substring$ }
1078 INTEGERS { et.al.char.used }
1080 FUNCTION {initialize.et.al.char.used}
1081 { #0 'et.al.char.used :=
1084 EXECUTE {initialize.et.al.char.used}
1086 FUNCTION {format.lab.names}
1088 s num.names$ 'numnames :=
1091 { #3 'namesleft := }
1092 { numnames 'namesleft := }
1097 { nameptr numnames =
1098 { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1099 { "{\etalchar{+}}" *
1100 #1 'et.al.char.used :=
1102 { s nameptr "{v{}}{l{}}" format.name$ * }
1105 { s nameptr "{v{}}{l{}}" format.name$ * }
1107 nameptr #1 + 'nameptr :=
1108 namesleft #1 - 'namesleft :=
1112 { "{\etalchar{+}}" *
1113 #1 'et.al.char.used :=
1118 { collaboration empty$
1119 {s #1 "{v{}}{l{}}" format.name$}
1120 {s #1 "{ll}" format.name$}
1122 duplicate$ text.length$ #2 <
1123 { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
1130 FUNCTION {author.key.label}
1133 { cite$ #1 #3 substring$ }
1134 { key #3 text.prefix$ }
1137 { collaboration empty$
1138 {author format.lab.names }
1139 {collaboration format.lab.names }
1145 FUNCTION {author.editor.key.label}
1149 { cite$ #1 #3 substring$ }
1150 { key #3 text.prefix$ }
1153 { editor format.lab.names }
1156 { author format.lab.names }
1160 FUNCTION {author.key.organization.label}
1163 { organization empty$
1164 { cite$ #1 #3 substring$ }
1165 { "The " #4 organization chop.word #3 text.prefix$ }
1168 { key #3 text.prefix$ }
1171 { author format.lab.names }
1175 FUNCTION {editor.key.organization.label}
1178 { organization empty$
1179 { cite$ #1 #3 substring$ }
1180 { "The " #4 organization chop.word #3 text.prefix$ }
1183 { key #3 text.prefix$ }
1186 { editor format.lab.names }
1190 FUNCTION {calc.label}
1194 'author.editor.key.label
1195 { type$ "proceedings" =
1196 'editor.key.organization.label
1198 'author.key.organization.label
1206 year field.or.null purify$ #-1 #2 substring$
1209 year field.or.null purify$ #-1 #4 substring$
1211 sortify 'sort.label :=
1214 FUNCTION {sort.format.names}
1218 s num.names$ 'numnames :=
1219 numnames 'namesleft :=
1225 s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1226 nameptr numnames = t "others" = and
1230 nameptr #1 + 'nameptr :=
1231 namesleft #1 - 'namesleft :=
1236 FUNCTION {sort.format.title}
1240 "The " #4 t chop.word
1244 #1 global.max$ substring$
1247 FUNCTION {author.sort}
1250 { "to sort, need author or key in " cite$ * warning$
1256 { author sort.format.names }
1260 FUNCTION {author.editor.sort}
1264 { "to sort, need author, editor, or key in " cite$ * warning$
1270 { editor sort.format.names }
1273 { author sort.format.names }
1277 FUNCTION {author.organization.sort}
1279 { organization empty$
1281 { "to sort, need author, organization, or key in " cite$ * warning$
1287 { "The " #4 organization chop.word sortify }
1290 { author sort.format.names }
1294 FUNCTION {editor.organization.sort}
1296 { organization empty$
1298 { "to sort, need editor, organization, or key in " cite$ * warning$
1304 { "The " #4 organization chop.word sortify }
1307 { editor sort.format.names }
1320 { type$ "proceedings" =
1321 'editor.organization.sort
1323 'author.organization.sort
1333 year field.or.null sortify
1340 #1 entry.max$ substring$
1348 STRINGS { longest.label last.sort.label next.extra }
1350 INTEGERS { longest.label.width last.extra.num }
1352 FUNCTION {initialize.longest.label}
1353 { "" 'longest.label :=
1354 #0 int.to.chr$ 'last.sort.label :=
1356 #0 'longest.label.width :=
1357 #0 'last.extra.num :=
1360 FUNCTION {forward.pass}
1361 { last.sort.label sort.label =
1362 { last.extra.num #1 + 'last.extra.num :=
1363 last.extra.num int.to.chr$ 'extra.label :=
1365 { "a" chr.to.int$ 'last.extra.num :=
1367 sort.label 'last.sort.label :=
1372 FUNCTION {reverse.pass}
1374 { "a" 'extra.label := }
1377 label extra.label * 'label :=
1378 label width$ longest.label.width >
1379 { label 'longest.label :=
1380 label width$ 'longest.label.width :=
1384 extra.label 'next.extra :=
1387 EXECUTE {initialize.longest.label}
1389 ITERATE {forward.pass}
1391 REVERSE {reverse.pass}
1394 FUNCTION {begin.bib}
1396 { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
1401 { preamble$ write$ newline$ }
1403 "\begin{thebibliography}{" longest.label * "}" * write$ newline$
1408 EXECUTE {init.state.consts}
1410 ITERATE {call.type$}
1414 "\end{thebibliography}" write$ newline$