1
% UT Physics bibliographic style, ver. 2.1. Based on:
3
%X IEEE Transactions bibliography style (29-Jan-88 version)
4
%X numeric labels, order-of-reference, IEEE abbreviations,
5
%X quotes around article titles, commas separate all fields
6
%X except after book titles and before "notes". Otherwise,
7
%X much like the "plain" family, from which this is adapted.
10
%X 9/30/85 (HWT) Original version, by Howard Trickey.
11
%X 1/29/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik;
12
%X THIS `ieeetr' VERSION DOES NOT WORK WITH BIBTEX 0.98i.
14
% Modifications: 1) added hypertex support and "archive", "eprint"
16
% 2) parentheses around dates, and no "pp." for article entries
17
% 3) "publisher, address" instead of "address: publisher"
18
% 4) added "report" field for article entries.
19
% 5) particle physics-oriented abbreviations, rather than ieee.
20
% 6) added "collaboration" field, as per
21
% Jonathan Flynn' suggestion. SPIRES now supports this field.
22
% 7) Improved output of Proceedings entries
24
% Modified by Jacques Distler, 4/08
25
% History: ver 1.0 9/96
26
% ver 1.1 10/96 - added "collaboration" field
27
% ver 1.2 7/97 - added a "\providecommand{\href}[2]{#2}"
28
% to handle case where \href is not defined
29
% ver 1.3 12/97 - fixed lousy-looking proceedings output.
30
% ver 1.4 1/98 - fixed format.number, address in
32
% ver 1.5 3/99 - added (nonprinting) CITATION field for
34
% ver 1.6 4/99 - Fix to ensure %%CITATION output not broken
35
% across lines. Added new.sentence to ensure
36
% previous output properly terminated.
37
% (Moral: test before you release.)
38
% ver 1.7 10/99 - "et.~al." should be "et al." Morons!
39
% ver 1.8 11/99 - Changed the Web URL to the more portable
40
% arxiv.org. The "archive" field functions as
41
% a true base-URL. This is NOT A
42
% BACKWARDS-COMPATIBLE change!
43
% ver 1.8a 12/99 - MACROs for arXiv and cogprints
45
% ver 1.9 6/05 - eprint support for other entry types
46
% ver 2.0 4/08 - support "new-style" eprint identifiers
47
% ver 2.1 4/08 - support for "url" field
51
% The following are equivalent:
53
% eprint = "hep-th/9605023"
55
% eprint = "hep-th/9605023"
58
% \href{http://arxiv.org/abs/hep-th/9605023}{{\tt hep-th/9605023}}
60
% in the bibliographic output at the appropriate point. More generally,
61
% if the archive field is present, we produce a URL of the form
62
% "archive/eprint" as the first argument of the \href. If absent, the base
63
% URL defaults to "http://arxiv.org/abs"
64
% If you are using a hypertex macropackage, like hyperref.sty, this command
65
% will create a link to the eprint at Los Alamos (or wherever).
67
% "New-style" arXiv identifiers are also supported.
69
% archivePrefix = "arXiv",
'% eprint = "0707.3168",'
70
% primaryClass = "hep-th",
74
% \href{http://arxiv.org/abs/0707.3168}{{\tt arXiv:0707.3168 [hep-th]}}
76
% Another (non-arXiv) example:
78
% archive = "http://cogprints.org",
80
% archivePrefix = "Cogprints",
84
% \href{http://cogprints.org/5542}{{\tt Cogprints:5542}}
86
% The bibtex output produced by SPIRES, while far from perfect, is pretty
87
% suitable for use with this style. Indeed, this style was designed with
125
INTEGERS { output.state before.all mid.sentence after.quote after.sentence
126
after.quoted.block after.block }
128
FUNCTION {init.state.consts}
132
#3 'after.sentence :=
133
#4 'after.quoted.block :=
139
FUNCTION {output.nonnull}
141
output.state mid.sentence =
143
{ output.state after.quote =
145
{ output.state after.block =
150
{ output.state before.all =
152
{ output.state after.quoted.block =
157
{ add.period$ " " * write$ }
165
mid.sentence 'output.state :=
178
FUNCTION {output.check}
181
{ pop$ "empty " t * " in " * cite$ * warning$ }
186
FUNCTION {output.bibitem}
193
before.all 'output.state :=
197
{ after.quote 'output.state :=
201
{ output.state after.quoted.block =
210
{ output.state before.all =
212
{ output.state after.quote =
213
{ after.quoted.block 'output.state := }
214
{ after.block 'output.state := }
220
FUNCTION {new.sentence}
221
{ output.state after.block =
223
{ output.state before.all =
225
{ after.sentence 'output.state := }
249
FUNCTION {new.block.checka}
256
FUNCTION {new.block.checkb}
265
FUNCTION {new.sentence.checka}
272
FUNCTION {field.or.null}
282
{ "{\em " swap$ * "}" * }
286
FUNCTION {capitalize}
287
{ "u" change.case$ "t" change.case$ }
289
INTEGERS { nameptr namesleft numnames }
291
FUNCTION {format.names}
294
s num.names$ 'numnames :=
295
numnames 'namesleft :=
297
{ s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
306
{ " {\em et al.}" * }
314
nameptr #1 + 'nameptr :=
315
namesleft #1 - 'namesleft :=
320
FUNCTION {format.authors}
323
{ author format.names }
327
FUNCTION {format.archive}
331
{ archivePrefix ":" *}
335
FUNCTION {format.primaryClass}
339
{ " [" primaryClass * "]" *}
343
FUNCTION {format.eprint}
347
{"\href{http://arxiv.org/abs/" eprint * "}" *
348
"{{\tt " * format.archive * eprint *
349
format.primaryClass * "}}" *}
350
{"\href{" archive * "/" * eprint * "}" *
351
"{{\tt " * format.archive * eprint *
352
format.primaryClass * "}}" *}
358
FUNCTION {format.url}
361
{"\url{" url * "}" *}
365
FUNCTION {format.report}
374
FUNCTION {format.editors}
377
{ editor format.names
378
editor num.names$ #1 >
386
FUNCTION {format.title}
389
{ "``" title * ",''" * }
393
FUNCTION {format.title.p}
396
{ "``" title * ".''" * }
404
{ t #1 #1 substring$ "-" =
405
{ t #1 #2 substring$ "--" = not
407
t #2 global.max$ substring$ 't :=
409
{ { t #1 #1 substring$ "-" = }
411
t #2 global.max$ substring$ 't :=
417
{ t #1 #1 substring$ *
418
t #2 global.max$ substring$ 't :=
425
FUNCTION {format.date}
429
{ "there's a month but no year in " cite$ * warning$
436
{ month ", " * year * }
442
FUNCTION {format.date.paren}
446
{ "there's a month but no year in " cite$ * warning$
453
{"(" month * ", " * year * ")" *}
459
FUNCTION {format.collaboration}
460
{ collaboration empty$
462
{ "{\bf " collaboration * "} " * "Collaboration" * }
466
FUNCTION {format.SLACcitation}
467
{ SLACcitation empty$
469
{ newline$ SLACcitation output "" newline$ }
473
FUNCTION {format.btitle}
477
FUNCTION {tie.or.space.connect}
478
{ duplicate$ text.length$ #3 <
485
FUNCTION {either.or.check}
488
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
492
FUNCTION {format.bvolume}
498
{ " of " * series emphasize * }
500
"volume and number" number either.or.check
505
FUNCTION {format.number.series}
508
{ series field.or.null }
509
{ output.state mid.sentence =
515
{ "there's a number but no series in " cite$ * warning$ }
516
{ " in " * series * }
525
FUNCTION {format.edition}
528
{ edition "l" change.case$ "~ed." * }
532
INTEGERS { multiresult }
534
FUNCTION {multi.page.check}
543
swap$ duplicate$ "," =
546
{ #1 'multiresult := }
547
{ t #2 global.max$ substring$ 't := }
554
FUNCTION {format.pages}
557
{ pages multi.page.check
558
{ "pp.~" pages n.dashify * }
565
FUNCTION {format.pages.nopp}
568
{ pages multi.page.check
577
FUNCTION {format.volume}
580
{ "{\bf " volume * "}" * }
584
FUNCTION {format.number}
587
{ "no.~" number * "," *}
591
FUNCTION {format.chapter.pages}
596
{ type "l" change.case$ chapter tie.or.space.connect }
600
{ ", " * format.pages * }
606
FUNCTION {format.in.ed.booktitle}
609
{ "in " booktitle emphasize *
612
{ ", " * format.editors * }
618
FUNCTION {format.thesis.type}
622
output.state after.block =
623
{ type "t" change.case$ }
624
{ type "l" change.case$ }
630
FUNCTION {empty.misc.check}
631
{ author empty$ title empty$ howpublished empty$
632
month empty$ year empty$ note empty$
634
{ "all relevant fields are empty in " cite$ * warning$ }
639
FUNCTION {format.tr.number}
646
{ number tie.or.space.connect }
650
FUNCTION {format.paddress}
653
{ "(" address * ")" * }
657
FUNCTION {format.article.crossref}
660
{ "need key or journal for " cite$ * " to crossref " * crossref *
664
{ "in {\em " journal * "\/}" * }
669
" \cite{" * crossref * "}" *
672
FUNCTION {format.crossref.editor}
673
{ editor #1 "{vv~}{ll}" format.name$
674
editor num.names$ duplicate$
676
{ pop$ " {\em et.~al.}" * }
679
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
680
{ " {\em et.~al.}" * }
681
{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
689
FUNCTION {format.book.crossref}
691
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
699
editor field.or.null author field.or.null =
703
{ "need editor, key, or series for " cite$ * " to crossref " *
707
{ "{\em " * series * "\/}" * }
713
{ format.crossref.editor * }
715
" \cite{" * crossref * "}" *
718
FUNCTION {format.incoll.inproc.crossref}
720
editor field.or.null author field.or.null =
724
{ "need editor, key, or booktitle for " cite$ * " to crossref " *
728
{ "in {\em " booktitle * "\/}" * }
734
{ "in " format.crossref.editor * }
736
" \cite{" * crossref * "}" *
741
format.collaboration output
742
format.authors "author" output.check
743
format.title "title" output.check
748
{ journal emphasize "journal" output.check
752
format.date.paren "year" output.check
754
{ format.number output }
758
format.pages.nopp output
762
{format.eprint output}
763
{blank.sep format.report output format.eprint output}
766
{ format.article.crossref output.nonnull
776
format.SLACcitation output
782
format.collaboration output
784
{ format.editors "author and editor" output.check }
785
{ format.authors output.nonnull
787
{ "author and editor" editor either.or.check }
792
format.btitle "title" output.check
794
{ format.bvolume output
796
format.number.series output
798
publisher "publisher" output.check
802
format.book.crossref output.nonnull
805
format.edition output
806
format.date "year" output.check
814
format.SLACcitation output
820
format.collaboration output
821
format.authors output
823
{ "empty title in " cite$ * warning$
824
howpublished new.sentence.checka
826
{ howpublished empty$ not
827
address empty$ month empty$ year empty$ and and
829
{ format.title.p output.nonnull }
830
{ format.title output.nonnull }
835
howpublished capitalize output
845
format.SLACcitation output
851
format.collaboration output
853
{ format.editors "author and editor" output.check }
854
{ format.authors output.nonnull
856
{ "author and editor" editor either.or.check }
861
format.btitle "title" output.check
863
{ format.bvolume output
864
format.chapter.pages "chapter and pages" output.check
866
format.number.series output
868
publisher "publisher" output.check
871
{ format.chapter.pages "chapter and pages" output.check
873
format.book.crossref output.nonnull
876
format.edition output
877
format.date "year" output.check
885
format.SLACcitation output
889
FUNCTION {incollection}
891
format.collaboration output
892
format.authors "author" output.check
893
format.title "title" output.check
896
{ format.in.ed.booktitle "booktitle" output.check
897
format.bvolume output
898
format.number.series output
899
format.chapter.pages output
901
publisher "publisher" output.check
903
format.edition output
904
format.date "year" output.check
906
{ format.incoll.inproc.crossref output.nonnull
907
format.chapter.pages output
917
format.SLACcitation output
921
FUNCTION {inproceedings}
923
format.collaboration output
924
format.authors "author" output.check
925
format.title "title" output.check
928
{ format.in.ed.booktitle "booktitle" output.check
929
format.bvolume output
930
format.number.series output
936
format.date "year" output.check
938
{ format.incoll.inproc.crossref output.nonnull
949
format.SLACcitation output
953
FUNCTION {conference} { inproceedings }
957
format.collaboration output
959
{ organization empty$
961
{ organization output.nonnull
966
{ format.authors output.nonnull }
968
format.btitle "title" output.check
970
{ organization empty$
971
{ address new.block.checka
977
{ organization address new.block.checkb
982
format.edition output
993
FUNCTION {mastersthesis}
995
format.authors "author" output.check
996
format.title "title" output.check
998
"Master's thesis" format.thesis.type output.nonnull
999
school "school" output.check
1001
format.date "year" output.check
1011
format.collaboration output
1012
format.authors output
1014
{ howpublished new.sentence.checka }
1015
{ howpublished empty$ not
1016
month empty$ year empty$ and
1018
{ format.title.p output.nonnull }
1019
{ format.title output.nonnull }
1024
howpublished capitalize output
1035
FUNCTION {phdthesis}
1037
format.authors "author" output.check
1038
format.btitle "title" output.check
1040
"PhD thesis" format.thesis.type output.nonnull
1041
school "school" output.check
1043
format.date "year" output.check
1045
format.eprint output
1051
format.SLACcitation output
1055
FUNCTION {proceedings}
1058
{ organization output }
1059
{ format.editors output.nonnull }
1061
format.btitle "title" output.check
1062
format.bvolume output
1063
format.number.series output
1066
{ organization output }
1071
format.date "year" output.check
1073
format.eprint output
1079
format.SLACcitation output
1083
FUNCTION {techreport}
1085
format.collaboration output
1086
format.authors "author" output.check
1087
format.title "title" output.check
1089
format.tr.number output.nonnull
1090
institution "institution" output.check
1092
format.date "year" output.check
1094
format.eprint output
1102
FUNCTION {unpublished}
1104
format.collaboration output
1105
format.authors "author" output.check
1106
format.title.p "title" output.check
1108
note "note" output.check
1111
format.SLACcitation output
1115
FUNCTION {default.type} { misc }
1117
MACRO {jan} {"Jan."}
1119
MACRO {feb} {"Feb."}
1121
MACRO {mar} {"Mar."}
1123
MACRO {apr} {"Apr."}
1127
MACRO {jun} {"June"}
1129
MACRO {jul} {"July"}
1131
MACRO {aug} {"Aug."}
1133
MACRO {sep} {"Sept."}
1135
MACRO {oct} {"Oct."}
1137
MACRO {nov} {"Nov."}
1139
MACRO {dec} {"Dec."}
1141
MACRO {nup} {"Nucl. Phys."}
1143
MACRO {cmp} {"Comm. Math. Phys."}
1145
MACRO {prl} {"Phys. Rev. Lett."}
1147
MACRO {pl} {"Phys. Lett."}
1149
MACRO {rmp} {"Rev. Mod. Phys."}
1151
MACRO {ijmp} {"Int. Jour. Mod. Phys."}
1153
MACRO {mpl} {"Mod. Phys. Lett."}
1155
MACRO {pr} {"Phys. Rev."}
1157
MACRO {arXiv} {"http://arxiv.org/abs"}
1158
MACRO {cogprints} {"http://cogprints.org"}
1159
MACRO {pubmed} {"http://www.ncbi.nlm.nih.gov/pubmed"}
1163
STRINGS { longest.label }
1165
INTEGERS { number.label longest.label.width }
1167
FUNCTION {initialize.longest.label}
1168
{ "" 'longest.label :=
1170
#0 'longest.label.width :=
1173
FUNCTION {longest.label.pass}
1174
{ number.label int.to.str$ 'label :=
1175
number.label #1 + 'number.label :=
1176
label width$ longest.label.width >
1177
{ label 'longest.label :=
1178
label width$ 'longest.label.width :=
1184
EXECUTE {initialize.longest.label}
1186
ITERATE {longest.label.pass}
1188
FUNCTION {begin.bib}
1191
{ preamble$ write$ newline$ }
1193
"\providecommand{\href}[2]{#2}"
1194
"\begingroup\raggedright\begin{thebibliography}{" * longest.label *
1195
"}" * write$ newline$ }
1199
EXECUTE {init.state.consts}
1201
ITERATE {call.type$}
1205
"\end{thebibliography}\endgroup" write$ newline$