OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [doc/] [informe-tesis/] [template/] [Sothampton_University/] [bibtex/] [bst/] [ecsdocs/] [ecs.bst] - Blame information for rev 214

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.