/utphys

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/utphys/

« back to all changes in this revision

Viewing changes to utphys.bst

  • Committer: Jacques Distler
  • Date: 2008-04-07 07:12:53 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20080407071253-42a1qsvm1ttbm0xd
Initial Commits

Show diffs side-by-side

added added

removed removed

 
1
% UT Physics bibliographic style, ver. 2.1. Based on:
 
2
%
 
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.
 
8
%X
 
9
%X       History
 
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.
 
13
%
 
14
%  Modifications: 1) added hypertex support and "archive", "eprint"
 
15
%                    and "url" fields.
 
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
 
23
%
 
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 
 
31
%                                    proceedings entries
 
32
%                    ver 1.5  3/99 - added (nonprinting) CITATION field for
 
33
%                                    SLAC internal use
 
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
 
44
%                                    BaseURL's defined.
 
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
 
48
%
 
49
% HyperTeX Wizardry:
 
50
%
 
51
% The following are equivalent:
 
52
%   archive  =  arXiv
 
53
%   eprint   = "hep-th/9605023"
 
54
% and
 
55
%   eprint   = "hep-th/9605023"
 
56
% both produce 
 
57
%
 
58
%    \href{http://arxiv.org/abs/hep-th/9605023}{{\tt hep-th/9605023}}
 
59
%
 
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).
 
66
%
 
67
% "New-style" arXiv identifiers are also supported.
 
68
%
 
69
%     archivePrefix = "arXiv",
 
 
'%     eprint    = "0707.3168",'
 
70
%     primaryClass = "hep-th",
 
71
%
 
72
% produces
 
73
%
 
