~ubuntu-branches/ubuntu/raring/ess/raring-proposed

« back to all changes in this revision

Viewing changes to doc/techrep/abbrvnat.bst

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2012-05-09 08:00:38 UTC
  • mfrom: (1.2.23)
  • Revision ID: package-import@ubuntu.com-20120509080038-7an3nhbtgaj02a17
Tags: 12.04-1-1
New upstream patch version released today

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%% File: `abbrvnat.bst'
2
 
%% A modification of `abbrv.bst' for use with natbib package 
3
 
%%
4
 
%% Copyright 1993-1999 Patrick W Daly
5
 
%% Max-Planck-Institut f\"ur Aeronomie
6
 
%% Max-Planck-Str. 2
7
 
%% D-37191 Katlenburg-Lindau
8
 
%% Germany
9
 
%% E-mail: daly@linmpi.mpg.de
10
 
%%
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.
15
 
%%
16
 
 % Version and source file information:
17
 
 % \ProvidesFile{natbst.mbs}[1999/05/11 1.6 (PWD)]
18
 
 %
19
 
 % BibTeX `plainnat' family
20
 
 %   version 0.99b for BibTeX versions 0.99a or later,
21
 
 %   for LaTeX versions 2.09 and 2e.
22
 
 %
23
 
 % For use with the `natbib.sty' package; emulates the corresponding
24
 
 %   member of the `plain' family, but with author-year citations.
25
 
 %
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.
29
 
 %
30
 
 % For version 7.0 of `natbib.sty', the KEY field replaces missing
31
 
 %   authors/editors, and the date is left blank in \bibitem.
32
 
 %
33
 
 % Includes fields ISBN and ISSN.
34
 
 %
