elsarticle/elsarticle-harv.bst
author Madarasi Peter
Wed, 30 Nov 2016 16:52:36 +0100
changeset 22 1a4874982d84
permissions -rw-r--r--
outline, fine tune
alpar@0
     1
%% 
alpar@0
     2
%% Copyright 2007, 2008, 2009 Elsevier Ltd
alpar@0
     3
%% 
alpar@0
     4
%% This file is part of the 'Elsarticle Bundle'.
alpar@0
     5
%% ---------------------------------------------
alpar@0
     6
%% 
alpar@0
     7
%% It may be distributed under the conditions of the LaTeX Project Public
alpar@0
     8
%% License, either version 1.2 of this license or (at your option) any
alpar@0
     9
%% later version.  The latest version of this license is in
alpar@0
    10
%%    http://www.latex-project.org/lppl.txt
alpar@0
    11
%% and version 1.2 or later is part of all distributions of LaTeX
alpar@0
    12
%% version 1999/12/01 or later.
alpar@0
    13
%% 
alpar@0
    14
%% The list of all files belonging to the 'Elsarticle Bundle' is
alpar@0
    15
%% given in the file `manifest.txt'.
alpar@0
    16
%% 
alpar@0
    17
alpar@0
    18
 %%-------------------------------------------------------------------
alpar@0
    19
 %% This bibliography style file is intended for texts in ENGLISH
alpar@0
    20
 %% This is an author-year citation style bibliography. As such, it is
alpar@0
    21
 %% non-standard LaTeX, and requires a special package file
alpar@0
    22
 %% to function properly.
alpar@0
    23
 %% Such a package is    natbib.sty   by Patrick W. Daly
alpar@0
    24
 %% The form of the \bibitem entries is
alpar@0
    25
 %%   \bibitem[Jones et al.(1990)]{key}...
alpar@0
    26
 %%   \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
alpar@0
    27
 %% The essential feature is that the label (the part in brackets) consists
alpar@0
    28
 %% of the author names, as they should appear in the citation, with the year
alpar@0
    29
 %% in parentheses following. There must be no space before the opening
alpar@0
    30
 %% parenthesis!
alpar@0
    31
 %% With natbib v5.3, a full list of authors may also follow the year.
alpar@0
    32
 %% In natbib.sty, it is possible to define the type of enclosures that is
alpar@0
    33
 %% really wanted (brackets or parentheses), but in either case, there must
alpar@0
    34
 %% be parentheses in the label.
alpar@0
    35
 %% The \cite command functions as follows:
alpar@0
    36
 %%   \citet{key} ==>>                Jones et al. (1990)
alpar@0
    37
 %%   \citet*{key} ==>>               Jones, Baker, and Smith (1990)
alpar@0
    38
 %%   \citep{key} ==>>                (Jones et al., 1990)
alpar@0
    39
 %%   \citep*{key} ==>>               (Jones, Baker, and Smith, 1990)
alpar@0
    40
 %%   \citep[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
alpar@0
    41
 %%   \citep[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
alpar@0
    42
 %%   \citep[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
alpar@0
    43
 %%   \citeauthor{key} ==>>           Jones et al.
alpar@0
    44
 %%   \citeauthor*{key} ==>>          Jones, Baker, and Smith
alpar@0
    45
 %%   \citeyear{key} ==>>             1990
alpar@0
    46
 %%---------------------------------------------------------------------
alpar@0
    47
alpar@0
    48
ENTRY
alpar@0
    49
  { address
alpar@0
    50
    author
alpar@0
    51
    booktitle
alpar@0
    52
    chapter
alpar@0
    53
    edition
alpar@0
    54
    editor
alpar@0
    55
    howpublished
alpar@0
    56
    institution
alpar@0
    57
    journal
alpar@0
    58
    key
alpar@0
    59
    month
alpar@0
    60
    note
alpar@0
    61
    number
alpar@0
    62
    organization
alpar@0
    63
    pages
alpar@0
    64
    publisher
alpar@0
    65
    school
alpar@0
    66
    series
alpar@0
    67
    title
alpar@0
    68
    type
alpar@0
    69
    url
alpar@0
    70
    volume
alpar@0
    71
    year
alpar@0
    72
  }
alpar@0
    73
  {}
alpar@0
    74
  { label extra.label sort.label short.list }
alpar@0
    75
alpar@0
    76
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
alpar@0
    77
alpar@0
    78
FUNCTION {init.state.consts}
alpar@0
    79
{ #0 'before.all :=
alpar@0
    80
  #1 'mid.sentence :=
alpar@0
    81
  #2 'after.sentence :=
alpar@0
    82
  #3 'after.block :=
alpar@0
    83
}
alpar@0
    84
alpar@0
    85
STRINGS { s t }
alpar@0
    86
alpar@0
    87
FUNCTION {output.nonnull}
alpar@0
    88
{ 's :=
alpar@0
    89
  output.state mid.sentence =
alpar@0
    90
    { ", " * write$ }
alpar@0
    91
    { output.state after.block =
alpar@0
    92
        { add.period$ write$
alpar@0
    93
          newline$
alpar@0
    94
          "\newblock " write$
alpar@0
    95
        }
alpar@0
    96
        { output.state before.all =
alpar@0
    97
            'write$
alpar@0
    98
            { add.period$ " " * write$ }
alpar@0
    99
          if$
alpar@0
   100
        }
alpar@0
   101
      if$
alpar@0
   102
      mid.sentence 'output.state :=
alpar@0
   103
    }
alpar@0
   104
  if$
alpar@0
   105
  s
alpar@0
   106
}
alpar@0
   107
alpar@0
   108
FUNCTION {output}
alpar@0
   109
{ duplicate$ empty$
alpar@0
   110
    'pop$
alpar@0
   111
    'output.nonnull
alpar@0
   112
  if$
alpar@0
   113
}
alpar@0
   114
alpar@0
   115
FUNCTION {output.check}
alpar@0
   116
{ 't :=
alpar@0
   117
  duplicate$ empty$
alpar@0
   118
    { pop$ "empty " t * " in " * cite$ * warning$ }
alpar@0
   119
    'output.nonnull
alpar@0
   120
  if$
alpar@0
   121
}
alpar@0
   122
alpar@0
   123
FUNCTION {fin.entry}
alpar@0
   124
{ add.period$
alpar@0
   125
  write$
alpar@0
   126
  newline$
alpar@0
   127
}
alpar@0
   128
alpar@0
   129
FUNCTION {new.block}
alpar@0
   130
{ output.state before.all =
alpar@0
   131
    'skip$
alpar@0
   132
    { after.block 'output.state := }
alpar@0
   133
  if$
alpar@0
   134
}
alpar@0
   135
alpar@0
   136
FUNCTION {new.sentence}
alpar@0
   137
{ output.state after.block =
alpar@0
   138
    'skip$
alpar@0
   139
    { output.state before.all =
alpar@0
   140
        'skip$
alpar@0
   141
        { after.sentence 'output.state := }
alpar@0
   142
      if$
alpar@0
   143
    }
alpar@0
   144
  if$
alpar@0
   145
}
alpar@0
   146
alpar@0
   147
%%SP 2003/07/25
alpar@0
   148
%% No longer used
alpar@0
   149
FUNCTION {add.blank}
alpar@0
   150
{  " " * before.all 'output.state :=
alpar@0
   151
}
alpar@0
   152
alpar@0
   153
FUNCTION {date.block}
alpar@0
   154
{
alpar@0
   155
  new.sentence
alpar@0
   156
}
alpar@0
   157
alpar@0
   158
FUNCTION {not}
alpar@0
   159
{   { #0 }
alpar@0
   160
    { #1 }
alpar@0
   161
  if$
alpar@0
   162
}
alpar@0
   163
alpar@0
   164
FUNCTION {and}
alpar@0
   165
{   'skip$
alpar@0
   166
    { pop$ #0 }
alpar@0
   167
  if$
alpar@0
   168
}
alpar@0
   169
alpar@0
   170
FUNCTION {or}
alpar@0
   171
{   { pop$ #1 }
alpar@0
   172
    'skip$
alpar@0
   173
  if$
alpar@0
   174
}
alpar@0
   175
alpar@0
   176
FUNCTION {new.block.checkb}
alpar@0
   177
{ empty$
alpar@0
   178
  swap$ empty$
alpar@0
   179
  and
alpar@0
   180
    'skip$
alpar@0
   181
    'new.block
alpar@0
   182
  if$
alpar@0
   183
}
alpar@0
   184
alpar@0
   185
FUNCTION {field.or.null}
alpar@0
   186
{ duplicate$ empty$
alpar@0
   187
    { pop$ "" }
alpar@0
   188
    'skip$
alpar@0
   189
  if$
alpar@0
   190
}
alpar@0
   191
alpar@0
   192
FUNCTION {emphasize}
alpar@0
   193
{ skip$ }
alpar@0
   194
alpar@0
   195
FUNCTION {capitalize}
alpar@0
   196
{ "u" change.case$ "t" change.case$ }
alpar@0
   197
alpar@0
   198
FUNCTION {space.word}
alpar@0
   199
{ " " swap$ * " " * }
alpar@0
   200
alpar@0
   201
 %% Here are the language-specific definitions for explicit words.
alpar@0
   202
 %% Each function has a name bbl.xxx where xxx is the English word.
alpar@0
   203
 %% The language selected here is ENGLISH
alpar@0
   204
FUNCTION {bbl.and}
alpar@0
   205
{ "and"}
alpar@0
   206
alpar@0
   207
FUNCTION {bbl.etal}
alpar@0
   208
{ "et~al." }
alpar@0
   209
alpar@0
   210
FUNCTION {bbl.editors}
alpar@0
   211
{ "Eds." }
alpar@0
   212
alpar@0
   213
FUNCTION {bbl.editor}
alpar@0
   214
{ "Ed." }
alpar@0
   215
alpar@0
   216
FUNCTION {bbl.edby}
alpar@0
   217
{ "edited by" }
alpar@0
   218
alpar@0
   219
FUNCTION {bbl.edition}
alpar@0
   220
{ "Edition" }
alpar@0
   221
alpar@0
   222
FUNCTION {bbl.volume}
alpar@0
   223
{ "Vol." }
alpar@0
   224
alpar@0
   225
FUNCTION {bbl.of}
alpar@0
   226
{ "of" }
alpar@0
   227
alpar@0
   228
FUNCTION {bbl.number}
alpar@0
   229
{ "no." }
alpar@0
   230
alpar@0
   231
FUNCTION {bbl.nr}
alpar@0
   232
{ "no." }
alpar@0
   233
alpar@0
   234
FUNCTION {bbl.in}
alpar@0
   235
{ "in" }
alpar@0
   236
alpar@0
   237
FUNCTION {bbl.pages}
alpar@0
   238
{ "pp." }
alpar@0
   239
alpar@0
   240
FUNCTION {bbl.page}
alpar@0
   241
{ "p." }
alpar@0
   242
alpar@0
   243
FUNCTION {bbl.chapter}
alpar@0
   244
{ "Ch." }
alpar@0
   245
alpar@0
   246
FUNCTION {bbl.techrep}
alpar@0
   247
{ "Tech. Rep." }
alpar@0
   248
alpar@0
   249
FUNCTION {bbl.mthesis}
alpar@0
   250
{ "Master's thesis" }
alpar@0
   251
alpar@0
   252
FUNCTION {bbl.phdthesis}
alpar@0
   253
{ "Ph.D. thesis" }
alpar@0
   254
alpar@0
   255
FUNCTION {bbl.first}
alpar@0
   256
{ "1st" }
alpar@0
   257
alpar@0
   258
FUNCTION {bbl.second}
alpar@0
   259
{ "2nd" }
alpar@0
   260
alpar@0
   261
FUNCTION {bbl.third}
alpar@0
   262
{ "3rd" }
alpar@0
   263
alpar@0
   264
FUNCTION {bbl.fourth}
alpar@0
   265
{ "4th" }
alpar@0
   266
alpar@0
   267
FUNCTION {bbl.fifth}
alpar@0
   268
{ "5th" }
alpar@0
   269
alpar@0
   270
FUNCTION {bbl.st}
alpar@0
   271
{ "st" }
alpar@0
   272
alpar@0
   273
FUNCTION {bbl.nd}
alpar@0
   274
{ "nd" }
alpar@0
   275
alpar@0
   276
FUNCTION {bbl.rd}
alpar@0
   277
{ "rd" }
alpar@0
   278
alpar@0
   279
FUNCTION {bbl.th}
alpar@0
   280
{ "th" }
alpar@0
   281
alpar@0
   282
MACRO {jan} {"Jan."}
alpar@0
   283
alpar@0
   284
MACRO {feb} {"Feb."}
alpar@0
   285
alpar@0
   286
MACRO {mar} {"Mar."}
alpar@0
   287
alpar@0
   288
MACRO {apr} {"Apr."}
alpar@0
   289
alpar@0
   290
MACRO {may} {"May"}
alpar@0
   291
alpar@0
   292
MACRO {jun} {"Jun."}
alpar@0
   293
alpar@0
   294
MACRO {jul} {"Jul."}
alpar@0
   295
alpar@0
   296
MACRO {aug} {"Aug."}
alpar@0
   297
alpar@0
   298
MACRO {sep} {"Sep."}
alpar@0
   299
alpar@0
   300
MACRO {oct} {"Oct."}
alpar@0
   301
alpar@0
   302
MACRO {nov} {"Nov."}
alpar@0
   303
alpar@0
   304
MACRO {dec} {"Dec."}
alpar@0
   305
alpar@0
   306
FUNCTION {eng.ord}
alpar@0
   307
{ duplicate$ "1" swap$ *
alpar@0
   308
  #-2 #1 substring$ "1" =
alpar@0
   309
     { bbl.th * }
alpar@0
   310
     { duplicate$ #-1 #1 substring$
alpar@0
   311
       duplicate$ "1" =
alpar@0
   312
         { pop$ bbl.st * }
alpar@0
   313
         { duplicate$ "2" =
alpar@0
   314
             { pop$ bbl.nd * }
alpar@0
   315
             { "3" =
alpar@0
   316
                 { bbl.rd * }
alpar@0
   317
                 { bbl.th * }
alpar@0
   318
               if$
alpar@0
   319
             }
alpar@0
   320
           if$
alpar@0
   321
          }
alpar@0
   322
       if$
alpar@0
   323
     }
alpar@0
   324
   if$
alpar@0
   325
}
alpar@0
   326
alpar@0
   327
MACRO {acmcs} {"ACM Comput. Surv."}
alpar@0
   328
alpar@0
   329
MACRO {acta} {"Acta Inf."}
alpar@0
   330
alpar@0
   331
MACRO {cacm} {"Commun. ACM"}
alpar@0
   332
alpar@0
   333
MACRO {ibmjrd} {"IBM J. Res. Dev."}
alpar@0
   334
alpar@0
   335
MACRO {ibmsj} {"IBM Syst.~J."}
alpar@0
   336
alpar@0
   337
MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
alpar@0
   338
alpar@0
   339
MACRO {ieeetc} {"IEEE Trans. Comput."}
alpar@0
   340
alpar@0
   341
MACRO {ieeetcad}
alpar@0
   342
 {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
alpar@0
   343
alpar@0
   344
MACRO {ipl} {"Inf. Process. Lett."}
alpar@0
   345
alpar@0
   346
MACRO {jacm} {"J.~ACM"}
alpar@0
   347
alpar@0
   348
MACRO {jcss} {"J.~Comput. Syst. Sci."}
alpar@0
   349
alpar@0
   350
MACRO {scp} {"Sci. Comput. Programming"}
alpar@0
   351
alpar@0
   352
MACRO {sicomp} {"SIAM J. Comput."}
alpar@0
   353
alpar@0
   354
MACRO {tocs} {"ACM Trans. Comput. Syst."}
alpar@0
   355
alpar@0
   356
MACRO {tods} {"ACM Trans. Database Syst."}
alpar@0
   357
alpar@0
   358
MACRO {tog} {"ACM Trans. Gr."}
alpar@0
   359
alpar@0
   360
MACRO {toms} {"ACM Trans. Math. Softw."}
alpar@0
   361
alpar@0
   362
MACRO {toois} {"ACM Trans. Office Inf. Syst."}
alpar@0
   363
alpar@0
   364
MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
alpar@0
   365
alpar@0
   366
MACRO {tcs} {"Theoretical Comput. Sci."}
alpar@0
   367
alpar@0
   368
FUNCTION {write.url}
alpar@0
   369
{ url empty$
alpar@0
   370
    { skip$ }
alpar@0
   371
    { "\newline\urlprefix\url{" url * "}" * write$ newline$ }
alpar@0
   372
  if$
alpar@0
   373
}
alpar@0
   374
alpar@0
   375
INTEGERS { nameptr namesleft numnames }
alpar@0
   376
alpar@0
   377
FUNCTION {format.names}
alpar@0
   378
{ 's :=
alpar@0
   379
  #1 'nameptr :=
alpar@0
   380
  s num.names$ 'numnames :=
alpar@0
   381
  numnames 'namesleft :=
alpar@0
   382
    { namesleft #0 > }
alpar@0
   383
    { s nameptr
alpar@0
   384
      "{vv~}{ll}{, jj}{, f.}" format.name$
alpar@0
   385
    't :=
alpar@0
   386
      nameptr #1 >
alpar@0
   387
        {
alpar@0
   388
          namesleft #1 >
alpar@0
   389
            { ", " * t * }
alpar@0
   390
            {
alpar@0
   391
              "," *
alpar@0
   392
              s nameptr "{ll}" format.name$ duplicate$ "others" =
alpar@0
   393
                { 't := }
alpar@0
   394
                { pop$ }
alpar@0
   395
              if$
alpar@0
   396
              t "others" =
alpar@0
   397
                {
alpar@0
   398
                  " " * bbl.etal *
alpar@0
   399
                }
alpar@0
   400
                { " " * t * }
alpar@0
   401
              if$
alpar@0
   402
            }
alpar@0
   403
          if$
alpar@0
   404
        }
alpar@0
   405
        't
alpar@0
   406
      if$
alpar@0
   407
      nameptr #1 + 'nameptr :=
alpar@0
   408
      namesleft #1 - 'namesleft :=
alpar@0
   409
    }
alpar@0
   410
  while$
alpar@0
   411
}
alpar@0
   412
FUNCTION {format.names.ed}
alpar@0
   413
{ format.names }
alpar@0
   414
FUNCTION {format.key}
alpar@0
   415
{ empty$
alpar@0
   416
    { key field.or.null }
alpar@0
   417
    { "" }
alpar@0
   418
  if$
alpar@0
   419
}
alpar@0
   420
alpar@0
   421
FUNCTION {format.authors}
alpar@0
   422
{ author empty$
alpar@0
   423
    { "" }
alpar@0
   424
    { author format.names }
alpar@0
   425
  if$
alpar@0
   426
}
alpar@0
   427
alpar@0
   428
FUNCTION {format.editors}
alpar@0
   429
{ editor empty$
alpar@0
   430
    { "" }
alpar@0
   431
    { editor format.names
alpar@0
   432
      editor num.names$ #1 >
alpar@0
   433
        { " (" * bbl.editors * ")" * }
alpar@0
   434
        { " (" * bbl.editor * ")" * }
alpar@0
   435
      if$
alpar@0
   436
    }
alpar@0
   437
  if$
alpar@0
   438
}
alpar@0
   439
alpar@0
   440
FUNCTION {format.in.editors}
alpar@0
   441
{ editor empty$
alpar@0
   442
    { "" }
alpar@0
   443
    { editor format.names.ed
alpar@0
   444
      editor num.names$ #1 >
alpar@0
   445
        { " (" * bbl.editors * ")" * }
alpar@0
   446
        { " (" * bbl.editor * ")" * }
alpar@0
   447
      if$
alpar@0
   448
    }
alpar@0
   449
  if$
alpar@0
   450
}
alpar@0
   451
alpar@0
   452
FUNCTION {format.note}
alpar@0
   453
{
alpar@0
   454
 note empty$
alpar@0
   455
    { "" }
alpar@0
   456
    { note #1 #1 substring$
alpar@0
   457
      duplicate$ "{" =
alpar@0
   458
        'skip$
alpar@0
   459
        { output.state mid.sentence =
alpar@0
   460
          { "l" }
alpar@0
   461
          { "u" }
alpar@0
   462
        if$
alpar@0
   463
        change.case$
alpar@0
   464
        }
alpar@0
   465
      if$
alpar@0
   466
      note #2 global.max$ substring$ *
alpar@0
   467
    }
alpar@0
   468
  if$
alpar@0
   469
}
alpar@0
   470
alpar@0
   471
FUNCTION {format.title}
alpar@0
   472
{ title empty$
alpar@0
   473
    { "" }
alpar@0
   474
    { title "t" change.case$
alpar@0
   475
    }
alpar@0
   476
  if$
alpar@0
   477
}
alpar@0
   478
alpar@0
   479
FUNCTION {format.full.names}
alpar@0
   480
{'s :=
alpar@0
   481
  #1 'nameptr :=
alpar@0
   482
  s num.names$ 'numnames :=
alpar@0
   483
  numnames 'namesleft :=
alpar@0
   484
    { namesleft #0 > }
alpar@0
   485
    { s nameptr
alpar@0
   486
      "{vv~}{ll}" format.name$
alpar@0
   487
      't :=
alpar@0
   488
      nameptr #1 >
alpar@0
   489
        {
alpar@0
   490
          namesleft #1 >
alpar@0
   491
            { ", " * t * }
alpar@0
   492
            {
alpar@0
   493
              numnames #2 >
alpar@0
   494
                { "," * }
alpar@0
   495
                'skip$
alpar@0
   496
              if$
alpar@0
   497
              s nameptr "{ll}" format.name$ duplicate$ "others" =
alpar@0
   498
                { 't := }
alpar@0
   499
                { pop$ }
alpar@0
   500
              if$
alpar@0
   501
              t "others" =
alpar@0
   502
                {
alpar@0
   503
                  " " * bbl.etal *
alpar@0
   504
                }
alpar@0
   505
                { bbl.and
alpar@0
   506
                  space.word * t *
alpar@0
   507
                }
alpar@0
   508
              if$
alpar@0
   509
            }
alpar@0
   510
          if$
alpar@0
   511
        }
alpar@0
   512
        't
alpar@0
   513
      if$
alpar@0
   514
      nameptr #1 + 'nameptr :=
alpar@0
   515
      namesleft #1 - 'namesleft :=
alpar@0
   516
    }
alpar@0
   517
  while$
alpar@0
   518
}
alpar@0
   519
alpar@0
   520
FUNCTION {author.editor.key.full}
alpar@0
   521
{ author empty$
alpar@0
   522
    { editor empty$
alpar@0
   523
        { key empty$
alpar@0
   524
            { cite$ #1 #3 substring$ }
alpar@0
   525
            'key
alpar@0
   526
          if$
alpar@0
   527
        }
alpar@0
   528
        { editor format.full.names }
alpar@0
   529
      if$
alpar@0
   530
    }
alpar@0
   531
    { author format.full.names }
alpar@0
   532
  if$
alpar@0
   533
}
alpar@0
   534
alpar@0
   535
FUNCTION {author.key.full}
alpar@0
   536
{ author empty$
alpar@0
   537
    { key empty$
alpar@0
   538
         { cite$ #1 #3 substring$ }
alpar@0
   539
          'key
alpar@0
   540
      if$
alpar@0
   541
    }
alpar@0
   542
    { author format.full.names }
alpar@0
   543
  if$
alpar@0
   544
}
alpar@0
   545
alpar@0
   546
FUNCTION {editor.key.full}
alpar@0
   547
{ editor empty$
alpar@0
   548
    { key empty$
alpar@0
   549
         { cite$ #1 #3 substring$ }
alpar@0
   550
          'key
alpar@0
   551
      if$
alpar@0
   552
    }
alpar@0
   553
    { editor format.full.names }
alpar@0
   554
  if$
alpar@0
   555
}
alpar@0
   556
alpar@0
   557
FUNCTION {make.full.names}
alpar@0
   558
{ type$ "book" =
alpar@0
   559
  type$ "inbook" =
alpar@0
   560
  or
alpar@0
   561
    'author.editor.key.full
alpar@0
   562
    { type$ "proceedings" =
alpar@0
   563
        'editor.key.full
alpar@0
   564
        'author.key.full
alpar@0
   565
      if$
alpar@0
   566
    }
alpar@0
   567
  if$
alpar@0
   568
}
alpar@0
   569
alpar@0
   570
FUNCTION {output.bibitem}
alpar@0
   571
{ newline$
alpar@0
   572
  "\bibitem[{" write$
alpar@0
   573
  label write$
alpar@0
   574
  ")" make.full.names duplicate$ short.list =
alpar@0
   575
     { pop$ }
alpar@0
   576
     { * }
alpar@0
   577
   if$
alpar@0
   578
  "}]{" * write$
alpar@0
   579
  cite$ write$
alpar@0
   580
  "}" write$
alpar@0
   581
  newline$
alpar@0
   582
  ""
alpar@0
   583
  before.all 'output.state :=
alpar@0
   584
}
alpar@0
   585
alpar@0
   586
FUNCTION {n.dashify}
alpar@0
   587
{
alpar@0
   588
  't :=
alpar@0
   589
  ""
alpar@0
   590
    { t empty$ not }
alpar@0
   591
    { t #1 #1 substring$ "-" =
alpar@0
   592
        { t #1 #2 substring$ "--" = not
alpar@0
   593
            { "--" *
alpar@0
   594
              t #2 global.max$ substring$ 't :=
alpar@0
   595
            }
alpar@0
   596
            {   { t #1 #1 substring$ "-" = }
alpar@0
   597
                { "-" *
alpar@0
   598
                  t #2 global.max$ substring$ 't :=
alpar@0
   599
                }
alpar@0
   600
              while$
alpar@0
   601
            }
alpar@0
   602
          if$
alpar@0
   603
        }
alpar@0
   604
        { t #1 #1 substring$ *
alpar@0
   605
          t #2 global.max$ substring$ 't :=
alpar@0
   606
        }
alpar@0
   607
      if$
alpar@0
   608
    }
alpar@0
   609
  while$
alpar@0
   610
}
alpar@0
   611
alpar@0
   612
FUNCTION {word.in}
alpar@0
   613
{ bbl.in capitalize
alpar@0
   614
  ":" *
alpar@0
   615
  " " * }
alpar@0
   616
alpar@0
   617
FUNCTION {format.date}
alpar@0
   618
{ year duplicate$ empty$
alpar@0
   619
    { "empty year in " cite$ * "; set to ????" * warning$
alpar@0
   620
       pop$ "????" }
alpar@0
   621
    'skip$
alpar@0
   622
  if$
alpar@0
   623
  month empty$
alpar@0
   624
    'skip$
alpar@0
   625
    { month
alpar@0
   626
      " " * swap$ *
alpar@0
   627
    }
alpar@0
   628
  if$
alpar@0
   629
  extra.label *
alpar@0
   630
  before.all 'output.state :=
alpar@0
   631
  ", " swap$ *
alpar@0
   632
}
alpar@0
   633
alpar@0
   634
FUNCTION {format.btitle}
alpar@0
   635
{ title
alpar@0
   636
}
alpar@0
   637
alpar@0
   638
FUNCTION {tie.or.space.connect}
alpar@0
   639
{ duplicate$ text.length$ #3 <
alpar@0
   640
    { "~" }
alpar@0
   641
    { " " }
alpar@0
   642
  if$
alpar@0
   643
  swap$ * *
alpar@0
   644
}
alpar@0
   645
alpar@0
   646
FUNCTION {either.or.check}
alpar@0
   647
{ empty$
alpar@0
   648
    'pop$
alpar@0
   649
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
alpar@0
   650
  if$
alpar@0
   651
}
alpar@0
   652
alpar@0
   653
FUNCTION {format.bvolume}
alpar@0
   654
{ volume empty$
alpar@0
   655
    { "" }
alpar@0
   656
    { bbl.volume volume tie.or.space.connect
alpar@0
   657
      series empty$
alpar@0
   658
        'skip$
alpar@0
   659
        { bbl.of space.word * series emphasize * }
alpar@0
   660
      if$
alpar@0
   661
      "volume and number" number either.or.check
alpar@0
   662
    }
alpar@0
   663
  if$
alpar@0
   664
}
alpar@0
   665
alpar@0
   666
FUNCTION {format.number.series}
alpar@0
   667
{ volume empty$
alpar@0
   668
    { number empty$
alpar@0
   669
        { series field.or.null }
alpar@0
   670
        { output.state mid.sentence =
alpar@0
   671
            { bbl.number }
alpar@0
   672
            { bbl.number capitalize }
alpar@0
   673
          if$
alpar@0
   674
          number tie.or.space.connect
alpar@0
   675
          series empty$
alpar@0
   676
            { "there's a number but no series in " cite$ * warning$ }
alpar@0
   677
            { bbl.in space.word * series * }
alpar@0
   678
          if$
alpar@0
   679
        }
alpar@0
   680
      if$
alpar@0
   681
    }
alpar@0
   682
    { "" }
alpar@0
   683
  if$
alpar@0
   684
}
alpar@0
   685
alpar@0
   686
FUNCTION {is.num}
alpar@0
   687
{ chr.to.int$
alpar@0
   688
  duplicate$ "0" chr.to.int$ < not
alpar@0
   689
  swap$ "9" chr.to.int$ > not and
alpar@0
   690
}
alpar@0
   691
alpar@0
   692
FUNCTION {extract.num}
alpar@0
   693
{ duplicate$ 't :=
alpar@0
   694
  "" 's :=
alpar@0
   695
  { t empty$ not }
alpar@0
   696
  { t #1 #1 substring$
alpar@0
   697
    t #2 global.max$ substring$ 't :=
alpar@0
   698
    duplicate$ is.num
alpar@0
   699
      { s swap$ * 's := }
alpar@0
   700
      { pop$ "" 't := }
alpar@0
   701
    if$
alpar@0
   702
  }
alpar@0
   703
  while$
alpar@0
   704
  s empty$
alpar@0
   705
    'skip$
alpar@0
   706
    { pop$ s }
alpar@0
   707
  if$
alpar@0
   708
}
alpar@0
   709
alpar@0
   710
FUNCTION {convert.edition}
alpar@0
   711
{ edition extract.num "l" change.case$ 's :=
alpar@0
   712
  s "first" = s "1" = or
alpar@0
   713
    { bbl.first 't := }
alpar@0
   714
    { s "second" = s "2" = or
alpar@0
   715
        { bbl.second 't := }
alpar@0
   716
        { s "third" = s "3" = or
alpar@0
   717
            { bbl.third 't := }
alpar@0
   718
            { s "fourth" = s "4" = or
alpar@0
   719
                { bbl.fourth 't := }
alpar@0
   720
                { s "fifth" = s "5" = or
alpar@0
   721
                    { bbl.fifth 't := }
alpar@0
   722
                    { s #1 #1 substring$ is.num
alpar@0
   723
                        { s eng.ord 't := }
alpar@0
   724
                        { edition 't := }
alpar@0
   725
                      if$
alpar@0
   726
                    }
alpar@0
   727
                  if$
alpar@0
   728
                }
alpar@0
   729
              if$
alpar@0
   730
            }
alpar@0
   731
          if$
alpar@0
   732
        }
alpar@0
   733
      if$
alpar@0
   734
    }
alpar@0
   735
  if$
alpar@0
   736
  t
alpar@0
   737
}
alpar@0
   738
alpar@0
   739
FUNCTION {format.edition}
alpar@0
   740
{ edition empty$
alpar@0
   741
    { "" }
alpar@0
   742
    { output.state mid.sentence =
alpar@0
   743
        { convert.edition "l" change.case$ " " * bbl.edition * }
alpar@0
   744
        { convert.edition "t" change.case$ " " * bbl.edition * }
alpar@0
   745
      if$
alpar@0
   746
    }
alpar@0
   747
  if$
alpar@0
   748
}
alpar@0
   749
alpar@0
   750
INTEGERS { multiresult }
alpar@0
   751
alpar@0
   752
FUNCTION {multi.page.check}
alpar@0
   753
{ 't :=
alpar@0
   754
  #0 'multiresult :=
alpar@0
   755
    { multiresult not
alpar@0
   756
      t empty$ not
alpar@0
   757
      and
alpar@0
   758
    }
alpar@0
   759
    { t #1 #1 substring$
alpar@0
   760
      duplicate$ "-" =
alpar@0
   761
      swap$ duplicate$ "," =
alpar@0
   762
      swap$ "+" =
alpar@0
   763
      or or
alpar@0
   764
        { #1 'multiresult := }
alpar@0
   765
        { t #2 global.max$ substring$ 't := }
alpar@0
   766
      if$
alpar@0
   767
    }
alpar@0
   768
  while$
alpar@0
   769
  multiresult
alpar@0
   770
}
alpar@0
   771
alpar@0
   772
FUNCTION {format.pages}
alpar@0
   773
{ pages empty$
alpar@0
   774
    { "" }
alpar@0
   775
    { pages multi.page.check
alpar@0
   776
        { bbl.pages pages n.dashify tie.or.space.connect }
alpar@0
   777
        { bbl.page pages tie.or.space.connect }
alpar@0
   778
      if$
alpar@0
   779
    }
alpar@0
   780
  if$
alpar@0
   781
}
alpar@0
   782
alpar@0
   783
FUNCTION {format.journal.pages}
alpar@0
   784
{ pages empty$
alpar@0
   785
    'skip$
alpar@0
   786
    { duplicate$ empty$
alpar@0
   787
        { pop$ format.pages }
alpar@0
   788
        {
alpar@0
   789
          ", " *
alpar@0
   790
          pages n.dashify *
alpar@0
   791
        }
alpar@0
   792
      if$
alpar@0
   793
    }
alpar@0
   794
  if$
alpar@0
   795
}
alpar@0
   796
alpar@0
   797
%%SP 2001/01/23
alpar@0
   798
%% Only used in articles
alpar@0
   799
FUNCTION {format.vol.num.pages}
alpar@0
   800
{
alpar@0
   801
%%SP 2001/01/23
alpar@0
   802
%% Add the leading space only if there is a volume
alpar@0
   803
  %% volume field.or.null
alpar@0
   804
  " "
alpar@0
   805
  volume empty$
alpar@0
   806
    { pop$ "" }
alpar@0
   807
    { volume * }
alpar@0
   808
  if$
alpar@0
   809
  number empty$
alpar@0
   810
    'skip$
alpar@0
   811
    {
alpar@0
   812
      "~(" number * ")" * *
alpar@0
   813
      volume empty$
alpar@0
   814
        { "there's a number but no volume in " cite$ * warning$ }
alpar@0
   815
        'skip$
alpar@0
   816
      if$
alpar@0
   817
    }
alpar@0
   818
  if$
alpar@0
   819
}
alpar@0
   820
alpar@0
   821
FUNCTION {format.chapter.pages}
alpar@0
   822
{ chapter empty$
alpar@0
   823
    { "" }
alpar@0
   824
    { type empty$
alpar@0
   825
        { bbl.chapter }
alpar@0
   826
        { type "l" change.case$ }
alpar@0
   827
      if$
alpar@0
   828
      chapter tie.or.space.connect
alpar@0
   829
    }
alpar@0
   830
  if$
alpar@0
   831
}
alpar@0
   832
alpar@0
   833
FUNCTION {format.in.ed.booktitle}
alpar@0
   834
{ booktitle empty$
alpar@0
   835
    { "" }
alpar@0
   836
    { editor empty$
alpar@0
   837
        { word.in booktitle * }
alpar@0
   838
        { word.in format.in.editors * ", " *
alpar@0
   839
          booktitle * }
alpar@0
   840
      if$
alpar@0
   841
    }
alpar@0
   842
  if$
alpar@0
   843
}
alpar@0
   844
alpar@0
   845
FUNCTION {format.thesis.type}
alpar@0
   846
{ type empty$
alpar@0
   847
    'skip$
alpar@0
   848
    { pop$
alpar@0
   849
      type "t" change.case$
alpar@0
   850
    }
alpar@0
   851
  if$
alpar@0
   852
}
alpar@0
   853
alpar@0
   854
FUNCTION {format.tr.number}
alpar@0
   855
{ type empty$
alpar@0
   856
    { bbl.techrep }
alpar@0
   857
    'type
alpar@0
   858
  if$
alpar@0
   859
  number empty$
alpar@0
   860
    { "t" change.case$ }
alpar@0
   861
    { number tie.or.space.connect }
alpar@0
   862
  if$
alpar@0
   863
}
alpar@0
   864
alpar@0
   865
FUNCTION {format.article.crossref}
alpar@0
   866
{
alpar@0
   867
  word.in
alpar@0
   868
  " \cite{" * crossref * "}" *
alpar@0
   869
}
alpar@0
   870
alpar@0
   871
FUNCTION {format.book.crossref}
alpar@0
   872
{ volume empty$
alpar@0
   873
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
alpar@0
   874
      word.in
alpar@0
   875
    }
alpar@0
   876
    { bbl.volume capitalize
alpar@0
   877
      volume tie.or.space.connect
alpar@0
   878
      bbl.of space.word *
alpar@0
   879
    }
alpar@0
   880
  if$
alpar@0
   881
  " \cite{" * crossref * "}" *
alpar@0
   882
}
alpar@0
   883
alpar@0
   884
FUNCTION {format.incoll.inproc.crossref}
alpar@0
   885
{
alpar@0
   886
  word.in
alpar@0
   887
  " \cite{" * crossref * "}" *
alpar@0
   888
}
alpar@0
   889
alpar@0
   890
FUNCTION {format.org.or.pub}
alpar@0
   891
{ 't :=
alpar@0
   892
  ""
alpar@0
   893
  address empty$ t empty$ and
alpar@0
   894
    'skip$
alpar@0
   895
    {
alpar@0
   896
      t empty$
alpar@0
   897
        { address empty$
alpar@0
   898
          'skip$
alpar@0
   899
          { address * }
alpar@0
   900
          if$
alpar@0
   901
        }
alpar@0
   902
        { t *
alpar@0
   903
          address empty$
alpar@0
   904
            'skip$
alpar@0
   905
            { ", " * address * }
alpar@0
   906
          if$
alpar@0
   907
        }
alpar@0
   908
      if$
alpar@0
   909
    }
alpar@0
   910
  if$
alpar@0
   911
}
alpar@0
   912
alpar@0
   913
FUNCTION {format.publisher.address}
alpar@0
   914
{ publisher empty$
alpar@0
   915
    { "empty publisher in " cite$ * warning$
alpar@0
   916
      ""
alpar@0
   917
    }
alpar@0
   918
    { publisher }
alpar@0
   919
  if$
alpar@0
   920
  format.org.or.pub
alpar@0
   921
}
alpar@0
   922
alpar@0
   923
FUNCTION {format.organization.address}
alpar@0
   924
{ organization empty$
alpar@0
   925
    { "" }
alpar@0
   926
    { organization }
alpar@0
   927
  if$
alpar@0
   928
  format.org.or.pub
alpar@0
   929
}
alpar@0
   930
alpar@0
   931
FUNCTION {article}
alpar@0
   932
{ output.bibitem
alpar@0
   933
  format.authors "author" output.check
alpar@0
   934
  author format.key output
alpar@0
   935
  format.date "year" output.check
alpar@0
   936
  date.block
alpar@0
   937
  format.title "title" output.check
alpar@0
   938
  new.sentence
alpar@0
   939
  crossref missing$
alpar@0
   940
    { journal
alpar@0
   941
      "journal" output.check
alpar@0
   942
%%SP 2001/01/23
alpar@0
   943
%% Add the space in format.vol.num.pages
alpar@0
   944
      %% add.blank
alpar@0
   945
  before.all 'output.state :=
alpar@0
   946
      format.vol.num.pages output
alpar@0
   947
    }
alpar@0
   948
    { format.article.crossref output.nonnull
alpar@0
   949
      format.pages output
alpar@0
   950
    }
alpar@0
   951
  if$
alpar@0
   952
  format.journal.pages
alpar@0
   953
  format.note output
alpar@0
   954
  fin.entry
alpar@0
   955
  write.url
alpar@0
   956
}
alpar@0
   957
alpar@0
   958
FUNCTION {book}
alpar@0
   959
{ output.bibitem
alpar@0
   960
  author empty$
alpar@0
   961
    { format.editors "author and editor" output.check
alpar@0
   962
      editor format.key output
alpar@0
   963
    }
alpar@0
   964
    { format.authors output.nonnull
alpar@0
   965
      crossref missing$
alpar@0
   966
        { "author and editor" editor either.or.check }
alpar@0
   967
        'skip$
alpar@0
   968
      if$
alpar@0
   969
    }
alpar@0
   970
  if$
alpar@0
   971
  format.date "year" output.check
alpar@0
   972
  date.block
alpar@0
   973
  format.btitle "title" output.check
alpar@0
   974
  crossref missing$
alpar@0
   975
    { format.edition output
alpar@0
   976
      new.sentence
alpar@0
   977
  format.bvolume output
alpar@0
   978
      format.number.series output
alpar@0
   979
      new.sentence
alpar@0
   980
      format.publisher.address output
alpar@0
   981
    }
alpar@0
   982
    {
alpar@0
   983
  new.sentence
alpar@0
   984
      format.book.crossref output.nonnull
alpar@0
   985
    }
alpar@0
   986
  if$
alpar@0
   987
  format.note output
alpar@0
   988
  fin.entry
alpar@0
   989
  write.url
alpar@0
   990
}
alpar@0
   991
alpar@0
   992
FUNCTION {booklet}
alpar@0
   993
{ output.bibitem
alpar@0
   994
  format.authors output
alpar@0
   995
  author format.key output
alpar@0
   996
  format.date "year" output.check
alpar@0
   997
  date.block
alpar@0
   998
  format.title "title" output.check
alpar@0
   999
  new.sentence
alpar@0
  1000
  howpublished output
alpar@0
  1001
  address output
alpar@0
  1002
  format.note output
alpar@0
  1003
  fin.entry
alpar@0
  1004
  write.url
alpar@0
  1005
}
alpar@0
  1006
alpar@0
  1007
FUNCTION {inbook}
alpar@0
  1008
{ output.bibitem
alpar@0
  1009
  author empty$
alpar@0
  1010
    { format.editors "author and editor" output.check
alpar@0
  1011
      editor format.key output
alpar@0
  1012
    }
alpar@0
  1013
    { format.authors output.nonnull
alpar@0
  1014
      crossref missing$
alpar@0
  1015
        { "author and editor" editor either.or.check }
alpar@0
  1016
        'skip$
alpar@0
  1017
      if$
alpar@0
  1018
    }
alpar@0
  1019
  if$
alpar@0
  1020
  format.date "year" output.check
alpar@0
  1021
  date.block
alpar@0
  1022
  format.btitle "title" output.check
alpar@0
  1023
  crossref missing$
alpar@0
  1024
    {
alpar@0
  1025
      format.edition output
alpar@0
  1026
      new.sentence
alpar@0
  1027
      format.bvolume output
alpar@0
  1028
      format.number.series output
alpar@0
  1029
      new.sentence
alpar@0
  1030
      format.publisher.address output
alpar@0
  1031
      format.chapter.pages "chapter and pages" output.check
alpar@0
  1032
    }
alpar@0
  1033
    {
alpar@0
  1034
      format.chapter.pages "chapter and pages" output.check
alpar@0
  1035
  new.sentence
alpar@0
  1036
      format.book.crossref output.nonnull
alpar@0
  1037
    }
alpar@0
  1038
  if$
alpar@0
  1039
  format.pages "pages" output.check
alpar@0
  1040
  format.note output
alpar@0
  1041
  fin.entry
alpar@0
  1042
  write.url
alpar@0
  1043
}
alpar@0
  1044
alpar@0
  1045
FUNCTION {incollection}
alpar@0
  1046
{ output.bibitem
alpar@0
  1047
  format.authors "author" output.check
alpar@0
  1048
  author format.key output
alpar@0
  1049
  format.date "year" output.check
alpar@0
  1050
  date.block
alpar@0
  1051
  format.title "title" output.check
alpar@0
  1052
  new.sentence
alpar@0
  1053
  crossref missing$
alpar@0
  1054
    { format.in.ed.booktitle "booktitle" output.check
alpar@0
  1055
      format.edition output
alpar@0
  1056
      new.sentence
alpar@0
  1057
      format.bvolume output
alpar@0
  1058
      format.number.series output
alpar@0
  1059
      new.sentence
alpar@0
  1060
      format.publisher.address output
alpar@0
  1061
      format.chapter.pages output
alpar@0
  1062
    }
alpar@0
  1063
    { format.incoll.inproc.crossref output.nonnull
alpar@0
  1064
      format.chapter.pages output
alpar@0
  1065
    }
alpar@0
  1066
  if$
alpar@0
  1067
  format.pages "pages" output.check
alpar@0
  1068
  format.note output
alpar@0
  1069
  fin.entry
alpar@0
  1070
  write.url
alpar@0
  1071
}
alpar@0
  1072
alpar@0
  1073
FUNCTION {inproceedings}
alpar@0
  1074
{ output.bibitem
alpar@0
  1075
  format.authors "author" output.check
alpar@0
  1076
  author format.key output
alpar@0
  1077
  format.date "year" output.check
alpar@0
  1078
  date.block
alpar@0
  1079
  format.title "title" output.check
alpar@0
  1080
  new.sentence
alpar@0
  1081
  crossref missing$
alpar@0
  1082
    { format.in.ed.booktitle "booktitle" output.check
alpar@0
  1083
      format.edition output
alpar@0
  1084
      new.sentence
alpar@0
  1085
      format.bvolume output
alpar@0
  1086
      format.number.series output
alpar@0
  1087
      new.sentence
alpar@0
  1088
      publisher empty$
alpar@0
  1089
        { format.organization.address output }
alpar@0
  1090
        { organization output
alpar@0
  1091
          format.publisher.address output
alpar@0
  1092
        }
alpar@0
  1093
      if$
alpar@0
  1094
%%SP 2001/01/23
alpar@0
  1095
%%      format.pages output
alpar@0
  1096
    }
alpar@0
  1097
    { format.incoll.inproc.crossref output.nonnull
alpar@0
  1098
%%SP 2001/01/23
alpar@0
  1099
%%      format.pages output
alpar@0
  1100
    }
alpar@0
  1101
  if$
alpar@0
  1102
%%SP 2001/01/23
alpar@0
  1103
  format.pages "pages" output.check
alpar@0
  1104
  format.note output
alpar@0
  1105
  fin.entry
alpar@0
  1106
  write.url
alpar@0
  1107
}
alpar@0
  1108
alpar@0
  1109
FUNCTION {conference} { inproceedings }
alpar@0
  1110
alpar@0
  1111
FUNCTION {manual}
alpar@0
  1112
{ output.bibitem
alpar@0
  1113
  format.authors output
alpar@0
  1114
  author format.key output
alpar@0
  1115
  format.date "year" output.check
alpar@0
  1116
  date.block
alpar@0
  1117
  format.btitle "title" output.check
alpar@0
  1118
  new.sentence
alpar@0
  1119
  organization output
alpar@0
  1120
  address output
alpar@0
  1121
  format.edition output
alpar@0
  1122
  format.note output
alpar@0
  1123
  fin.entry
alpar@0
  1124
  write.url
alpar@0
  1125
}
alpar@0
  1126
alpar@0
  1127
FUNCTION {mastersthesis}
alpar@0
  1128
{ output.bibitem
alpar@0
  1129
  format.authors "author" output.check
alpar@0
  1130
  author format.key output
alpar@0
  1131
  format.date "year" output.check
alpar@0
  1132
  date.block
alpar@0
  1133
  format.title "title" output.check
alpar@0
  1134
  new.sentence
alpar@0
  1135
  bbl.mthesis format.thesis.type output.nonnull
alpar@0
  1136
  school "school" output.check
alpar@0
  1137
  address output
alpar@0
  1138
  format.note output
alpar@0
  1139
  fin.entry
alpar@0
  1140
  write.url
alpar@0
  1141
}
alpar@0
  1142
alpar@0
  1143
FUNCTION {misc}
alpar@0
  1144
{ output.bibitem
alpar@0
  1145
  format.authors output
alpar@0
  1146
  author format.key output
alpar@0
  1147
  format.date "year" output.check
alpar@0
  1148
  date.block
alpar@0
  1149
  format.title output
alpar@0
  1150
  new.sentence
alpar@0
  1151
  howpublished output
alpar@0
  1152
  format.note output
alpar@0
  1153
  fin.entry
alpar@0
  1154
  write.url
alpar@0
  1155
}
alpar@0
  1156
alpar@0
  1157
FUNCTION {phdthesis}
alpar@0
  1158
{ output.bibitem
alpar@0
  1159
  format.authors "author" output.check
alpar@0
  1160
  author format.key output
alpar@0
  1161
  format.date "year" output.check
alpar@0
  1162
  date.block
alpar@0
  1163
  format.title "title" output.check
alpar@0
  1164
  new.sentence
alpar@0
  1165
  bbl.phdthesis format.thesis.type output.nonnull
alpar@0
  1166
  school "school" output.check
alpar@0
  1167
  address output
alpar@0
  1168
  format.note output
alpar@0
  1169
  fin.entry
alpar@0
  1170
  write.url
alpar@0
  1171
}
alpar@0
  1172
alpar@0
  1173
FUNCTION {proceedings}
alpar@0
  1174
{ output.bibitem
alpar@0
  1175
  format.editors output
alpar@0
  1176
  editor format.key output
alpar@0
  1177
  format.date "year" output.check
alpar@0
  1178
  date.block
alpar@0
  1179
  format.btitle "title" output.check
alpar@0
  1180
  new.sentence
alpar@0
  1181
  format.bvolume output
alpar@0
  1182
  format.number.series output
alpar@0
  1183
  new.sentence
alpar@0
  1184
  publisher empty$
alpar@0
  1185
    { format.organization.address output }
alpar@0
  1186
    { organization output
alpar@0
  1187
      format.publisher.address output
alpar@0
  1188
    }
alpar@0
  1189
  if$
alpar@0
  1190
  format.note output
alpar@0
  1191
  fin.entry
alpar@0
  1192
  write.url
alpar@0
  1193
}
alpar@0
  1194
alpar@0
  1195
FUNCTION {techreport}
alpar@0
  1196
{ output.bibitem
alpar@0
  1197
  format.authors "author" output.check
alpar@0
  1198
  author format.key output
alpar@0
  1199
  format.date "year" output.check
alpar@0
  1200
  date.block
alpar@0
  1201
  format.title "title" output.check
alpar@0
  1202
  new.sentence
alpar@0
  1203
  format.tr.number output.nonnull
alpar@0
  1204
  institution "institution" output.check
alpar@0
  1205
  address output
alpar@0
  1206
  format.note output
alpar@0
  1207
  fin.entry
alpar@0
  1208
  write.url
alpar@0
  1209
}
alpar@0
  1210
alpar@0
  1211
FUNCTION {unpublished}
alpar@0
  1212
{ output.bibitem
alpar@0
  1213
  format.authors "author" output.check
alpar@0
  1214
  author format.key output
alpar@0
  1215
  format.date "year" output.check
alpar@0
  1216
  date.block
alpar@0
  1217
  format.title "title" output.check
alpar@0
  1218
  format.note "note" output.check
alpar@0
  1219
  fin.entry
alpar@0
  1220
  write.url
alpar@0
  1221
}
alpar@0
  1222
alpar@0
  1223
FUNCTION {default.type} { misc }
alpar@0
  1224
alpar@0
  1225
READ
alpar@0
  1226
alpar@0
  1227
FUNCTION {sortify}
alpar@0
  1228
{ purify$
alpar@0
  1229
  "l" change.case$
alpar@0
  1230
}
alpar@0
  1231
alpar@0
  1232
INTEGERS { len }
alpar@0
  1233
alpar@0
  1234
FUNCTION {chop.word}
alpar@0
  1235
{ 's :=
alpar@0
  1236
  'len :=
alpar@0
  1237
  s #1 len substring$ =
alpar@0
  1238
    { s len #1 + global.max$ substring$ }
alpar@0
  1239
    's
alpar@0
  1240
  if$
alpar@0
  1241
}
alpar@0
  1242
alpar@0
  1243
FUNCTION {format.lab.names}
alpar@0
  1244
{ 's :=
alpar@0
  1245
  s #1 "{vv~}{ll}" format.name$
alpar@0
  1246
  s num.names$ duplicate$
alpar@0
  1247
  #2 >
alpar@0
  1248
    { pop$
alpar@0
  1249
      " " * bbl.etal *
alpar@0
  1250
    }
alpar@0
  1251
    { #2 <
alpar@0
  1252
        'skip$
alpar@0
  1253
        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
alpar@0
  1254
            {
alpar@0
  1255
              " " * bbl.etal *
alpar@0
  1256
            }
alpar@0
  1257
            { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
alpar@0
  1258
              * }
alpar@0
  1259
          if$
alpar@0
  1260
        }
alpar@0
  1261
      if$
alpar@0
  1262
    }
alpar@0
  1263
  if$
alpar@0
  1264
}
alpar@0
  1265
alpar@0
  1266
FUNCTION {author.key.label}
alpar@0
  1267
{ author empty$
alpar@0
  1268
    { key empty$
alpar@0
  1269
        { cite$ #1 #3 substring$ }
alpar@0
  1270
        'key
alpar@0
  1271
      if$
alpar@0
  1272
    }
alpar@0
  1273
    { author format.lab.names }
alpar@0
  1274
  if$
alpar@0
  1275
}
alpar@0
  1276
alpar@0
  1277
FUNCTION {author.editor.key.label}
alpar@0
  1278
{ author empty$
alpar@0
  1279
    { editor empty$
alpar@0
  1280
        { key empty$
alpar@0
  1281
            { cite$ #1 #3 substring$ }
alpar@0
  1282
            'key
alpar@0
  1283
          if$
alpar@0
  1284
        }
alpar@0
  1285
        { editor format.lab.names }
alpar@0
  1286
      if$
alpar@0
  1287
    }
alpar@0
  1288
    { author format.lab.names }
alpar@0
  1289
  if$
alpar@0
  1290
}
alpar@0
  1291
alpar@0
  1292
FUNCTION {editor.key.label}
alpar@0
  1293
{ editor empty$
alpar@0
  1294
    { key empty$
alpar@0
  1295
        { cite$ #1 #3 substring$ }
alpar@0
  1296
        'key
alpar@0
  1297
      if$
alpar@0
  1298
    }
alpar@0
  1299
    { editor format.lab.names }
alpar@0
  1300
  if$
alpar@0
  1301
}
alpar@0
  1302
alpar@0
  1303
FUNCTION {calc.short.authors}
alpar@0
  1304
{ type$ "book" =
alpar@0
  1305
  type$ "inbook" =
alpar@0
  1306
  or
alpar@0
  1307
    'author.editor.key.label
alpar@0
  1308
    { type$ "proceedings" =
alpar@0
  1309
        'editor.key.label
alpar@0
  1310
        'author.key.label
alpar@0
  1311
      if$
alpar@0
  1312
    }
alpar@0
  1313
  if$
alpar@0
  1314
  'short.list :=
alpar@0
  1315
}
alpar@0
  1316
alpar@0
  1317
FUNCTION {calc.label}
alpar@0
  1318
{ calc.short.authors
alpar@0
  1319
  short.list
alpar@0
  1320
  "("
alpar@0
  1321
  *
alpar@0
  1322
  year duplicate$ empty$
alpar@0
  1323
     { pop$ "????" }
alpar@0
  1324
     'skip$
alpar@0
  1325
  if$
alpar@0
  1326
  *
alpar@0
  1327
  'label :=
alpar@0
  1328
}
alpar@0
  1329
alpar@0
  1330
FUNCTION {sort.format.names}
alpar@0
  1331
{ 's :=
alpar@0
  1332
  #1 'nameptr :=
alpar@0
  1333
  ""
alpar@0
  1334
  s num.names$ 'numnames :=
alpar@0
  1335
  numnames 'namesleft :=
alpar@0
  1336
    { namesleft #0 > }
alpar@0
  1337
    { s nameptr
alpar@0
  1338
      "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}"
alpar@0
  1339
      format.name$ 't :=
alpar@0
  1340
      nameptr #1 >
alpar@0
  1341
        {
alpar@0
  1342
          "   "  *
alpar@0
  1343
          namesleft #1 = t "others" = and
alpar@0
  1344
            { "zzzzz" * }
alpar@0
  1345
            { t sortify * }
alpar@0
  1346
          if$
alpar@0
  1347
        }
alpar@0
  1348
        { t sortify * }
alpar@0
  1349
      if$
alpar@0
  1350
      nameptr #1 + 'nameptr :=
alpar@0
  1351
      namesleft #1 - 'namesleft :=
alpar@0
  1352
    }
alpar@0
  1353
  while$
alpar@0
  1354
}
alpar@0
  1355
alpar@0
  1356
FUNCTION {sort.format.title}
alpar@0
  1357
{ 't :=
alpar@0
  1358
  "A " #2
alpar@0
  1359
    "An " #3
alpar@0
  1360
      "The " #4 t chop.word
alpar@0
  1361
    chop.word
alpar@0
  1362
  chop.word
alpar@0
  1363
  sortify
alpar@0
  1364
  #1 global.max$ substring$
alpar@0
  1365
}
alpar@0
  1366
alpar@0
  1367
FUNCTION {author.sort}
alpar@0
  1368
{ author empty$
alpar@0
  1369
    { key empty$
alpar@0
  1370
        { "to sort, need author or key in " cite$ * warning$
alpar@0
  1371
          ""
alpar@0
  1372
        }
alpar@0
  1373
        { key sortify }
alpar@0
  1374
      if$
alpar@0
  1375
    }
alpar@0
  1376
    { author sort.format.names }
alpar@0
  1377
  if$
alpar@0
  1378
}
alpar@0
  1379
alpar@0
  1380
FUNCTION {author.editor.sort}
alpar@0
  1381
{ author empty$
alpar@0
  1382
    { editor empty$
alpar@0
  1383
        { key empty$
alpar@0
  1384
            { "to sort, need author, editor, or key in " cite$ * warning$
alpar@0
  1385
              ""
alpar@0
  1386
            }
alpar@0
  1387
            { key sortify }
alpar@0
  1388
          if$
alpar@0
  1389
        }
alpar@0
  1390
        { editor sort.format.names }
alpar@0
  1391
      if$
alpar@0
  1392
    }
alpar@0
  1393
    { author sort.format.names }
alpar@0
  1394
  if$
alpar@0
  1395
}
alpar@0
  1396
alpar@0
  1397
FUNCTION {editor.sort}
alpar@0
  1398
{ editor empty$
alpar@0
  1399
    { key empty$
alpar@0
  1400
        { "to sort, need editor or key in " cite$ * warning$
alpar@0
  1401
          ""
alpar@0
  1402
        }
alpar@0
  1403
        { key sortify }
alpar@0
  1404
      if$
alpar@0
  1405
    }
alpar@0
  1406
    { editor sort.format.names }
alpar@0
  1407
  if$
alpar@0
  1408
}
alpar@0
  1409
alpar@0
  1410
FUNCTION {presort}
alpar@0
  1411
{ calc.label
alpar@0
  1412
  label sortify
alpar@0
  1413
  "    "
alpar@0
  1414
  *
alpar@0
  1415
  type$ "book" =
alpar@0
  1416
  type$ "inbook" =
alpar@0
  1417
  or
alpar@0
  1418
    'author.editor.sort
alpar@0
  1419
    { type$ "proceedings" =
alpar@0
  1420
        'editor.sort
alpar@0
  1421
        'author.sort
alpar@0
  1422
      if$
alpar@0
  1423
    }
alpar@0
  1424
  if$
alpar@0
  1425
  #1 entry.max$ substring$
alpar@0
  1426
  'sort.label :=
alpar@0
  1427
  sort.label
alpar@0
  1428
  *
alpar@0
  1429
  "    "
alpar@0
  1430
  *
alpar@0
  1431
  title field.or.null
alpar@0
  1432
  sort.format.title
alpar@0
  1433
  *
alpar@0
  1434
  #1 entry.max$ substring$
alpar@0
  1435
  'sort.key$ :=
alpar@0
  1436
}
alpar@0
  1437
alpar@0
  1438
ITERATE {presort}
alpar@0
  1439
alpar@0
  1440
SORT
alpar@0
  1441
alpar@0
  1442
STRINGS { last.label next.extra }
alpar@0
  1443
alpar@0
  1444
INTEGERS { last.extra.num number.label }
alpar@0
  1445
alpar@0
  1446
FUNCTION {initialize.extra.label.stuff}
alpar@0
  1447
{ #0 int.to.chr$ 'last.label :=
alpar@0
  1448
  "" 'next.extra :=
alpar@0
  1449
  #0 'last.extra.num :=
alpar@0
  1450
  #0 'number.label :=
alpar@0
  1451
}
alpar@0
  1452
alpar@0
  1453
FUNCTION {forward.pass}
alpar@0
  1454
{ last.label label =
alpar@0
  1455
    { last.extra.num #1 + 'last.extra.num :=
alpar@0
  1456
      last.extra.num int.to.chr$ 'extra.label :=
alpar@0
  1457
    }
alpar@0
  1458
    { "a" chr.to.int$ 'last.extra.num :=
alpar@0
  1459
      "" 'extra.label :=
alpar@0
  1460
      label 'last.label :=
alpar@0
  1461
    }
alpar@0
  1462
  if$
alpar@0
  1463
  number.label #1 + 'number.label :=
alpar@0
  1464
}
alpar@0
  1465
alpar@0
  1466
FUNCTION {reverse.pass}
alpar@0
  1467
{ next.extra "b" =
alpar@0
  1468
    { "a" 'extra.label := }
alpar@0
  1469
    'skip$
alpar@0
  1470
  if$
alpar@0
  1471
  extra.label 'next.extra :=
alpar@0
  1472
  extra.label
alpar@0
  1473
  duplicate$ empty$
alpar@0
  1474
    'skip$
alpar@0
  1475
    { "{\natexlab{" swap$ * "}}" * }
alpar@0
  1476
  if$
alpar@0
  1477
  'extra.label :=
alpar@0
  1478
  label extra.label * 'label :=
alpar@0
  1479
}
alpar@0
  1480
alpar@0
  1481
EXECUTE {initialize.extra.label.stuff}
alpar@0
  1482
alpar@0
  1483
ITERATE {forward.pass}
alpar@0
  1484
alpar@0
  1485
REVERSE {reverse.pass}
alpar@0
  1486
alpar@0
  1487
FUNCTION {bib.sort.order}
alpar@0
  1488
{ sort.label
alpar@0
  1489
  "    "
alpar@0
  1490
  *
alpar@0
  1491
  year field.or.null sortify
alpar@0
  1492
  *
alpar@0
  1493
  "    "
alpar@0
  1494
  *
alpar@0
  1495
  title field.or.null
alpar@0
  1496
  sort.format.title
alpar@0
  1497
  *
alpar@0
  1498
  #1 entry.max$ substring$
alpar@0
  1499
  'sort.key$ :=
alpar@0
  1500
}
alpar@0
  1501
alpar@0
  1502
ITERATE {bib.sort.order}
alpar@0
  1503
alpar@0
  1504
SORT
alpar@0
  1505
alpar@0
  1506
FUNCTION {begin.bib}
alpar@0
  1507
{ preamble$ empty$
alpar@0
  1508
    'skip$
alpar@0
  1509
    { preamble$ write$ newline$ }
alpar@0
  1510
  if$
alpar@0
  1511
  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
alpar@0
  1512
  write$ newline$
alpar@0
  1513
  "\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi"
alpar@0
  1514
  write$ newline$
alpar@0
  1515
  "\expandafter\ifx\csname url\endcsname\relax"
alpar@0
  1516
  write$ newline$
alpar@0
  1517
  "  \def\url#1{\texttt{#1}}\fi"
alpar@0
  1518
  write$ newline$
alpar@0
  1519
  "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
alpar@0
  1520
  write$ newline$
alpar@0
  1521
}
alpar@0
  1522
alpar@0
  1523
EXECUTE {begin.bib}
alpar@0
  1524
alpar@0
  1525
EXECUTE {init.state.consts}
alpar@0
  1526
alpar@0
  1527
ITERATE {call.type$}
alpar@0
  1528
alpar@0
  1529
FUNCTION {end.bib}
alpar@0
  1530
{ newline$
alpar@0
  1531
  "\end{thebibliography}" write$ newline$
alpar@0
  1532
}
alpar@0
  1533
alpar@0
  1534
EXECUTE {end.bib}
alpar@0
  1535
%% End of customized bst file
alpar@0
  1536
%%
alpar@0
  1537
%% End of file `elsarticle-harv.bst'.