74
%     \href{http://arxiv.org/abs/0707.3168}{{\tt arXiv:0707.3168 [hep-th]}}
 
75
%
 
76
% Another (non-arXiv) example:
 
77
%
 
78
%     archive = "http://cogprints.org",
 
79
%     eprint = "5542",
 
80
%     archivePrefix = "Cogprints",
 
81
%
 
82
%  produces
 
83
%
 
84
%     \href{http://cogprints.org/5542}{{\tt Cogprints:5542}}  
 
85
%
 
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
 
88
% SPIRES in mind.
 
89
 
 
90
ENTRY
 
91
  { address
 
92
    author
 
93
    booktitle
 
94
    chapter
 
95
    edition
 
96
    editor
 
97
    howpublished
 
98
    institution
 
99
    journal
 
100
    key
 
101
    month
 
102
    note
 
103
    number
 
104
    organization
 
105
    pages
 
106
    publisher
 
107
    school
 
108
    series
 
109
    title
 
110
    type
 
111
    volume
 
112
    year
 
113
    archive
 
114
    eprint
 
115
    report
 
116
    collaboration
 
117
    SLACcitation
 
118
    archivePrefix
 
119
    primaryClass
 
120
    url
 
121
  }
 
122
  {}
 
123
  { label }
 
124
 
 
125
INTEGERS { output.state before.all mid.sentence after.quote after.sentence
 
126
                after.quoted.block after.block }
 
127
 
 
128
FUNCTION {init.state.consts}
 
129
{ #0 'before.all :=
 
130
  #1 'mid.sentence :=
 
131
  #2 'after.quote :=
 
132
  #3 'after.sentence :=
 
133
  #4 'after.quoted.block :=
 
134
  #5 'after.block :=
 
135
}
 
136
 
 
137
STRINGS { s t }
 
138
 
 
139
FUNCTION {output.nonnull}
 
140
{ 's :=
 
141
  output.state mid.sentence =
 
142
    { ", " * write$ }
 
143
    { output.state after.quote =
 
144
        { " " * write$ }
 
145
        { output.state after.block =
 
146
            { add.period$ write$
 
147
              newline$
 
148
              "\newblock " write$
 
149
            }
 
150
            { output.state before.all =
 
151
                'write$
 
152
                { output.state after.quoted.block =
 
153
                    { write$
 
154
                      newline$
 
155
                      "\newblock " write$
 
156
                    }
 
157
                    { add.period$ " " * write$ }
 
158
                  if$
 
159
                }
 
160
              if$
 
161
            }
 
162
          if$
 
163
        }
 
164
      if$
 
165
      mid.sentence 'output.state :=
 
166
    }
 
167
  if$
 
168
  s
 
169
}
 
170
 
 
171
FUNCTION {output}
 
172
{ duplicate$ empty$
 
173
    'pop$
 
174
    'output.nonnull
 
175
  if$
 
176
}
 
177
 
 
178
FUNCTION {output.check}
 
179
{ 't :=
 
180
  duplicate$ empty$
 
181
    { pop$ "empty " t * " in " * cite$ * warning$ }
 
182
    'output.nonnull
 
183
  if$
 
184
}
 
185
 
 
186
FUNCTION {output.bibitem}
 
187
{ newline$
 
188
  "\bibitem{" write$
 
189
  cite$ write$
 
190
  "}" write$
 
191
  newline$
 
192
  ""
 
193
  before.all 'output.state :=
 
194
}
 
195
 
 
196
FUNCTION {blank.sep}
 
197
{ after.quote 'output.state :=
 
198
}
 
199
 
 
200
FUNCTION {fin.entry}
 
201
{ output.state after.quoted.block =
 
202
    'skip$
 
203
    'add.period$
 
204
  if$
 
205
  write$
 
206
  newline$
 
207
}
 
208
 
 
209
FUNCTION {new.block}
 
210
{ output.state before.all =
 
211
    'skip$
 
212
    { output.state after.quote =
 
213
        { after.quoted.block 'output.state := }
 
214
        { after.block 'output.state := }
 
215
      if$
 
216
    }
 
217
  if$
 
218
}
 
219
 
 
220
FUNCTION {new.sentence}
 
221
{ output.state after.block =
 
222
    'skip$
 
223
    { output.state before.all =
 
224
        'skip$
 
225
        { after.sentence 'output.state := }
 
226
      if$
 
227
    }
 
228
  if$
 
229
}
 
230
 
 
231
FUNCTION {not}
 
232
{   { #0 }
 
233
    { #1 }
 
234
  if$
 
235
}
 
236
 
 
237
FUNCTION {and}
 
238
{   'skip$
 
239
    { pop$ #0 }
 
240
  if$
 
241
}
 
242
 
 
243
FUNCTION {or}
 
244
{   { pop$ #1 }
 
245
    'skip$
 
246
  if$
 
247
}
 
248
 
 
249
FUNCTION {new.block.checka}
 
250
{ empty$
 
251
    'skip$
 
252
    'new.block
 
253
  if$
 
254
}
 
255
 
 
256
FUNCTION {new.block.checkb}
 
257
{ empty$
 
258
  swap$ empty$
 
259
  and
 
260
    'skip$
 
261
    'new.block
 
262
  if$
 
263
}
 
264
 
 
265
FUNCTION {new.sentence.checka}
 
266
{ empty$
 
267
    'skip$
 
268
    'new.sentence
 
269
  if$
 
270
}
 
271
 
 
272
FUNCTION {field.or.null}
 
273
{ duplicate$ empty$
 
274
    { pop$ "" }
 
275
    'skip$
 
276
  if$
 
277
}
 
278
 
 
279
FUNCTION {emphasize}
 
280
{ duplicate$ empty$
 
281
    { pop$ "" }
 
282
    { "{\em " swap$ * "}" * }
 
283
  if$
 
284
}
 
285
 
 
286
FUNCTION {capitalize}
 
287
{ "u" change.case$ "t" change.case$ }
 
288
 
 
289
INTEGERS { nameptr namesleft numnames }
 
290
 
 
291
FUNCTION {format.names}
 
292
{ 's :=
 
293
  #1 'nameptr :=
 
294
  s num.names$ 'numnames :=
 
295
  numnames 'namesleft :=
 
296
    { namesleft #0 > }
 
297
    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
 
298
      nameptr #1 >
 
299
        { namesleft #1 >
 
300
            { ", " * t * }
 
301
            { numnames #2 >
 
302
                { "," * }
 
303
                'skip$
 
304
              if$
 
305
              t "others" =
 
306
                { " {\em et al.}" * }
 
307
                { " and " * t * }
 
308
              if$
 
309
            }
 
310
          if$
 
311
        }
 
312
        't
 
313
      if$
 
314
      nameptr #1 + 'nameptr :=
 
315
      namesleft #1 - 'namesleft :=
 
316
    }
 
317
  while$
 
318
}
 
319
 
 
320
FUNCTION {format.authors}
 
321
{ author empty$
 
322
    { "" }
 
323
    { author format.names }
 
324
  if$
 
325
}
 
326
 
 
327
FUNCTION {format.archive}
 
328
{
 
329
  archivePrefix empty$
 
330
      { "" }
 
331
      { archivePrefix ":" *}
 
332
  if$            
 
333
}
 
334
 
 
335
FUNCTION {format.primaryClass}
 
336
{
 
337
  primaryClass empty$
 
338
      { "" }
 
339
      { " [" primaryClass * "]" *}
 
340
  if$            
 
341
}
 
342
 
 
343
FUNCTION {format.eprint}
 
344
{ eprint empty$
 
345
     { ""}
 
346
     { archive empty$
 
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 * "}}" *}
 
353
       if$
 
354
     }
 
355
     if$
 
356
}
 
357
 
 
358
FUNCTION {format.url}
 
359
{ url empty$
 
360
    { "" }
 
361
    {"\url{" url * "}" *}
 
362
  if$
 
363
}
 
364
 
 
365
FUNCTION {format.report}
 
366
{ report empty$
 
367
     { ""}
 
368
     { report}
 
369
     if$
 
370
}
 
371
 
 
372
 
 
373
 
 
374
FUNCTION {format.editors}
 
375
{ editor empty$
 
376
    { "" }
 
377
    { editor format.names
 
378
      editor num.names$ #1 >
 
379
        { ", eds." * }
 
380
        { ", ed." * }
 
381
      if$
 
382
    }
 
383
  if$
 
384
}
 
385
 
 
386
FUNCTION {format.title}
 
387
{ title empty$
 
388
    { "" }
 
389
    { "``" title "t" change.case$ * ",''" * }
 
390
  if$
 
391
}
 
392
 
 
393
FUNCTION {format.title.p}
 
394
{ title empty$
 
395
    { "" }
 
396
    { "``" title "t" change.case$ * ".''" * }
 
397
  if$
 
398
}
 
399
 
 
400
FUNCTION {n.dashify}
 
401
{ 't :=
 
402
  ""
 
403
    { t empty$ not }
 
404
    { t #1 #1 substring$ "-" =
 
405
        { t #1 #2 substring$ "--" = not
 
406
            { "--" *
 
407
              t #2 global.max$ substring$ 't :=
 
408
            }
 
409
            {   { t #1 #1 substring$ "-" = }
 
410
                { "-" *
 
411
                  t #2 global.max$ substring$ 't :=
 
412
                }
 
413
              while$
 
414
            }
 
415
          if$
 
416
        }
 
417
        { t #1 #1 substring$ *
 
418
          t #2 global.max$ substring$ 't :=
 
419
        }
 
420
      if$
 
421
    }
 
422
  while$
 
423
}
 
424
 
 
425
FUNCTION {format.date}
 
426
{ year empty$
 
427
    { month empty$
 
428
        { "" }
 
429
        { "there's a month but no year in " cite$ * warning$
 
430
          month
 
431
        }
 
432
      if$
 
433
    }
 
434
    { month empty$
 
435
        'year
 
436
        { month ", " * year * }
 
437
      if$
 
438
    }
 
439
  if$
 
440
}
 
441
 
 
442
FUNCTION {format.date.paren}
 
443
{ year empty$
 
444
    { month empty$
 
445
        { "" }
 
446
        { "there's a month but no year in " cite$ * warning$
 
447
          month
 
448
        }
 
449
      if$
 
450
    }
 
451
    { month empty$
 
452
        {"(" year * ")" *}
 
453
        {"(" month * ", " * year * ")" *}
 
454
      if$
 
455
    }
 
456
  if$
 
457
}
 
458
 
 
459
FUNCTION {format.collaboration}
 
460
{ collaboration empty$
 
461
    { "" }
 
462
    { "{\bf " collaboration * "} " * "Collaboration" * }
 
463
  if$
 
464
}
 
465
 
 
466
FUNCTION {format.SLACcitation}
 
467
{ SLACcitation empty$
 
468
  {""}
 
469
   { newline$ SLACcitation output "" newline$ }
 
470
  if$
 
471
}
 
472
 
 
473
FUNCTION {format.btitle}
 
474
{ title emphasize
 
475
}
 
476
 
 
477
FUNCTION {tie.or.space.connect}
 
478
{ duplicate$ text.length$ #3 <
 
479
    { "~" }
 
480
    { " " }
 
481
  if$
 
482
  swap$ * *
 
483
}
 
484
 
 
485
FUNCTION {either.or.check}
 
486
{ empty$
 
487
    'pop$
 
488
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
 
489
  if$
 
490
}
 
491
 
 
492
FUNCTION {format.bvolume}
 
493
{ volume empty$
 
494
    { "" }
 
495
    { "vol.~" volume *
 
496
      series empty$
 
497
        'skip$
 
498
        { " of " * series emphasize * }
 
499
      if$
 
500
      "volume and number" number either.or.check
 
501
    }
 
502
  if$
 
503
}
 
504
 
 
505
FUNCTION {format.number.series}
 
506
{ volume empty$
 
507
    { number empty$
 
508
        { series field.or.null }
 
509
        { output.state mid.sentence =
 
510
            { "no.~" }
 
511
            { "No.~" }
 
512
          if$
 
513
          number *
 
514
          series empty$
 
515
            { "there's a number but no series in " cite$ * warning$ }
 
516
            { " in " * series * }
 
517
          if$
 
518
        }
 
519
      if$
 
520
    }
 
521
    { "" }
 
522
  if$
 
523
}
 
524
 
 
525
FUNCTION {format.edition}
 
526
{ edition empty$
 
527
    { "" }
 
528
    { edition "l" change.case$ "~ed." * }
 
529
  if$
 
530
}
 
531
 
 
532
INTEGERS { multiresult }
 
533
 
 
534
FUNCTION {multi.page.check}
 
535
{ 't :=
 
536
  #0 'multiresult :=
 
537
    { multiresult not
 
538
      t empty$ not
 
539
      and
 
540
    }
 
541
    { t #1 #1 substring$
 
542
      duplicate$ "-" =
 
543
      swap$ duplicate$ "," =
 
544
      swap$ "+" =
 
545
      or or
 
546
        { #1 'multiresult := }
 
547
        { t #2 global.max$ substring$ 't := }
 
548
      if$
 
549
    }
 
550
  while$
 
551
  multiresult
 
552
}
 
553
 
 
554
FUNCTION {format.pages}
 
555
{ pages empty$
 
556
    { "" }
 
557
    { pages multi.page.check
 
558
        { "pp.~" pages n.dashify * }
 
559
        { "p.~" pages * }
 
560
      if$
 
561
    }
 
562
  if$
 
563
}
 
564
 
 
565
FUNCTION {format.pages.nopp}
 
566
{ pages empty$
 
567
    { "" }
 
568
    { pages multi.page.check
 
569
        { pages n.dashify  }
 
570
        { pages }
 
571
      if$
 
572
    }
 
573
  if$
 
574
}
 
575
 
 
576
 
 
577
FUNCTION {format.volume}
 
578
{ volume empty$
 
579
    { "" }
 
580
    { "{\bf " volume * "}" * }
 
581
  if$
 
582
}
 
583
 
 
584
FUNCTION {format.number}
 
585
{ number empty$
 
586
    { "" }
 
587
    { "no.~" number * "," *}
 
588
  if$
 
589
}
 
590
 
 
591
FUNCTION {format.chapter.pages}
 
592
{ chapter empty$
 
593
    'format.pages
 
594
    { type empty$
 
595
        { "ch.~" chapter * }
 
596
        { type "l" change.case$ chapter tie.or.space.connect }
 
597
      if$
 
598
      pages empty$
 
599
        'skip$
 
600
        { ", " * format.pages * }
 
601
      if$
 
602
    }
 
603
  if$
 
604
}
 
605
 
 
606
FUNCTION {format.in.ed.booktitle}
 
607
{ booktitle empty$
 
608
    { "" }
 
609
    { "in " booktitle emphasize *
 
610
      editor empty$
 
611
        'skip$
 
612
        { ", " * format.editors *  }
 
613
      if$
 
614
    }
 
615
  if$
 
616
}
 
617
 
 
618
FUNCTION {format.thesis.type}
 
619
{ type empty$
 
620
    'skip$
 
621
    { pop$
 
622
      output.state after.block =
 
623
        { type "t" change.case$ }
 
624
        { type "l" change.case$ }
 
625
      if$
 
626
    }
 
627
  if$
 
628
}
 
629
 
 
630
FUNCTION {empty.misc.check}
 
631
{ author empty$ title empty$ howpublished empty$
 
632
  month empty$ year empty$ note empty$
 
633
  and and and and and
 
634
    { "all relevant fields are empty in " cite$ * warning$ }
 
635
    'skip$
 
636
  if$
 
637
}
 
638
 
 
639
FUNCTION {format.tr.number}
 
640
{ type empty$
 
641
    { "Tech. Rep." }
 
642
    'type
 
643
  if$
 
644
  number empty$
 
645
    { "l" change.case$ }
 
646
    { number tie.or.space.connect }
 
647
  if$
 
648
}
 
649
 
 
650
FUNCTION {format.paddress}
 
651
{ address empty$
 
652
    { "" }
 
653
    { "(" address * ")" * }
 
654
  if$
 
655
}
 
656
 
 
657
FUNCTION {format.article.crossref}
 
658
{ key empty$
 
659
    { journal empty$
 
660
        { "need key or journal for " cite$ * " to crossref " * crossref *
 
661
          warning$
 
662
          ""
 
663
        }
 
664
        { "in {\em " journal * "\/}" * }
 
665
      if$
 
666
    }
 
667
    { "in " key * }
 
668
  if$
 
669
  " \cite{" * crossref * "}" *
 
670
}
 
671
 
 
672
FUNCTION {format.crossref.editor}
 
673
{ editor #1 "{vv~}{ll}" format.name$
 
674
  editor num.names$ duplicate$
 
675
  #2 >
 
676
    { pop$ " {\em et.~al.}" * }
 
677
    { #2 <
 
678
        'skip$
 
679
        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
 
680
            { " {\em et.~al.}" * }
 
681
            { " and " * editor #2 "{vv~}{ll}" format.name$ * }
 
682
          if$
 
683
        }
 
684
      if$
 
685
    }
 
686
  if$
 
687
}
 
688
 
 
689
FUNCTION {format.book.crossref}
 
690
{ volume empty$
 
691
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
 
692
      "In "
 
693
    }
 
694
    { "Vol.~" volume *
 
695
      " of " *
 
696
    }
 
697
  if$
 
698
  editor empty$
 
699
  editor field.or.null author field.or.null =
 
700
  or
 
701
    { key empty$
 
702
        { series empty$
 
703
            { "need editor, key, or series for " cite$ * " to crossref " *
 
704
              crossref * warning$
 
705
              "" *
 
706
            }
 
707
            { "{\em " * series * "\/}" * }
 
708
          if$
 
709
        }
 
710
        { key * }
 
711
      if$
 
712
    }
 
713
    { format.crossref.editor * }
 
714
  if$
 
715
  " \cite{" * crossref * "}" *
 
716
}
 
717
 
 
718
FUNCTION {format.incoll.inproc.crossref}
 
719
{ editor empty$
 
720
  editor field.or.null author field.or.null =
 
721
  or
 
722
    { key empty$
 
723
        { booktitle empty$
 
724
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
 
725
              crossref * warning$
 
726
              ""
 
727
            }
 
728
            { "in {\em " booktitle * "\/}" * }
 
729
          if$
 
730
        }
 
731
        { "in " key * }
 
732
      if$
 
733
    }
 
734
    { "in " format.crossref.editor * }
 
735
  if$
 
736
  " \cite{" * crossref * "}" *
 
737
}
 
738
 
 
739
FUNCTION {article}
 
740
{ output.bibitem
 
741
  format.collaboration output
 
742
  format.authors "author" output.check
 
743
  format.title "title" output.check
 
744
  blank.sep
 
745
  crossref missing$
 
746
  { journal missing$   
 
747
    {}
 
748
    { journal emphasize "journal" output.check
 
749
       blank.sep
 
750
      format.volume output
 
751
      blank.sep
 
752
      format.date.paren "year"  output.check
 
753
      month empty$
 
754
                { format.number output }
 
755
                'skip$
 
756
         if$
 
757
      blank.sep
 
758
      format.pages.nopp output
 
759
      }
 
760
      if$
 
761
      report missing$
 
762
            {format.eprint output}
 
763
            {blank.sep format.report output format.eprint output}
 
764
            if$
 
765
    }
 
766
    { format.article.crossref output.nonnull
 
767
      format.pages output
 
768
      format.eprint output
 
769
    }
 
770
  if$
 
771
  new.sentence
 
772
  format.url output
 
773
  new.sentence
 
774
  note output
 
775
  new.sentence
 
776
  format.SLACcitation output
 
777
  fin.entry
 
778
}
 
779
 
 
780
FUNCTION {book}
 
781
{ output.bibitem
 
782
  format.collaboration output
 
783
  author empty$
 
784
    { format.editors "author and editor" output.check }
 
785
    { format.authors output.nonnull
 
786
      crossref missing$
 
787
        { "author and editor" editor either.or.check }
 
788
        'skip$
 
789
      if$
 
790
    }
 
791
  if$
 
792
  format.btitle "title" output.check
 
793
  crossref missing$
 
794
    { format.bvolume output
 
795
      new.block
 
796
      format.number.series output
 
797
      new.sentence
 
798
      publisher "publisher" output.check
 
799
      address output
 
800
    }
 
801
    { new.block
 
802
      format.book.crossref output.nonnull
 
803
    }
 
804
  if$
 
805
  format.edition output
 
806
  format.date "year" output.check
 
807
  new.block
 
808
  format.eprint output
 
809
  new.block
 
810
  format.url output
 
811
  new.block
 
812
  note output
 
813
  new.sentence
 
814
  format.SLACcitation output
 
815
  fin.entry
 
816
}
 
817
 
 
818
FUNCTION {booklet}
 
819
{ output.bibitem
 
820
  format.collaboration output
 
821
  format.authors output
 
822
  title empty$
 
823
    { "empty title in " cite$ * warning$
 
824
      howpublished new.sentence.checka
 
825
    }
 
826
    { howpublished empty$ not
 
827
      address empty$ month empty$ year empty$ and and
 
828
      or
 
829
        { format.title.p output.nonnull }
 
830
        { format.title output.nonnull }
 
831
      if$
 
832
      blank.sep
 
833
    }
 
834
  if$
 
835
  howpublished capitalize output
 
836
  address output
 
837
  format.date output
 
838
  new.block
 
839
  format.eprint output
 
840
  new.block
 
841
  format.url output
 
842
  new.block
 
843
  note output
 
844
  new.sentence
 
845
  format.SLACcitation output
 
846
  fin.entry
 
847
}
 
848
 
 
849
FUNCTION {inbook}
 
850
{ output.bibitem
 
851
  format.collaboration output
 
852
  author empty$
 
853
    { format.editors "author and editor" output.check }
 
854
    { format.authors output.nonnull
 
855
      crossref missing$
 
856
        { "author and editor" editor either.or.check }
 
857
        'skip$
 
858
      if$
 
859
    }
 
860
  if$
 
861
  format.btitle "title" output.check
 
862
  crossref missing$
 
863
    { format.bvolume output
 
864
      format.chapter.pages "chapter and pages" output.check
 
865
      new.block
 
866
      format.number.series output
 
867
      new.block
 
868
      publisher "publisher" output.check
 
869
      address output
 
870
    }
 
871
    { format.chapter.pages "chapter and pages" output.check
 
872
      new.block
 
873
      format.book.crossref output.nonnull
 
874
    }
 
875
  if$
 
876
  format.edition output
 
877
  format.date "year" output.check
 
878
  new.block
 
879
  format.eprint output
 
880
  new.block
 
881
  format.url output
 
882
  new.block
 
883
  note output
 
884
  new.sentence
 
885
  format.SLACcitation output
 
886
  fin.entry
 
887
}
 
888
 
 
889
FUNCTION {incollection}
 
890
{ output.bibitem
 
891
  format.collaboration output
 
892
  format.authors "author" output.check
 
893
  format.title "title" output.check
 
894
  blank.sep
 
895
  crossref missing$
 
896
    { format.in.ed.booktitle "booktitle" output.check
 
897
      format.bvolume output
 
898
      format.number.series output
 
899
      format.chapter.pages output
 
900
      new.block
 
901
      publisher "publisher" output.check
 
902
      address output
 
903
      format.edition output
 
904
      format.date "year" output.check
 
905
    }
 
906
    { format.incoll.inproc.crossref output.nonnull
 
907
      format.chapter.pages output
 
908
    }
 
909
  if$
 
910
  new.block
 
911
  format.eprint output
 
912
  new.block
 
913
  format.url output
 
914
  new.block
 
915
  note output
 
916
  new.sentence
 
917
  format.SLACcitation output
 
918
  fin.entry
 
919
}
 
920
 
 
921
FUNCTION {inproceedings}
 
922
{ output.bibitem
 
923
  format.collaboration output
 
924
  format.authors "author" output.check
 
925
  format.title "title" output.check
 
926
  blank.sep
 
927
  crossref missing$
 
928
    { format.in.ed.booktitle "booktitle" output.check
 
929
      format.bvolume output
 
930
      format.number.series output
 
931
      format.pages output
 
932
      organization output
 
933
      new.block
 
934
      publisher output
 
935
      address output
 
936
      format.date "year" output.check
 
937
    }
 
938
    { format.incoll.inproc.crossref output.nonnull
 
939
      format.pages output
 
940
    }
 
941
  if$
 
942
  new.block
 
943
  format.eprint output
 
944
  new.block
 
945
  format.url output
 
946
  new.block
 
947
  note output
 
948
  new.sentence
 
949
  format.SLACcitation output
 
950
  fin.entry
 
951
}
 
952
 
 
953
FUNCTION {conference} { inproceedings }
 
954
 
 
955
FUNCTION {manual}
 
956
{ output.bibitem
 
957
  format.collaboration output
 
958
  author empty$
 
959
    { organization empty$
 
960
        'skip$
 
961
        { organization output.nonnull
 
962
          address output
 
963
        }
 
964
      if$
 
965
    }
 
966
    { format.authors output.nonnull }
 
967
  if$
 
968
  format.btitle "title" output.check
 
969
  author empty$
 
970
    { organization empty$
 
971
        { address new.block.checka
 
972
          address output
 
973
        }
 
974
        'skip$
 
975
      if$
 
976
    }
 
977
    { organization address new.block.checkb
 
978
      organization output
 
979
      address output
 
980
    }
 
981
  if$
 
982
  format.edition output
 
983
  format.date output
 
984
  new.block
 
985
  format.eprint output
 
986
  new.block
 
987
  format.url output
 
988
  new.block
 
989
  note output
 
990
  fin.entry
 
991
}
 
992
 
 
993
FUNCTION {mastersthesis}
 
994
{ output.bibitem
 
995
  format.authors "author" output.check
 
996
  format.title "title" output.check
 
997
  blank.sep
 
998
  "Master's thesis" format.thesis.type output.nonnull
 
999
  school "school" output.check
 
1000
  address output
 
1001
  format.date "year" output.check
 
1002
  new.block
 
1003
  format.url output
 
1004
  new.block
 
1005
  note output
 
1006
  fin.entry
 
1007
}
 
1008
 
 
1009
FUNCTION {misc}
 
1010
{ output.bibitem
 
1011
  format.collaboration output
 
1012
  format.authors output
 
1013
  title empty$
 
1014
    { howpublished new.sentence.checka }
 
1015
    { howpublished empty$ not
 
1016
      month empty$ year empty$ and
 
1017
      or
 
1018
        { format.title.p output.nonnull }
 
1019
        { format.title output.nonnull }
 
1020
      if$
 
1021
      blank.sep
 
1022
    }
 
1023
  if$
 
1024
  howpublished capitalize output
 
1025
  format.date output
 
1026
  new.block
 
1027
  format.url output
 
1028
  new.sentence
 
1029
  note output
 
1030
  new.sentence
 
1031
  fin.entry
 
1032
  empty.misc.check
 
1033
}
 
1034
 
 
1035
FUNCTION {phdthesis}
 
1036
{ output.bibitem
 
1037
  format.authors "author" output.check
 
1038
  format.btitle "title" output.check
 
1039
  new.block
 
1040
  "PhD thesis" format.thesis.type output.nonnull
 
1041
  school "school" output.check
 
1042
  address output
 
1043
  format.date "year" output.check
 
1044
  new.block
 
1045
  format.eprint output
 
1046
  new.block
 
1047
  format.url output
 
1048
  new.block
 
1049
  note output
 
1050
  new.sentence
 
1051
  format.SLACcitation output
 
1052
  fin.entry
 
1053
}
 
1054
 
 
1055
FUNCTION {proceedings}
 
1056
{ output.bibitem
 
1057
  editor empty$
 
1058
    { organization output }
 
1059
    { format.editors output.nonnull }
 
1060
  if$
 
1061
  format.btitle "title" output.check
 
1062
  format.bvolume output
 
1063
  format.number.series output
 
1064
  editor empty$
 
1065
    'skip$
 
1066
    { organization output }
 
1067
  if$
 
1068
  new.block
 
1069
  publisher output
 
1070
  address output
 
1071
  format.date "year" output.check
 
1072
  new.block
 
1073
  format.eprint output
 
1074
  new.block
 
1075
  format.url output
 
1076
  new.block
 
1077
  note output
 
1078
  new.sentence
 
1079
  format.SLACcitation output
 
1080
  fin.entry
 
1081
}
 
1082
 
 
1083
FUNCTION {techreport}
 
1084
{ output.bibitem
 
1085
  format.collaboration output
 
1086
  format.authors "author" output.check
 
1087
  format.title "title" output.check
 
1088
  blank.sep
 
1089
  format.tr.number output.nonnull
 
1090
  institution "institution" output.check
 
1091
  address output
 
1092
  format.date "year" output.check
 
1093
  new.block
 
1094
  format.eprint output
 
1095
  new.block
 
1096
  format.url output
 
1097
  new.block
 
1098
  note output
 
1099
  fin.entry
 
1100
}
 
1101
 
 
1102
FUNCTION {unpublished}
 
1103
{ output.bibitem
 
1104
  format.collaboration output
 
1105
  format.authors "author" output.check
 
1106
  format.title.p "title" output.check
 
1107
  blank.sep
 
1108
  note "note" output.check
 
1109
  format.date output
 
1110
  new.sentence
 
1111
  format.SLACcitation output
 
1112
  fin.entry
 
1113
}
 
1114
 
 
1115
FUNCTION {default.type} { misc }
 
1116
 
 
1117
MACRO {jan} {"Jan."}
 
1118
 
 
1119
MACRO {feb} {"Feb."}
 
1120
 
 
1121
MACRO {mar} {"Mar."}
 
1122
 
 
1123
MACRO {apr} {"Apr."}
 
1124
 
 
1125
MACRO {may} {"May"}
 
1126
 
 
1127
MACRO {jun} {"June"}
 
1128
 
 
1129
MACRO {jul} {"July"}
 
1130
 
 
1131
MACRO {aug} {"Aug."}
 
1132
 
 
1133
MACRO {sep} {"Sept."}
 
1134
 
 
1135
MACRO {oct} {"Oct."}
 
1136
 
 
1137
MACRO {nov} {"Nov."}
 
1138
 
 
1139
MACRO {dec} {"Dec."}
 
1140
 
 
1141
MACRO {nup} {"Nucl. Phys."}
 
1142
 
 
1143
MACRO {cmp} {"Comm. Math. Phys."}
 
1144
 
 
1145
MACRO {prl} {"Phys. Rev. Lett."}
 
1146
 
 
1147
MACRO {pl} {"Phys. Lett."}
 
1148
 
 
1149
MACRO {rmp} {"Rev. Mod. Phys."}
 
1150
 
 
1151
MACRO {ijmp} {"Int. Jour. Mod. Phys."}
 
1152
 
 
1153
MACRO {mpl} {"Mod. Phys. Lett."}
 
1154
 
 
1155
MACRO {pr} {"Phys. Rev."}
 
1156
 
 
1157
MACRO {arXiv}     {"http://arxiv.org/abs"}
 
1158
MACRO {cogprints} {"http://cogprints.org"}
 
1159
MACRO {pubmed}    {"http://www.ncbi.nlm.nih.gov/pubmed"}
 
1160
 
 
1161
READ
 
1162
 
 
1163
STRINGS { longest.label }
 
1164
 
 
1165
INTEGERS { number.label longest.label.width }
 
1166
 
 
1167
FUNCTION {initialize.longest.label}
 
1168
{ "" 'longest.label :=
 
1169
  #1 'number.label :=
 
1170
  #0 'longest.label.width :=
 
1171
}
 
1172
 
 
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 :=
 
1179
    }
 
1180
    'skip$
 
1181
  if$
 
1182
}
 
1183
 
 
1184
EXECUTE {initialize.longest.label}
 
1185
 
 
1186
ITERATE {longest.label.pass}
 
1187
 
 
1188
FUNCTION {begin.bib}
 
1189
{ preamble$ empty$
 
1190
    'skip$
 
1191
    { preamble$ write$ newline$ }
 
1192
  if$
 
1193
  "\providecommand{\href}[2]{#2}"
 
1194
  "\begingroup\raggedright\begin{thebibliography}{" * longest.label  * 
 
1195
  "}" * write$ newline$ }
 
1196
 
 
1197
EXECUTE {begin.bib}
 
1198
 
 
1199
EXECUTE {init.state.consts}
 
1200
 
 
1201
ITERATE {call.type$}
 
1202
 
 
1203
FUNCTION {end.bib}
 
1204
{ newline$
 
1205
  "\end{thebibliography}\endgroup" write$ newline$
 
1206
}
 
1207
 
 
1208
EXECUTE {end.bib}