cart-elc

Source code for CART-ELC
git clone git://git.laack.co/cart-elc.git
Log | Files | Refs | README | LICENSE

tmlr.bst (26969B)


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