35
 
 % Includes field URL for Internet addresses (best used with
36
 
 % with the url.sty package of Donald Arseneau
37
 
 %
38
 
ENTRY
39
 
  { address
40
 
    author
41
 
    booktitle
42
 
    chapter
43
 
    edition
44
 
    editor
45
 
    howpublished
46
 
    institution
47
 
    isbn
48
 
    issn
49
 
    journal
50
 
    key
51
 
    month
52
 
    note
53
 
    number
54
 
    organization
55
 
    pages
56
 
    publisher
57
 
    school
58
 
    series
59
 
    title
60
 
    type
61
 
    url
62
 
    volume
63
 
    year
64
 
  }
65
 
  {}
66
 
  { label extra.label sort.label short.list }
67
 
 
68
 
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
69
 
 
70
 
FUNCTION {init.state.consts}
71
 
{ #0 'before.all :=
72
 
  #1 'mid.sentence :=
73
 
  #2 'after.sentence :=
74
 
  #3 'after.block :=
75
 
}
76
 
 
77
 
STRINGS { s t }
78
 
 
79
 
FUNCTION {output.nonnull}
80
 
{ 's :=
81
 
  output.state mid.sentence =
82
 
    { ", " * write$ }
83
 
    { output.state after.block =
84
 
        { add.period$ write$
85
 
          newline$
86
 
          "\newblock " write$
87
 
        }
88
 
        { output.state before.all =
89
 
            'write$
90
 
            { add.period$ " " * write$ }
91
 
          if$
92
 
        }
93
 
      if$
94
 
      mid.sentence 'output.state :=
95
 
    }
96
 
  if$
97
 
  s
98
 
}
99
 
 
100
 
FUNCTION {output}
101
 
{ duplicate$ empty$
102
 
    'pop$
103
 
    'output.nonnull
104
 
  if$
105
 
}
106
 
 
107
 
FUNCTION {output.check}
108
 
{ 't :=
109
 
  duplicate$ empty$
110
 
    { pop$ "empty " t * " in " * cite$ * warning$ }
111
 
    'output.nonnull
112
 
  if$
113
 
}
114
 
 
115
 
FUNCTION {fin.entry}
116
 
{ add.period$
117
 
  write$
118
 
  newline$
119
 
}
120
 
 
121
 
FUNCTION {new.block}
122
 
{ output.state before.all =
123
 
    'skip$
124
 
    { after.block 'output.state := }
125
 
  if$
126
 
}
127
 
 
128
 
FUNCTION {new.sentence}
129
 
{ output.state after.block =
130
 
    'skip$
131
 
    { output.state before.all =
132
 
        'skip$
133
 
        { after.sentence 'output.state := }
134
 
      if$
135
 
    }
136
 
  if$
137
 
}
138
 
 
139
 
FUNCTION {not}
140
 
{   { #0 }
141
 
    { #1 }
142
 
  if$
143
 
}
144
 
 
145
 
FUNCTION {and}
146
 
{   'skip$
147
 
    { pop$ #0 }
148
 
  if$
149
 
}
150
 
 
151
 
FUNCTION {or}
152
 
{   { pop$ #1 }
153
 
    'skip$
154
 
  if$
155
 
}
156
 
 
157
 
FUNCTION {new.block.checka}
158
 
{ empty$
159
 
    'skip$
160
 
    'new.block
161
 
  if$
162
 
}
163
 
 
164
 
FUNCTION {new.block.checkb}
165
 
{ empty$
166
 
  swap$ empty$
167
 
  and
168
 
    'skip$
169
 
    'new.block
170
 
  if$
171
 
}
172
 
 
173
 
FUNCTION {new.sentence.checka}
174
 
{ empty$
175
 
    'skip$
176
 
    'new.sentence
177
 
  if$
178
 
}
179
 
 
180
 
FUNCTION {new.sentence.checkb}
181
 
{ empty$
182
 
  swap$ empty$
183
 
  and
184
 
    'skip$
185
 
    'new.sentence
186
 
  if$
187
 
}
188
 
 
189
 
FUNCTION {field.or.null}
190
 
{ duplicate$ empty$
191
 
    { pop$ "" }
192
 
    'skip$
193
 
  if$
194
 
}
195
 
 
196
 
FUNCTION {emphasize}
197
 
{ duplicate$ empty$
198
 
    { pop$ "" }
199
 
    { "{\em " swap$ * "}" * }
200
 
  if$
201
 
}
202
 
 
203
 
INTEGERS { nameptr namesleft numnames }
204
 
 
205
 
FUNCTION {format.names}
206
 
{ 's :=
207
 
  #1 'nameptr :=
208
 
  s num.names$ 'numnames :=
209
 
  numnames 'namesleft :=
210
 
    { namesleft #0 > }
211
 
    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
212
 
      nameptr #1 >
213
 
        { namesleft #1 >
214
 
            { ", " * t * }
215
 
            { numnames #2 >
216
 
                { "," * }
217
 
                'skip$
218
 
              if$
219
 
              t "others" =
220
 
                { " et~al." * }
221
 
                { " and " * t * }
222
 
              if$
223
 
            }
224
 
          if$
225
 
        }
226
 
        't
227
 
      if$
228
 
      nameptr #1 + 'nameptr :=
229
 
      namesleft #1 - 'namesleft :=
230
 
    }
231
 
  while$
232
 
}
233
 
 
234
 
FUNCTION {format.key}
235
 
{ empty$
236
 
    { key field.or.null }
237
 
    { "" }
238
 
  if$
239
 
}
240
 
 
241
 
FUNCTION {format.authors}
242
 
{ author empty$
243
 
    { "" }
244
 
    { author format.names }
245
 
  if$
246
 
}
247
 
 
248
 
FUNCTION {format.editors}
249
 
{ editor empty$
250
 
    { "" }
251
 
    { editor format.names
252
 
      editor num.names$ #1 >
253
 
        { ", editors" * }
254
 
        { ", editor" * }
255
 
      if$
256
 
    }
257
 
  if$
258
 
}
259
 
 
260
 
FUNCTION {format.isbn}
261
 
{ isbn empty$
262
 
    { "" }
263
 
    { new.block "ISBN " isbn * }
264
 
  if$
265
 
}
266
 
 
267
 
FUNCTION {format.issn}
268
 
{ issn empty$
269
 
    { "" }
270
 
    { new.block "ISSN " issn * }
271
 
  if$
272
 
}
273
 
 
274
 
FUNCTION {format.url}
275
 
{ url empty$
276
 
    { "" }
277
 
    { new.block "URL \url{" url * "}" * }
278
 
  if$
279
 
}
280
 
 
281
 
FUNCTION {format.title}
282
 
{ title empty$
283
 
    { "" }
284
 
    { title "t" change.case$ }
285
 
  if$
286
 
}
287
 
 
288
 
FUNCTION {format.full.names}
289
 
{'s :=
290
 
  #1 'nameptr :=
291
 
  s num.names$ 'numnames :=
292
 
  numnames 'namesleft :=
293
 
    { namesleft #0 > }
294
 
    { s nameptr
295
 
      "{vv~}{ll}" format.name$ 't :=
296
 
      nameptr #1 >
297
 
        {
298
 
          namesleft #1 >
299
 
            { ", " * t * }
300
 
            {
301
 
              numnames #2 >
302
 
                { "," * }
303
 
                'skip$
304
 
              if$
305
 
              t "others" =
306
 
                { " 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 {author.editor.full}
321
 
{ author empty$
322
 
    { editor empty$
323
 
        { "" }
324
 
        { editor format.full.names }
325
 
      if$
326
 
    }
327
 
    { author format.full.names }
328
 
  if$
329
 
}
330
 
 
331
 
FUNCTION {author.full}
332
 
{ author empty$
333
 
    { "" }
334
 
    { author format.full.names }
335
 
  if$
336
 
}
337
 
 
338
 
FUNCTION {editor.full}
339
 
{ editor empty$
340
 
    { "" }
341
 
    { editor format.full.names }
342
 
  if$
343
 
}
344
 
 
345
 
FUNCTION {make.full.names}
346
 
{ type$ "book" =
347
 
  type$ "inbook" =
348
 
  or
349
 
    'author.editor.full
350
 
    { type$ "proceedings" =
351
 
        'editor.full
352
 
        'author.full
353
 
      if$
354
 
    }
355
 
  if$
356
 
}
357
 
 
358
 
FUNCTION {output.bibitem}
359
 
{ newline$
360
 
  "\bibitem[" write$
361
 
  label write$
362
 
  ")" make.full.names duplicate$ short.list =
363
 
     { pop$ }
364
 
     { * }
365
 
   if$
366
 
  "]{" * write$
367
 
  cite$ write$
368
 
  "}" write$
369
 
  newline$
370
 
  ""
371
 
  before.all 'output.state :=
372
 
}
373
 
 
374
 
FUNCTION {n.dashify}
375
 
{ 't :=
376
 
  ""
377
 
    { t empty$ not }
378
 
    { t #1 #1 substring$ "-" =
379
 
        { t #1 #2 substring$ "--" = not
380
 
            { "--" *
381
 
              t #2 global.max$ substring$ 't :=
382
 
            }
383
 
            {   { t #1 #1 substring$ "-" = }
384
 
                { "-" *
385
 
                  t #2 global.max$ substring$ 't :=
386
 
                }
387
 
              while$
388
 
            }
389
 
          if$
390
 
        }
391
 
        { t #1 #1 substring$ *
392
 
          t #2 global.max$ substring$ 't :=
393
 
        }
394
 
      if$
395
 
    }
396
 
  while$
397
 
}
398
 
 
399
 
FUNCTION {format.date}
400
 
{ year duplicate$ empty$
401
 
    { "empty year in " cite$ * warning$
402
 
       pop$ "" }
403
 
    'skip$
404
 
  if$
405
 
  month empty$
406
 
    'skip$
407
 
    { month
408
 
      " " * swap$ *
409
 
    }
410
 
  if$
411
 
  extra.label *
412
 
}
413
 
 
414
 
FUNCTION {format.btitle}
415
 
{ title emphasize
416
 
}
417
 
 
418
 
FUNCTION {tie.or.space.connect}
419
 
{ duplicate$ text.length$ #3 <
420
 
    { "~" }
421
 
    { " " }
422
 
  if$
423
 
  swap$ * *
424
 
}
425
 
 
426
 
FUNCTION {either.or.check}
427
 
{ empty$
428
 
    'pop$
429
 
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
430
 
  if$
431
 
}
432
 
 
433
 
FUNCTION {format.bvolume}
434
 
{ volume empty$
435
 
    { "" }
436
 
    { "volume" volume tie.or.space.connect
437
 
      series empty$
438
 
        'skip$
439
 
        { " of " * series emphasize * }
440
 
      if$
441
 
      "volume and number" number either.or.check
442
 
    }
443
 
  if$
444
 
}
445
 
 
446
 
FUNCTION {format.number.series}
447
 
{ volume empty$
448
 
    { number empty$
449
 
        { series field.or.null }
450
 
        { output.state mid.sentence =
451
 
            { "number" }
452
 
            { "Number" }
453
 
          if$
454
 
          number tie.or.space.connect
455
 
          series empty$
456
 
            { "there's a number but no series in " cite$ * warning$ }
457
 
            { " in " * series * }
458
 
          if$
459
 
        }
460
 
      if$
461
 
    }
462
 
    { "" }
463
 
  if$
464
 
}
465
 
 
466
 
FUNCTION {format.edition}
467
 
{ edition empty$
468
 
    { "" }
469
 
    { output.state mid.sentence =
470
 
        { edition "l" change.case$ " edition" * }
471
 
        { edition "t" change.case$ " edition" * }
472
 
      if$
473
 
    }
474
 
  if$
475
 
}
476
 
 
477
 
INTEGERS { multiresult }
478
 
 
479
 
FUNCTION {multi.page.check}
480
 
{ 't :=
481
 
  #0 'multiresult :=
482
 
    { multiresult not
483
 
      t empty$ not
484
 
      and
485
 
    }
486
 
    { t #1 #1 substring$
487
 
      duplicate$ "-" =
488
 
      swap$ duplicate$ "," =
489
 
      swap$ "+" =
490
 
      or or
491
 
        { #1 'multiresult := }
492
 
        { t #2 global.max$ substring$ 't := }
493
 
      if$
494
 
    }
495
 
  while$
496
 
  multiresult
497
 
}
498
 
 
499
 
FUNCTION {format.pages}
500
 
{ pages empty$
501
 
    { "" }
502
 
    { pages multi.page.check
503
 
        { "pages" pages n.dashify tie.or.space.connect }
504
 
        { "page" pages tie.or.space.connect }
505
 
      if$
506
 
    }
507
 
  if$
508
 
}
509
 
 
510
 
FUNCTION {format.vol.num.pages}
511
 
{ volume field.or.null
512
 
  number empty$
513
 
    'skip$
514
 
    { "\penalty0 (" number * ")" * *
515
 
      volume empty$
516
 
        { "there's a number but no volume in " cite$ * warning$ }
517
 
        'skip$
518
 
      if$
519
 
    }
520
 
  if$
521
 
  pages empty$
522
 
    'skip$
523
 
    { duplicate$ empty$
524
 
        { pop$ format.pages }
525
 
        { ":\penalty0 " * pages n.dashify * }
526
 
      if$
527
 
    }
528
 
  if$
529
 
}
530
 
 
531
 
FUNCTION {format.chapter.pages}
532
 
{ chapter empty$
533
 
    'format.pages
534
 
    { type empty$
535
 
        { "chapter" }
536
 
        { type "l" change.case$ }
537
 
      if$
538
 
      chapter tie.or.space.connect
539
 
      pages empty$
540
 
        'skip$
541
 
        { ", " * format.pages * }
542
 
      if$
543
 
    }
544
 
  if$
545
 
}
546
 
 
547
 
FUNCTION {format.in.ed.booktitle}
548
 
{ booktitle empty$
549
 
    { "" }
550
 
    { editor empty$
551
 
        { "In " booktitle emphasize * }
552
 
        { "In " format.editors * ", " * booktitle emphasize * }
553
 
      if$
554
 
    }
555
 
  if$
556
 
}
557
 
 
558
 
FUNCTION {empty.misc.check}
559
 
{ author empty$ title empty$ howpublished empty$
560
 
  month empty$ year empty$ note empty$
561
 
  and and and and and
562
 
  key empty$ not and
563
 
    { "all relevant fields are empty in " cite$ * warning$ }
564
 
    'skip$
565
 
  if$
566
 
}
567
 
 
568
 
FUNCTION {format.thesis.type}
569
 
{ type empty$
570
 
    'skip$
571
 
    { pop$
572
 
      type "t" change.case$
573
 
    }
574
 
  if$
575
 
}
576
 
 
577
 
FUNCTION {format.tr.number}
578
 
{ type empty$
579
 
    { "Technical Report" }
580
 
    'type
581
 
  if$
582
 
  number empty$
583
 
    { "t" change.case$ }
584
 
    { number tie.or.space.connect }
585
 
  if$
586
 
}
587
 
 
588
 
FUNCTION {format.article.crossref}
589
 
{ key empty$
590
 
    { journal empty$
591
 
        { "need key or journal for " cite$ * " to crossref " * crossref *
592
 
          warning$
593
 
          ""
594
 
        }
595
 
        { "In {\em " journal * "\/}" * }
596
 
      if$
597
 
    }
598
 
    { "In " key * }
599
 
  if$
600
 
  " \citep{" * crossref * "}" *
601
 
}
602
 
 
603
 
FUNCTION {format.book.crossref}
604
 
{ volume empty$
605
 
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
606
 
      "In "
607
 
    }
608
 
    { "Volume" volume tie.or.space.connect
609
 
      " of " *
610
 
    }
611
 
  if$
612
 
  editor empty$
613
 
  editor field.or.null author field.or.null =
614
 
  or
615
 
    { key empty$
616
 
        { series empty$
617
 
            { "need editor, key, or series for " cite$ * " to crossref " *
618
 
              crossref * warning$
619
 
              "" *
620
 
            }
621
 
            { "{\em " * series * "\/}" * }
622
 
          if$
623
 
        }
624
 
        { key * }
625
 
      if$
626
 
    }
627
 
    'skip$
628
 
  if$
629
 
  ", \citet{" * crossref * "}" *
630
 
}
631
 
 
632
 
FUNCTION {format.incoll.inproc.crossref}
633
 
{ editor empty$
634
 
  editor field.or.null author field.or.null =
635
 
  or
636
 
    { key empty$
637
 
        { booktitle empty$
638
 
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
639
 
              crossref * warning$
640
 
              ""
641
 
            }
642
 
            { "In {\em " booktitle * "\/}" * }
643
 
          if$
644
 
        }
645
 
        { "In " key * }
646
 
      if$
647
 
    }
648
 
    { "In " }
649
 
  if$
650
 
  " \citet{" * crossref * "}" *
651
 
}
652
 
 
653
 
FUNCTION {article}
654
 
{ output.bibitem
655
 
  format.authors "author" output.check
656
 
  author format.key output
657
 
  new.block
658
 
  format.title "title" output.check
659
 
  new.block
660
 
  crossref missing$
661
 
    { journal emphasize "journal" output.check
662
 
      format.vol.num.pages output
663
 
      format.date "year" output.check
664
 
    }
665
 
    { format.article.crossref output.nonnull
666
 
      format.pages output
667
 
    }
668
 
  if$
669
 
  format.issn output
670
 
  format.url output
671
 
  new.block
672
 
  note output
673
 
  fin.entry
674
 
}
675
 
 
676
 
FUNCTION {book}
677
 
{ output.bibitem
678
 
  author empty$
679
 
    { format.editors "author and editor" output.check
680
 
      editor format.key output
681
 
    }
682
 
    { format.authors output.nonnull
683
 
      crossref missing$
684
 
        { "author and editor" editor either.or.check }
685
 
        'skip$
686
 
      if$
687
 
    }
688
 
  if$
689
 
  new.block
690
 
  format.btitle "title" output.check
691
 
  crossref missing$
692
 
    { format.bvolume output
693
 
      new.block
694
 
      format.number.series output
695
 
      new.sentence
696
 
      publisher "publisher" output.check
697
 
      address output
698
 
    }
699
 
    { new.block
700
 
      format.book.crossref output.nonnull
701
 
    }
702
 
  if$
703
 
  format.edition output
704
 
  format.date "year" output.check
705
 
  format.isbn output
706
 
  format.url output
707
 
  new.block
708
 
  note output
709
 
  fin.entry
710
 
}
711
 
 
712
 
FUNCTION {booklet}
713
 
{ output.bibitem
714
 
  format.authors output
715
 
  author format.key output
716
 
  new.block
717
 
  format.title "title" output.check
718
 
  howpublished address new.block.checkb
719
 
  howpublished output
720
 
  address output
721
 
  format.date output
722
 
  format.isbn output
723
 
  format.url output
724
 
  new.block
725
 
  note output
726
 
  fin.entry
727
 
}
728
 
 
729
 
FUNCTION {inbook}
730
 
{ output.bibitem
731
 
  author empty$
732
 
    { format.editors "author and editor" output.check
733
 
      editor format.key output
734
 
    }
735
 
    { format.authors output.nonnull
736
 
      crossref missing$
737
 
        { "author and editor" editor either.or.check }
738
 
        'skip$
739
 
      if$
740
 
    }
741
 
  if$
742
 
  new.block
743
 
  format.btitle "title" output.check
744
 
  crossref missing$
745
 
    { format.bvolume output
746
 
      format.chapter.pages "chapter and pages" output.check
747
 
      new.block
748
 
      format.number.series output
749
 
      new.sentence
750
 
      publisher "publisher" output.check
751
 
      address output
752
 
    }
753
 
    { format.chapter.pages "chapter and pages" output.check
754
 
      new.block
755
 
      format.book.crossref output.nonnull
756
 
    }
757
 
  if$
758
 
  format.edition output
759
 
  format.date "year" output.check
760
 
  format.isbn output
761
 
  format.url output
762
 
  new.block
763
 
  note output
764
 
  fin.entry
765
 
}
766
 
 
767
 
FUNCTION {incollection}
768
 
{ output.bibitem
769
 
  format.authors "author" output.check
770
 
  author format.key output
771
 
  new.block
772
 
  format.title "title" output.check
773
 
  new.block
774
 
  crossref missing$
775
 
    { format.in.ed.booktitle "booktitle" output.check
776
 
      format.bvolume output
777
 
      format.number.series output
778
 
      format.chapter.pages output
779
 
      new.sentence
780
 
      publisher "publisher" output.check
781
 
      address output
782
 
      format.edition output
783
 
      format.date "year" output.check
784
 
    }
785
 
    { format.incoll.inproc.crossref output.nonnull
786
 
      format.chapter.pages output
787
 
    }
788
 
  if$
789
 
  format.isbn output
790
 
  format.url output
791
 
  new.block
792
 
  note output
793
 
  fin.entry
794
 
}
795
 
 
796
 
FUNCTION {inproceedings}
797
 
{ output.bibitem
798
 
  format.authors "author" output.check
799
 
  author format.key output
800
 
  new.block
801
 
  format.title "title" output.check
802
 
  new.block
803
 
  crossref missing$
804
 
    { format.in.ed.booktitle "booktitle" output.check
805
 
      format.bvolume output
806
 
      format.number.series output
807
 
      format.pages output
808
 
      address empty$
809
 
        { organization publisher new.sentence.checkb
810
 
          organization output
811
 
          publisher output
812
 
          format.date "year" output.check
813
 
        }
814
 
        { address output.nonnull
815
 
          format.date "year" output.check
816
 
          new.sentence
817
 
          organization output
818
 
          publisher output
819
 
        }
820
 
      if$
821
 
    }
822
 
    { format.incoll.inproc.crossref output.nonnull
823
 
      format.pages output
824
 
    }
825
 
  if$
826
 
  format.isbn output
827
 
  format.url output
828
 
  new.block
829
 
  note output
830
 
  fin.entry
831
 
}
832
 
 
833
 
FUNCTION {conference} { inproceedings }
834
 
 
835
 
FUNCTION {manual}
836
 
{ output.bibitem
837
 
  format.authors output
838
 
  author format.key output
839
 
  new.block
840
 
  format.btitle "title" output.check
841
 
  organization address new.block.checkb
842
 
  organization output
843
 
  address output
844
 
  format.edition output
845
 
  format.date output
846
 
  format.url output
847
 
  new.block
848
 
  note output
849
 
  fin.entry
850
 
}
851
 
 
852
 
FUNCTION {mastersthesis}
853
 
{ output.bibitem
854
 
  format.authors "author" output.check
855
 
  author format.key output
856
 
  new.block
857
 
  format.title "title" output.check
858
 
  new.block
859
 
  "Master's thesis" format.thesis.type output.nonnull
860
 
  school "school" output.check
861
 
  address output
862
 
  format.date "year" output.check
863
 
  format.url output
864
 
  new.block
865
 
  note output
866
 
  fin.entry
867
 
}
868
 
 
869
 
FUNCTION {misc}
870
 
{ output.bibitem
871
 
  format.authors output
872
 
  author format.key output
873
 
  title howpublished new.block.checkb
874
 
  format.title output
875
 
  howpublished new.block.checka
876
 
  howpublished output
877
 
  format.date output
878
 
  format.issn output
879
 
  format.url output
880
 
  new.block
881
 
  note output
882
 
  fin.entry
883
 
  empty.misc.check
884
 
}
885
 
 
886
 
FUNCTION {phdthesis}
887
 
{ output.bibitem
888
 
  format.authors "author" output.check
889
 
  author format.key output
890
 
  new.block
891
 
  format.btitle "title" output.check
892
 
  new.block
893
 
  "PhD thesis" format.thesis.type output.nonnull
894
 
  school "school" output.check
895
 
  address output
896
 
  format.date "year" output.check
897
 
  format.url output
898
 
  new.block
899
 
  note output
900
 
  fin.entry
901
 
}
902
 
 
903
 
FUNCTION {proceedings}
904
 
{ output.bibitem
905
 
  format.editors output
906
 
  editor format.key output
907
 
  new.block
908
 
  format.btitle "title" output.check
909
 
  format.bvolume output
910
 
  format.number.series output
911
 
  address output
912
 
  format.date "year" output.check
913
 
  new.sentence
914
 
  organization output
915
 
  publisher output
916
 
  format.isbn output
917
 
  format.url output
918
 
  new.block
919
 
  note output
920
 
  fin.entry
921
 
}
922
 
 
923
 
FUNCTION {techreport}
924
 
{ output.bibitem
925
 
  format.authors "author" output.check
926
 
  author format.key output
927
 
  new.block
928
 
  format.title "title" output.check
929
 
  new.block
930
 
  format.tr.number output.nonnull
931
 
  institution "institution" output.check
932
 
  address output
933
 
  format.date "year" output.check
934
 
  format.url output
935
 
  new.block
936
 
  note output
937
 
  fin.entry
938
 
}
939
 
 
940
 
FUNCTION {unpublished}
941
 
{ output.bibitem
942
 
  format.authors "author" output.check
943
 
  author format.key output
944
 
  new.block
945
 
  format.title "title" output.check
946
 
  format.url output
947
 
  new.block
948
 
  note "note" output.check
949
 
  format.date output
950
 
  fin.entry
951
 
}
952
 
 
953
 
FUNCTION {default.type} { misc }
954
 
 
955
 
 
956
 
MACRO {jan} {"Jan."}
957
 
 
958
 
MACRO {feb} {"Feb."}
959
 
 
960
 
MACRO {mar} {"Mar."}
961
 
 
962
 
MACRO {apr} {"Apr."}
963
 
 
964
 
MACRO {may} {"May"}
965
 
 
966
 
MACRO {jun} {"June"}
967
 
 
968
 
MACRO {jul} {"July"}
969
 
 
970
 
MACRO {aug} {"Aug."}
971
 
 
972
 
MACRO {sep} {"Sept."}
973
 
 
974
 
MACRO {oct} {"Oct."}
975
 
 
976
 
MACRO {nov} {"Nov."}
977
 
 
978
 
MACRO {dec} {"Dec."}
979
 
 
980
 
 
981
 
 
982
 
MACRO {acmcs} {"ACM Comput. Surv."}
983
 
 
984
 
MACRO {acta} {"Acta Inf."}
985
 
 
986
 
MACRO {cacm} {"Commun. ACM"}
987
 
 
988
 
MACRO {ibmjrd} {"IBM J. Res. Dev."}
989
 
 
990
 
MACRO {ibmsj} {"IBM Syst.~J."}
991
 
 
992
 
MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
993
 
 
994
 
MACRO {ieeetc} {"IEEE Trans. Comput."}
995
 
 
996
 
MACRO {ieeetcad}
997
 
 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
998
 
 
999
 
MACRO {ipl} {"Inf. Process. Lett."}
1000
 
 
1001
 
MACRO {jacm} {"J.~ACM"}
1002
 
 
1003
 
MACRO {jcss} {"J.~Comput. Syst. Sci."}
1004
 
 
1005
 
MACRO {scp} {"Sci. Comput. Programming"}
1006
 
 
1007
 
MACRO {sicomp} {"SIAM J. Comput."}
1008
 
 
1009
 
MACRO {tocs} {"ACM Trans. Comput. Syst."}
1010
 
 
1011
 
MACRO {tods} {"ACM Trans. Database Syst."}
1012
 
 
1013
 
MACRO {tog} {"ACM Trans. Gr."}
1014
 
 
1015
 
MACRO {toms} {"ACM Trans. Math. Softw."}
1016
 
 
1017
 
MACRO {toois} {"ACM Trans. Office Inf. Syst."}
1018
 
 
1019
 
MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
1020
 
 
1021
 
MACRO {tcs} {"Theoretical Comput. Sci."}
1022
 
 
1023
 
 
1024
 
READ
1025
 
 
1026
 
FUNCTION {sortify}
1027
 
{ purify$
1028
 
  "l" change.case$
1029
 
}
1030
 
 
1031
 
INTEGERS { len }
1032
 
 
1033
 
FUNCTION {chop.word}
1034
 
{ 's :=
1035
 
  'len :=
1036
 
  s #1 len substring$ =
1037
 
    { s len #1 + global.max$ substring$ }
1038
 
    's
1039
 
  if$
1040
 
}
1041
 
 
1042
 
FUNCTION {format.lab.names}
1043
 
{ 's :=
1044
 
  s #1 "{vv~}{ll}" format.name$
1045
 
  s num.names$ duplicate$
1046
 
  #2 >
1047
 
    { pop$ " et~al." * }
1048
 
    { #2 <
1049
 
        'skip$
1050
 
        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1051
 
            { " et~al." * }
1052
 
            { " and " * s #2 "{vv~}{ll}" format.name$ * }
1053
 
          if$
1054
 
        }
1055
 
      if$
1056
 
    }
1057
 
  if$
1058
 
}
1059
 
 
1060
 
FUNCTION {author.key.label}
1061
 
{ author empty$
1062
 
    { key empty$
1063
 
        { cite$ #1 #3 substring$ }
1064
 
        'key
1065
 
      if$
1066
 
    }
1067
 
    { author format.lab.names }
1068
 
  if$
1069
 
}
1070
 
 
1071
 
FUNCTION {author.editor.key.label}
1072
 
{ author empty$
1073
 
    { editor empty$
1074
 
        { key empty$
1075
 
            { cite$ #1 #3 substring$ }
1076
 
            'key
1077
 
          if$
1078
 
        }
1079
 
        { editor format.lab.names }
1080
 
      if$
1081
 
    }
1082
 
    { author format.lab.names }
1083
 
  if$
1084
 
}
1085
 
 
1086
 
FUNCTION {author.key.organization.label}
1087
 
{ author empty$
1088
 
    { key empty$
1089
 
        { organization empty$
1090
 
            { cite$ #1 #3 substring$ }
1091
 
            { "The " #4 organization chop.word #3 text.prefix$ }
1092
 
          if$
1093
 
        }
1094
 
        'key
1095
 
      if$
1096
 
    }
1097
 
    { author format.lab.names }
1098
 
  if$
1099
 
}
1100
 
 
1101
 
FUNCTION {editor.key.organization.label}
1102
 
{ editor empty$
1103
 
    { key empty$
1104
 
        { organization empty$
1105
 
            { cite$ #1 #3 substring$ }
1106
 
            { "The " #4 organization chop.word #3 text.prefix$ }
1107
 
          if$
1108
 
        }
1109
 
        'key
1110
 
      if$
1111
 
    }
1112
 
    { editor format.lab.names }
1113
 
  if$
1114
 
}
1115
 
 
1116
 
FUNCTION {calc.short.authors}
1117
 
{ type$ "book" =
1118
 
  type$ "inbook" =
1119
 
  or
1120
 
    'author.editor.key.label
1121
 
    { type$ "proceedings" =
1122
 
        'editor.key.organization.label
1123
 
        { type$ "manual" =
1124
 
            'author.key.organization.label
1125
 
            'author.key.label
1126
 
          if$
1127
 
        }
1128
 
      if$
1129
 
    }
1130
 
  if$
1131
 
  'short.list :=
1132
 
}
1133
 
 
1134
 
FUNCTION {calc.label}
1135
 
{ calc.short.authors
1136
 
  short.list
1137
 
  "("
1138
 
  *
1139
 
  year duplicate$ empty$
1140
 
  short.list key field.or.null = or
1141
 
     { pop$ "" }
1142
 
     'skip$
1143
 
  if$
1144
 
  *
1145
 
  'label :=
1146
 
}
1147
 
 
1148
 
FUNCTION {sort.format.names}
1149
 
{ 's :=
1150
 
  #1 'nameptr :=
1151
 
  ""
1152
 
  s num.names$ 'numnames :=
1153
 
  numnames 'namesleft :=
1154
 
    { namesleft #0 > }
1155
 
    { nameptr #1 >
1156
 
        { "   " * }
1157
 
        'skip$
1158
 
      if$
1159
 
      s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
1160
 
      nameptr numnames = t "others" = and
1161
 
        { "et al" * }
1162
 
        { t sortify * }
1163
 
      if$
1164
 
      nameptr #1 + 'nameptr :=
1165
 
      namesleft #1 - 'namesleft :=
1166
 
    }
1167
 
  while$
1168
 
}
1169
 
 
1170
 
FUNCTION {sort.format.title}
1171
 
{ 't :=
1172
 
  "A " #2
1173
 
    "An " #3
1174
 
      "The " #4 t chop.word
1175
 
    chop.word
1176
 
  chop.word
1177
 
  sortify
1178
 
  #1 global.max$ substring$
1179
 
}
1180
 
 
1181
 
FUNCTION {author.sort}
1182
 
{ author empty$
1183
 
    { key empty$
1184
 
        { "to sort, need author or key in " cite$ * warning$
1185
 
          ""
1186
 
        }
1187
 
        { key sortify }
1188
 
      if$
1189
 
    }
1190
 
    { author sort.format.names }
1191
 
  if$
1192
 
}
1193
 
 
1194
 
FUNCTION {author.editor.sort}
1195
 
{ author empty$
1196
 
    { editor empty$
1197
 
        { key empty$
1198
 
            { "to sort, need author, editor, or key in " cite$ * warning$
1199
 
              ""
1200
 
            }
1201
 
            { key sortify }
1202
 
          if$
1203
 
        }
1204
 
        { editor sort.format.names }
1205
 
      if$
1206
 
    }
1207
 
    { author sort.format.names }
1208
 
  if$
1209
 
}
1210
 
 
1211
 
FUNCTION {author.organization.sort}
1212
 
{ author empty$
1213
 
    { organization empty$
1214
 
        { key empty$
1215
 
            { "to sort, need author, organization, or key in " cite$ * warning$
1216
 
              ""
1217
 
            }
1218
 
            { key sortify }
1219
 
          if$
1220
 
        }
1221
 
        { "The " #4 organization chop.word sortify }
1222
 
      if$
1223
 
    }
1224
 
    { author sort.format.names }
1225
 
  if$
1226
 
}
1227
 
 
1228
 
FUNCTION {editor.organization.sort}
1229
 
{ editor empty$
1230
 
    { organization empty$
1231
 
        { key empty$
1232
 
            { "to sort, need editor, organization, or key in " cite$ * warning$
1233
 
              ""
1234
 
            }
1235
 
            { key sortify }
1236
 
          if$
1237
 
        }
1238
 
        { "The " #4 organization chop.word sortify }
1239
 
      if$
1240
 
    }
1241
 
    { editor sort.format.names }
1242
 
  if$
1243
 
}
1244
 
 
1245
 
FUNCTION {presort}
1246
 
{ calc.label
1247
 
  label sortify
1248
 
  "    "
1249
 
  *
1250
 
  type$ "book" =
1251
 
  type$ "inbook" =
1252
 
  or
1253
 
    'author.editor.sort
1254
 
    { type$ "proceedings" =
1255
 
        'editor.organization.sort
1256
 
        { type$ "manual" =
1257
 
            'author.organization.sort
1258
 
            'author.sort
1259
 
          if$
1260
 
        }
1261
 
      if$
1262
 
    }
1263
 
  if$
1264
 
  "    "
1265
 
  *
1266
 
  year field.or.null sortify
1267
 
  *
1268
 
  "    "
1269
 
  *
1270
 
  title field.or.null
1271
 
  sort.format.title
1272
 
  *
1273
 
  #1 entry.max$ substring$
1274
 
  'sort.label :=
1275
 
  sort.label *
1276
 
  #1 entry.max$ substring$
1277
 
  'sort.key$ :=
1278
 
}
1279
 
 
1280
 
ITERATE {presort}
1281
 
 
1282
 
SORT
1283
 
 
1284
 
STRINGS { longest.label last.label next.extra }
1285
 
 
1286
 
INTEGERS { longest.label.width last.extra.num number.label }
1287
 
 
1288
 
FUNCTION {initialize.longest.label}
1289
 
{ "" 'longest.label :=
1290
 
  #0 int.to.chr$ 'last.label :=
1291
 
  "" 'next.extra :=
1292
 
  #0 'longest.label.width :=
1293
 
  #0 'last.extra.num :=
1294
 
  #0 'number.label :=
1295
 
}
1296
 
 
1297
 
FUNCTION {forward.pass}
1298
 
{ last.label label =
1299
 
    { last.extra.num #1 + 'last.extra.num :=
1300
 
      last.extra.num int.to.chr$ 'extra.label :=
1301
 
    }
1302
 
    { "a" chr.to.int$ 'last.extra.num :=
1303
 
      "" 'extra.label :=
1304
 
      label 'last.label :=
1305
 
    }
1306
 
  if$
1307
 
  number.label #1 + 'number.label :=
1308
 
}
1309
 
 
1310
 
FUNCTION {reverse.pass}
1311
 
{ next.extra "b" =
1312
 
    { "a" 'extra.label := }
1313
 
    'skip$
1314
 
  if$
1315
 
  extra.label 'next.extra :=
1316
 
  extra.label
1317
 
  duplicate$ empty$
1318
 
    'skip$
1319
 
    { "{\natexlab{" swap$ * "}}" * }
1320
 
  if$
1321
 
  'extra.label :=
1322
 
  label extra.label * 'label :=
1323
 
}
1324
 
 
1325
 
EXECUTE {initialize.longest.label}
1326
 
 
1327
 
ITERATE {forward.pass}
1328
 
 
1329
 
REVERSE {reverse.pass}
1330
 
 
1331
 
FUNCTION {bib.sort.order}
1332
 
{ sort.label  'sort.key$ :=
1333
 
}
1334
 
 
1335
 
ITERATE {bib.sort.order}
1336
 
 
1337
 
SORT
1338
 
 
1339
 
FUNCTION {begin.bib}
1340
 
{   preamble$ empty$
1341
 
    'skip$
1342
 
    { preamble$ write$ newline$ }
1343
 
  if$
1344
 
  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1345
 
  write$ newline$
1346
 
  "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
1347
 
  write$ newline$
1348
 
  "\expandafter\ifx\csname url\endcsname\relax" write$ newline$
1349
 
  "  \def\url#1{{\tt #1}}\fi" write$ newline$
1350
 
}
1351
 
 
1352
 
EXECUTE {begin.bib}
1353
 
 
1354
 
EXECUTE {init.state.consts}
1355
 
 
1356
 
ITERATE {call.type$}
1357
 
 
1358
 
FUNCTION {end.bib}
1359
 
{ newline$
1360
 
  "\end{thebibliography}" write$ newline$
1361
 
}
1362
 
 
1363
 
EXECUTE {end.bib}